summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2008-03-22 00:32:21 +0000
committerHolger Freyther <zecke@selfish.org>2008-03-22 00:32:21 +0000
commit0362af65b95845f571763fa56e6031a8089091fc (patch)
treebae11f352af2fc04b16ae6ddae46fc6cb51b36f5
parent2f8d9c7a57e00b9acd7f7ac445b3ee6cd4eba886 (diff)
parenta4535d80cb60e8eb76cdd2570e76b39eee2332d0 (diff)
merge of '4216327dbc55e359d557266da86971e66ff5f595'
and 'd72643015c099d3f2c3ec5c5bb1294365effbe54'
-rw-r--r--classes/autotools.bbclass62
-rw-r--r--classes/base.bbclass20
-rw-r--r--classes/cpan.bbclass13
-rw-r--r--classes/image.bbclass6
-rw-r--r--classes/insane.bbclass20
-rw-r--r--classes/native.bbclass7
-rw-r--r--classes/package.bbclass44
-rw-r--r--classes/package_deb.bbclass18
-rw-r--r--classes/package_ipk.bbclass29
-rw-r--r--classes/packaged-staging.bbclass223
-rw-r--r--classes/qmake2.bbclass2
-rw-r--r--classes/qtopia4core.bbclass2
-rw-r--r--classes/rm_work.bbclass4
-rw-r--r--classes/rootfs_deb.bbclass19
-rw-r--r--classes/rootfs_ipk.bbclass30
-rw-r--r--classes/seppuku.bbclass17
-rw-r--r--classes/siteinfo.bbclass61
-rw-r--r--classes/testlab.bbclass14
-rw-r--r--conf/bitbake.conf12
-rw-r--r--conf/distro/angstrom-2008.1.conf29
-rw-r--r--conf/distro/include/angstrom-2007-for-openmoko-versions.inc32
-rw-r--r--conf/distro/include/angstrom-2008-preferred-versions.inc4
-rw-r--r--conf/distro/include/angstrom-uclinux-uclibc.inc22
-rw-r--r--conf/distro/include/angstrom.inc22
-rw-r--r--conf/distro/include/preferred-om-2008-versions.inc3
-rw-r--r--conf/distro/include/preferred-xorg-versions-X11R7.4.inc10
-rw-r--r--conf/distro/include/sane-srcrevs.inc69
-rw-r--r--conf/distro/openmoko.conf1
-rw-r--r--conf/distro/unslung.conf7
-rw-r--r--conf/machine/at32stk1000.conf5
-rw-r--r--conf/machine/atngw100.conf4
-rw-r--r--conf/machine/beagleboard.conf34
-rw-r--r--conf/machine/h2200.conf1
-rw-r--r--conf/machine/include/tune-armv7.inc5
-rw-r--r--conf/machine/include/tune-cortexa8.inc4
-rw-r--r--conf/machine/include/tune-cortexm1.inc3
-rw-r--r--conf/machine/include/tune-cortexm3.inc4
-rw-r--r--conf/machine/include/tune-cortexr4.inc4
-rw-r--r--conf/machine/mainstone.conf5
-rw-r--r--conf/machine/omap5912osk.conf4
-rwxr-xr-xcontrib/angstrom/build-feeds.sh4
-rw-r--r--packages/aircrack/aircrack-ng_0.9.1.bb22
-rw-r--r--packages/aircrack/aircrack-ng_0.9.3.bb22
-rw-r--r--packages/alsa/alsa-state.bb2
-rw-r--r--packages/angstrom/angstrom-feed-configs.bb33
-rw-r--r--packages/apache2/apache2-native_2.2.3.bb2
-rw-r--r--packages/apex/apex-nslu2-16mb_1.5.13.bb2
-rw-r--r--packages/apex/apex-nslu2-16mb_1.5.8.bb2
-rw-r--r--packages/apex/apex-nslu2_1.5.13.bb2
-rw-r--r--packages/apex/apex-nslu2_1.5.8.bb2
-rw-r--r--packages/apr/apr-util/.mtn2git_empty (renamed from packages/busybox/busybox-1.9.1/openmoko/.mtn2git_empty)0
-rw-r--r--packages/apr/apr-util/configure_fixes.patch25
-rw-r--r--packages/apr/apr-util_1.2.12.bb29
-rw-r--r--packages/apr/apr-util_1.2.7.bb15
-rw-r--r--packages/apr/apr/.mtn2git_empty (renamed from packages/gcc/gcc-4.1.0/.mtn2git_empty)0
-rw-r--r--packages/apr/apr/configure_fixes.patch22
-rw-r--r--packages/apr/apr_1.2.12.bb26
-rw-r--r--packages/apr/apr_1.2.7.bb15
-rw-r--r--packages/arm-kernel-shim/arm-kernel-shim_1.5.bb2
-rw-r--r--packages/binutils/binutils-cross-sdk.inc25
-rw-r--r--packages/binutils/binutils-cross-sdk_2.14.90.0.6.bb11
-rw-r--r--packages/binutils/binutils-cross-sdk_2.14.90.0.7.bb11
-rw-r--r--packages/binutils/binutils-cross-sdk_2.15.94.0.1.bb12
-rw-r--r--packages/binutils/binutils-cross-sdk_2.16.91.0.6.bb20
-rw-r--r--packages/binutils/binutils-cross-sdk_2.16.91.0.7.bb21
-rw-r--r--packages/binutils/binutils-cross-sdk_2.17.50.0.12.bb22
-rw-r--r--packages/binutils/binutils-cross-sdk_2.18.bb22
-rw-r--r--packages/binutils/binutils-cross-sdk_cvs.bb12
-rw-r--r--packages/binutils/binutils-cross.inc8
-rw-r--r--packages/binutils/binutils-cross_2.14.90.0.6.bb33
-rw-r--r--packages/binutils/binutils-cross_2.14.90.0.7.bb33
-rw-r--r--packages/binutils/binutils-cross_2.15.94.0.1.bb33
-rw-r--r--packages/binutils/binutils-cross_2.16.91.0.6.bb33
-rw-r--r--packages/binutils/binutils-cross_2.16.91.0.7.bb33
-rw-r--r--packages/binutils/binutils-cross_2.18.bb3
-rw-r--r--packages/binutils/binutils-cross_csl-arm-20050416.bb31
-rw-r--r--packages/binutils/binutils-cross_csl-arm-20050603.bb31
-rw-r--r--packages/binutils/binutils_2.14.90.0.6.bb2
-rw-r--r--packages/binutils/binutils_2.14.90.0.7.bb2
-rw-r--r--packages/binutils/binutils_2.15.94.0.1.bb2
-rw-r--r--packages/binutils/binutils_2.16.91.0.6.bb2
-rw-r--r--packages/binutils/binutils_2.16.91.0.7.bb1
-rw-r--r--packages/binutils/binutils_2.16.bb2
-rw-r--r--packages/binutils/binutils_2.17.50.0.1.bb1
-rw-r--r--packages/binutils/binutils_2.17.50.0.12.bb2
-rw-r--r--packages/binutils/binutils_2.17.50.0.5.bb2
-rw-r--r--packages/binutils/binutils_2.17.50.0.8.bb1
-rw-r--r--packages/binutils/binutils_2.17.bb2
-rw-r--r--packages/binutils/binutils_2.18.bb2
-rw-r--r--packages/binutils/binutils_csl-arm-20050416.bb2
-rw-r--r--packages/binutils/binutils_csl-arm-20050603.bb2
-rw-r--r--packages/binutils/binutils_cvs.bb2
-rw-r--r--packages/bluez/bluez-cups-backend_3.28.bb27
-rw-r--r--packages/bluez/bluez-gnome_0.24.bb14
-rw-r--r--packages/bluez/bluez-gstreamer-plugin_3.28.bb27
-rw-r--r--packages/bluez/bluez-libs_3.28.bb4
-rw-r--r--packages/bluez/bluez-utils-3.28/.mtn2git_empty (renamed from packages/linux/linux-openmoko-devel/.mtn2git_empty)0
-rw-r--r--packages/bluez/bluez-utils-3.28/hciattach-ti-bts.patch477
-rw-r--r--packages/bluez/bluez-utils-alsa_3.28.bb25
-rw-r--r--packages/bluez/bluez-utils_3.28.bb30
-rw-r--r--packages/busybox/busybox-1.9.1/openmoko/defconfig777
-rw-r--r--packages/c-nc/.mtn2git_empty (renamed from packages/nano/nano-1.2.1/.mtn2git_empty)0
-rw-r--r--packages/c-nc/c-nc_0.5.bb19
-rw-r--r--packages/cellwriter/.mtn2git_empty (renamed from packages/nano/nano-2.0.6/.mtn2git_empty)0
-rw-r--r--packages/cellwriter/cellwriter_1.3.3.bb13
-rw-r--r--packages/ckermit/ckermit_211.bb9
-rw-r--r--packages/cmake/cmake-native_2.4.8.bb10
-rw-r--r--packages/cmake/cmake.inc1
-rw-r--r--packages/curl/curl_7.16.4.bb2
-rw-r--r--packages/curl/files/pkgconfig_fix.patch25
-rw-r--r--packages/db/db-native_4.2.52.bb14
-rw-r--r--packages/db/db_4.2.52.bb2
-rw-r--r--packages/dbus/dbus-native_1.0.3.bb2
-rw-r--r--packages/directfb/++dfb_1.0.0.bb4
-rw-r--r--packages/directfb/directfb-examples_1.0.0.bb5
-rw-r--r--packages/dt/.mtn2git_empty (renamed from packages/netbase/netbase/ghi270/.mtn2git_empty)0
-rw-r--r--packages/dt/dt_15.14.bb18
-rw-r--r--packages/e2fsprogs/e2fsprogs.inc3
-rw-r--r--packages/e2fsprogs/e2fsprogs_1.38.bb6
-rw-r--r--packages/espeak/espeak-data_1.35.bb30
-rw-r--r--packages/espeak/espeak.inc7
-rw-r--r--packages/espeak/espeak_1.30.bb52
-rw-r--r--packages/espeak/espeak_1.35.bb45
-rw-r--r--packages/freesmartphone/gsm0710muxd_svn.bb3
-rw-r--r--packages/gcc/gcc-3.3.3.inc39
-rw-r--r--packages/gcc/gcc-3.3.4.inc18
-rw-r--r--packages/gcc/gcc-3.4.3.inc18
-rw-r--r--packages/gcc/gcc-3.4.4.inc23
-rw-r--r--packages/gcc/gcc-4.0.0.inc9
-rw-r--r--packages/gcc/gcc-4.0.2.inc29
-rw-r--r--packages/gcc/gcc-4.1.0.inc19
-rw-r--r--packages/gcc/gcc-4.1.1.inc45
-rw-r--r--packages/gcc/gcc-4.1.2.inc58
-rw-r--r--packages/gcc/gcc-4.2.1.inc94
-rw-r--r--packages/gcc/gcc-4.2.2.inc73
-rw-r--r--packages/gcc/gcc-4.3.0.inc53
-rw-r--r--packages/gcc/gcc-4.3.0/.mtn2git_empty (renamed from packages/openmoko-projects/tangogps/.mtn2git_empty)0
-rw-r--r--packages/gcc/gcc-4.3.0/100-uclibc-conf.patch200
-rw-r--r--packages/gcc/gcc-4.3.0/103-uclibc-conf-noupstream.patch11
-rw-r--r--packages/gcc/gcc-4.3.0/110-arm-eabi.patch27
-rw-r--r--packages/gcc/gcc-4.3.0/200-uclibc-locale.patch2790
-rw-r--r--packages/gcc/gcc-4.3.0/203-uclibc-locale-no__x.patch213
-rw-r--r--packages/gcc/gcc-4.3.0/204-uclibc-locale-wchar_fix.patch48
-rw-r--r--packages/gcc/gcc-4.3.0/205-uclibc-locale-update.patch347
-rw-r--r--packages/gcc/gcc-4.3.0/300-libstdc++-pic.patch46
-rw-r--r--packages/gcc/gcc-4.3.0/301-missing-execinfo_h.patch11
-rw-r--r--packages/gcc/gcc-4.3.0/302-c99-snprintf.patch11
-rw-r--r--packages/gcc/gcc-4.3.0/303-c99-complex-ugly-hack.patch12
-rw-r--r--packages/gcc/gcc-4.3.0/304-index_macro.patch24
-rw-r--r--packages/gcc/gcc-4.3.0/305-libmudflap-susv3-legacy.patch49
-rw-r--r--packages/gcc/gcc-4.3.0/306-libstdc++-namespace.patch36
-rw-r--r--packages/gcc/gcc-4.3.0/307-locale_facets.patch26
-rw-r--r--packages/gcc/gcc-4.3.0/402-libbackend_dep_gcov-iov.h.patch13
-rw-r--r--packages/gcc/gcc-4.3.0/602-sdk-libstdc++-includes.patch20
-rw-r--r--packages/gcc/gcc-4.3.0/740-sh-pr24836.patch25
-rw-r--r--packages/gcc/gcc-4.3.0/800-arm-bigendian.patch67
-rw-r--r--packages/gcc/gcc-4.3.0/801-arm-bigendian-eabi.patch14
-rw-r--r--packages/gcc/gcc-4.3.0/904-flatten-switch-stmt-00.patch153
-rw-r--r--packages/gcc/gcc-4.3.0/arm-nolibfloat.patch24
-rw-r--r--packages/gcc/gcc-4.3.0/arm-softfloat.patch16
-rw-r--r--packages/gcc/gcc-4.3.0/arm-thumb-cache.patch29
-rw-r--r--packages/gcc/gcc-4.3.0/arm-thumb.patch64
-rw-r--r--packages/gcc/gcc-4.3.0/cache-amnesia.patch13
-rw-r--r--packages/gcc/gcc-4.3.0/fix-ICE-in-arm_unwind_emit_set.diff28
-rw-r--r--packages/gcc/gcc-4.3.0/fortran-cross-compile-hack.patch30
-rw-r--r--packages/gcc/gcc-4.3.0/fortran-static-linking.patch48
-rw-r--r--packages/gcc/gcc-4.3.0/gcc-4.0.2-e300c2c3.patch311
-rw-r--r--packages/gcc/gcc-4.3.0/gcc41-configure.in.patch22
-rw-r--r--packages/gcc/gcc-4.3.0/intermask-bigendian.patch24
-rw-r--r--packages/gcc/gcc-4.3.0/ldflags.patch22
-rw-r--r--packages/gcc/gcc-4.3.0/pr34130.patch16
-rw-r--r--packages/gcc/gcc-4.3.0/sdk-libstdc++-includes.patch22
-rw-r--r--packages/gcc/gcc-4.3.0/sh3-installfix-fixheaders.patch11
-rw-r--r--packages/gcc/gcc-4.3.0/unbreak-armv4t.patch12
-rw-r--r--packages/gcc/gcc-4.3.0/zecke-no-host-includes.patch31
-rw-r--r--packages/gcc/gcc-4.3.0/zecke-xgcc-cpp.patch16
-rw-r--r--packages/gcc/gcc-common.inc35
-rw-r--r--packages/gcc/gcc-configure-common.inc (renamed from packages/gcc/gcc3-build.inc)29
-rw-r--r--packages/gcc/gcc-configure-cross.inc (renamed from packages/gcc/gcc3-build-cross.inc)10
-rw-r--r--packages/gcc/gcc-configure-sdk.inc (renamed from packages/gcc/gcc4-build-sdk.inc)5
-rw-r--r--packages/gcc/gcc-configure-target.inc6
-rw-r--r--packages/gcc/gcc-cross-initial.inc6
-rw-r--r--packages/gcc/gcc-cross-initial_4.3.0.bb5
-rw-r--r--packages/gcc/gcc-cross-initial_csl-arm-cvs.bb2
-rw-r--r--packages/gcc/gcc-cross-kernel-3.3.3_3.3.3.bb17
-rw-r--r--packages/gcc/gcc-cross-kernel-3.3.4_3.3.4.bb17
-rw-r--r--packages/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb17
-rw-r--r--packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb17
-rw-r--r--packages/gcc/gcc-cross-kernel.inc14
-rw-r--r--packages/gcc/gcc-cross-sdk.inc4
-rw-r--r--packages/gcc/gcc-cross-sdk_3.3.4.bb16
-rw-r--r--packages/gcc/gcc-cross-sdk_3.4.3.bb18
-rw-r--r--packages/gcc/gcc-cross-sdk_3.4.4.bb18
-rw-r--r--packages/gcc/gcc-cross-sdk_4.1.0.bb18
-rw-r--r--packages/gcc/gcc-cross-sdk_4.1.1.bb18
-rw-r--r--packages/gcc/gcc-cross-sdk_4.1.2.bb13
-rw-r--r--packages/gcc/gcc-cross-sdk_4.2.2.bb15
-rw-r--r--packages/gcc/gcc-cross-sdk_4.3.0.bb14
-rw-r--r--packages/gcc/gcc-cross.inc12
-rw-r--r--packages/gcc/gcc-cross4.inc3
-rw-r--r--packages/gcc/gcc-cross_3.3.3.bb97
-rw-r--r--packages/gcc/gcc-cross_3.3.4.bb13
-rw-r--r--packages/gcc/gcc-cross_3.4.3.bb16
-rw-r--r--packages/gcc/gcc-cross_3.4.4.bb16
-rw-r--r--packages/gcc/gcc-cross_4.0.0.bb16
-rw-r--r--packages/gcc/gcc-cross_4.0.2.bb16
-rw-r--r--packages/gcc/gcc-cross_4.1.0.bb16
-rw-r--r--packages/gcc/gcc-cross_4.1.1.bb16
-rw-r--r--packages/gcc/gcc-cross_4.1.2.bb18
-rw-r--r--packages/gcc/gcc-cross_4.2.1.bb20
-rw-r--r--packages/gcc/gcc-cross_4.2.2.bb19
-rw-r--r--packages/gcc/gcc-cross_4.3.0.bb15
-rw-r--r--packages/gcc/gcc-cross_csl-arm-2005q3.bb15
-rw-r--r--packages/gcc/gcc-cross_csl-arm-cvs.bb15
-rw-r--r--packages/gcc/gcc-cross_csl-arm.bb15
-rw-r--r--packages/gcc/gcc-csl-arm-2005q3.inc22
-rw-r--r--packages/gcc/gcc-fpu.inc6
-rw-r--r--packages/gcc/gcc-native.inc2
-rw-r--r--packages/gcc/gcc-native_3.4.4.bb5
-rw-r--r--packages/gcc/gcc-package-cross.inc12
-rw-r--r--packages/gcc/gcc-package-sdk.inc14
-rw-r--r--packages/gcc/gcc-package-target.inc (renamed from packages/gcc/gcc-package.inc)14
-rw-r--r--packages/gcc/gcc-paths-cross.inc7
-rw-r--r--packages/gcc/gcc3-build-sdk.inc29
-rw-r--r--packages/gcc/gcc4-build.inc4
-rw-r--r--packages/gcc/gcc_3.3.3.bb193
-rw-r--r--packages/gcc/gcc_3.3.4.bb172
-rw-r--r--packages/gcc/gcc_3.4.3.bb29
-rw-r--r--packages/gcc/gcc_3.4.4.bb34
-rw-r--r--packages/gcc/gcc_4.0.0.bb17
-rw-r--r--packages/gcc/gcc_4.0.2.bb38
-rw-r--r--packages/gcc/gcc_4.1.0.bb28
-rw-r--r--packages/gcc/gcc_4.1.1.bb62
-rw-r--r--packages/gcc/gcc_4.1.2.bb77
-rw-r--r--packages/gcc/gcc_4.2.1.bb113
-rw-r--r--packages/gcc/gcc_4.2.2.bb96
-rw-r--r--packages/gcc/gcc_4.3.0.bb10
-rw-r--r--packages/gcc/gcc_csl-arm-2005q3.bb30
-rw-r--r--packages/gcc/gcc_csl-arm-cvs.bb10
-rw-r--r--packages/gcc/gcc_csl-arm.bb22
-rw-r--r--packages/gettext/gettext_0.14.1.bb9
-rw-r--r--packages/glib-2.0/glib-2.0-2.16.1/.mtn2git_empty (renamed from packages/sqlite/sqlite3-3.3.17/.mtn2git_empty)0
-rw-r--r--packages/glib-2.0/glib-2.0-2.16.1/configure-libtool.patch29
-rw-r--r--packages/glib-2.0/glib-2.0_2.16.1.bb6
-rw-r--r--packages/glibc/eglibc-initial_svn.bb2
-rw-r--r--packages/glibc/eglibc_svn.bb53
-rw-r--r--packages/glibc/glibc-initial.inc4
-rw-r--r--packages/glibc/glibc-initial_2.5.bb2
-rw-r--r--packages/glibc/glibc_2.2.5.bb2
-rw-r--r--packages/glibc/glibc_2.3.2+cvs20040726.bb2
-rw-r--r--packages/glibc/glibc_2.3.2.bb2
-rw-r--r--packages/glibc/glibc_2.3.3+cvs20041128.bb2
-rw-r--r--packages/glibc/glibc_2.3.3+cvs20050221.bb2
-rw-r--r--packages/glibc/glibc_2.3.3+cvs20050420.bb2
-rw-r--r--packages/glibc/glibc_2.3.3.bb2
-rw-r--r--packages/glibc/glibc_2.3.5+cvs20050627.bb2
-rw-r--r--packages/glibc/glibc_cvs.bb2
-rw-r--r--packages/gnome/gnome-vfs-2.22.0/.mtn2git_empty (renamed from packages/sqlite/sqlite3-3.4.1/.mtn2git_empty)0
-rw-r--r--packages/gnome/gnome-vfs-2.22.0/gconftool-lossage.patch11
-rw-r--r--packages/gnome/gnome-vfs-2.22.0/gnome-vfs-no-kerberos.patch51
-rw-r--r--packages/gnome/gnome-vfs_2.22.0.bb42
-rw-r--r--packages/gnome/libbonobo.inc (renamed from packages/gnome/libbonobo_2.14.0.bb)12
-rw-r--r--packages/gnome/libbonobo_2.10.0.bb60
-rw-r--r--packages/gnome/libbonobo_2.22.0.bb6
-rw-r--r--packages/gnome/libbonobo_2.6.0.bb53
-rw-r--r--packages/gnome/libbonobo_2.6.2.bb60
-rw-r--r--packages/gnome/orbit2-native_2.14.12.bb (renamed from packages/gnome/orbit2-native_2.14.0.bb)1
-rw-r--r--packages/gnome/orbit2_2.14.12.bb (renamed from packages/gnome/orbit2_2.14.0.bb)15
-rw-r--r--packages/gnutls/gnutls.inc4
-rw-r--r--packages/gnutls/gnutls_1.4.5.bb2
-rw-r--r--packages/gnutls/gnutls_1.6.3.bb2
-rw-r--r--packages/gpe-su/gpe-su.inc8
-rw-r--r--packages/gpe-su/gpe-su_0.11.bb13
-rw-r--r--packages/gpe-su/gpe-su_0.14.bb11
-rw-r--r--packages/gpe-su/gpe-su_0.15.bb11
-rw-r--r--packages/gpe-su/gpe-su_0.18.bb11
-rw-r--r--packages/gpe-su/gpe-su_0.19.bb11
-rw-r--r--packages/gpe-su/gpe-su_svn.bb7
-rw-r--r--packages/gpsdrive/files/gpsdrive.desktop8
-rw-r--r--packages/gpsdrive/gpsdrive-pda_2.10pre2.bb23
-rw-r--r--packages/gpsdrive/gpsdrive.inc25
-rw-r--r--packages/gpsdrive/gpsdrive_2.10pre2.bb25
-rw-r--r--packages/gpsdrive/gpsdrive_2.10pre3.bb29
-rw-r--r--packages/gpsdrive/gpsdrive_2.10pre4.bb21
-rw-r--r--packages/gpsdrive/gpsdrive_cvs.bb32
-rw-r--r--packages/gstreamer/gst-plugins-bad_0.10.3.bb5
-rw-r--r--packages/gstreamer/gst-plugins-bad_0.10.6.bb (renamed from packages/gstreamer/gst-plugins-bad_0.10.5.bb)2
-rw-r--r--packages/gstreamer/gst-plugins-base_0.10.12.bb12
-rw-r--r--packages/gstreamer/gst-plugins-base_0.10.14.bb12
-rw-r--r--packages/gstreamer/gst-plugins-good_0.10.6.bb5
-rw-r--r--packages/gstreamer/gst-plugins-good_0.10.7.bb (renamed from packages/gstreamer/gst-plugins-good_0.10.5.bb)1
-rw-r--r--packages/gstreamer/gst-plugins-ugly_0.10.6.bb9
-rw-r--r--packages/gstreamer/gst-plugins-ugly_0.10.7.bb10
-rw-r--r--packages/gstreamer/gst-plugins.inc3
-rw-r--r--packages/gstreamer/gstreamer/po-makefile-fix.patch13
-rw-r--r--packages/gstreamer/gstreamer_0.10.12.bb3
-rw-r--r--packages/gstreamer/gstreamer_0.10.14.bb3
-rw-r--r--packages/gstreamer/gstreamer_0.10.17.bb5
-rw-r--r--packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb1
-rw-r--r--packages/gtk+/gtk+.inc3
-rw-r--r--packages/gtk+/gtk+_2.12.0.bb2
-rw-r--r--packages/gtk+/gtk+_2.12.3.bb2
-rw-r--r--packages/images/liveramdisk-image.bb7
-rw-r--r--packages/images/openmoko-image.bb3
-rw-r--r--packages/images/opie-image-16mb.bb4
-rw-r--r--packages/images/opie-image.bb4
-rw-r--r--packages/initrdscripts/files/01-bootldr-buster.sh41
-rw-r--r--packages/initrdscripts/files/30-bootmenu.sh25
-rw-r--r--packages/initrdscripts/files/87-kexecboot.sh6
-rw-r--r--packages/initrdscripts/files/init.sh23
-rw-r--r--packages/initrdscripts/initramfs-jffs2/jffs2boot.sh1
-rw-r--r--packages/initrdscripts/initramfs-jffs2_0.1.bb3
-rw-r--r--packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb12
-rw-r--r--packages/initrdscripts/initramfs-module-bootmenu_1.0.bb4
-rw-r--r--packages/initrdscripts/initramfs-module-kexecboot_1.0.bb2
-rw-r--r--packages/initrdscripts/initramfs-uniboot_1.0.bb2
-rw-r--r--packages/iptables/files/iptables-use-s6_addr32.patch32
-rw-r--r--packages/iptables/iptables_1.3.8.bb3
-rw-r--r--packages/ixp4xx/ixp4xx-npe_2.3.2.bb2
-rw-r--r--packages/ixp4xx/ixp4xx-npe_2.4.bb2
-rw-r--r--packages/keymaps/files/poodle/keymap-2.6.map16
-rw-r--r--packages/keymaps/files/tosa/keymap-2.6.map350
-rw-r--r--packages/keymaps/keymaps_1.0.bb2
-rw-r--r--packages/kismet/kismet-2007-10-R1/fix_strip.patch47
-rw-r--r--packages/klibc/files/fstype-sane-and-vfat-jffs2.patch68
-rw-r--r--packages/klibc/files/losetup.patch571
-rw-r--r--packages/klibc/files/modprobe.patch1985
-rw-r--r--packages/klibc/klibc-common.inc2
-rw-r--r--packages/klibc/klibc-utils-fstype-static_1.1.1.bb14
-rw-r--r--packages/klibc/klibc-utils-static_1.5.bb10
-rw-r--r--packages/klibc/klibc.inc11
-rw-r--r--packages/klibc/klibc_1.5.bb2
-rw-r--r--packages/less/less_382.bb22
-rw-r--r--packages/less/less_418.bb (renamed from packages/less/less_406.bb)2
-rw-r--r--packages/libc-client/files/.mtn2git_empty (renamed from packages/tslib/tslib-1.0/.mtn2git_empty)0
-rw-r--r--packages/libc-client/files/quote_cctype.patch12
-rw-r--r--packages/libc-client/libc-client_2007.bb4
-rw-r--r--packages/libeventdb/libeventdb-0.90/.mtn2git_empty (renamed from packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/.mtn2git_empty)0
-rw-r--r--packages/libeventdb/libeventdb-0.90/libeventdb-unbreak-LIVE-macro.patch11
-rw-r--r--packages/libeventdb/libeventdb_0.90.bb3
-rw-r--r--packages/libgee/.mtn2git_empty (renamed from packages/xorg-app/xev-1.0.2/.mtn2git_empty)0
-rw-r--r--packages/libgee/files/.mtn2git_empty0
-rw-r--r--packages/libgee/files/no-tests.patch12
-rw-r--r--packages/libgee/libgee_0.1.2.bb12
-rw-r--r--packages/libidl/libidl-native_0.8.10.bb (renamed from packages/libidl/libidl-native_0.8.6.bb)0
-rw-r--r--packages/libidl/libidl.inc (renamed from packages/libidl/libidl_0.8.6.bb)8
-rw-r--r--packages/libidl/libidl_0.8.10.bb8
-rw-r--r--packages/libidl/libidl_0.8.2.bb11
-rw-r--r--packages/libidl/libidl_0.8.3.bb18
-rw-r--r--packages/libol/libol_0.3.16.bb15
-rw-r--r--packages/libol/libol_0.3.18.bb12
-rw-r--r--packages/libpcre/files/.mtn2git_empty0
-rw-r--r--packages/libpcre/files/native-rpath-link.patch19
-rw-r--r--packages/libpcre/libpcre-native_4.4.bb11
-rw-r--r--packages/libsdl/libsdl.inc1
-rw-r--r--packages/libtool/libtool-cross_1.5.10.bb13
-rw-r--r--packages/libtool/libtool-cross_1.5.22.bb2
-rw-r--r--packages/libtool/libtool-cross_1.5.24.bb2
-rw-r--r--packages/libtool/libtool-native_1.5.10.bb7
-rw-r--r--packages/libtool/libtool-native_1.5.22.bb2
-rw-r--r--packages/libtool/libtool-native_1.5.24.bb3
-rw-r--r--packages/libtool/libtool.inc8
-rw-r--r--packages/libtool/libtool_1.5.10.bb8
-rw-r--r--packages/libtool/libtool_1.5.22.bb8
-rw-r--r--packages/libtool/libtool_1.5.24.bb8
-rw-r--r--packages/libtool/libtool_1.5.6.bb8
-rw-r--r--packages/libxslt/files/pkgconfig_fix.patch22
-rw-r--r--packages/libxslt/libxslt_1.1.22.bb11
-rw-r--r--packages/linux/gumstix-linux.inc13
-rw-r--r--packages/linux/linux-2.6.24/at32stk1000/.mtn2git_empty0
-rw-r--r--packages/linux/linux-2.6.24/at32stk1000/defconfig1186
-rw-r--r--packages/linux/linux-2.6.24/atngw100/.mtn2git_empty0
-rw-r--r--packages/linux/linux-2.6.24/atngw100/defconfig1223
-rw-r--r--packages/linux/linux-2.6.24/mpc8313e-rdb/defconfig2
-rw-r--r--packages/linux/linux-2.6.24/simpad/linux-2.6.24-SIMpad-rtc-sa1100.patch28
-rw-r--r--packages/linux/linux-beagleboard/.mtn2git_empty0
-rw-r--r--packages/linux/linux-beagleboard/defconfig805
-rw-r--r--packages/linux/linux-beagleboard_git.bb12
-rw-r--r--packages/linux/linux-handhelds-2.6.inc21
-rw-r--r--packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb4
-rw-r--r--packages/linux/linux-mainstone/.mtn2git_empty0
-rw-r--r--packages/linux/linux-mainstone/mainstone-keypad.patch7631
-rw-r--r--packages/linux/linux-mainstone/mainstone/.mtn2git_empty0
-rw-r--r--packages/linux/linux-mainstone/mainstone/defconfig1608
-rw-r--r--packages/linux/linux-mainstone_2.6.25-rc4.bb25
-rw-r--r--packages/linux/linux-omap.inc36
-rw-r--r--packages/linux/linux-openmoko_2.6.22.5.bb22
-rw-r--r--packages/linux/linux-openmoko_2.6.24.bb12
-rw-r--r--packages/linux/linux-rp-2.6.24/defconfig-tosa1728
-rw-r--r--packages/linux/linux-rp-2.6.24/htcuni.patch332
-rw-r--r--packages/linux/linux-rp-2.6.24/sharpsl-rc-r1.patch42
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/.mtn2git_empty0
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch201
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch260
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0003-Core-MFD-support.patch243
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0004-Add-support-for-tc6393xb-MFD-core.patch907
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0005-Add-support-for-tc6387xb-MFD-core.patch249
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0006-Add-support-for-t7l66xb-MFD-core.patch653
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch81
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0008-Nand-driver-for-TMIO-devices.patch608
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0009-FB-driver-for-TMIO-devices.patch1128
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0010-OHCI-driver-for-TMIO-devices.patch431
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0011-MMC-driver-for-TMIO-devices.patch891
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0012-Tosa-keyboard-support.patch593
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch61
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0014-tosa_udc_use_gpio_vbus.patch.patch38
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0015-sharpsl-export-params.patch32
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch44
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch280
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch225
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0019-pxa-remove-periodic-mode-emulation-support.patch128
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch257
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch121
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch746
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch498
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch238
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch434
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch134
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch59
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch72
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch163
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0030-Core-driver-for-WM97xx-touchscreens.patch1083
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch383
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch492
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch490
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch329
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch122
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch35
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch41
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch57
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0039-Add-generic-framework-for-managing-clocks.patch446
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0040-Clocklib-debugfs-support.patch108
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch593
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch26
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch153
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0044-fix-tmio_mmc-debug-compilation.patch26
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0045-Update-tmio_ohci.patch416
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch66
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch412
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0048-tc6393xb-GPIO-support.patch225
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0049-platform-support-for-TMIO-on-tosa.patch373
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0050-tosa-update-for-tc6393xb-gpio.patch99
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch86
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0052-tosa-platform-backlight-support.patch400
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0053-sound-soc-codecs-wm9712.c-28.patch56
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0054-sound-soc-codecs-wm9712.c-2.patch28
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch30
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch126
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0057-Clean-up-tosa-resetting.patch70
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0058-Fix-tosakbd-suspend.patch27
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0059-patch-tosa-wakeup-test.patch46
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0060-Add-support-for-power_supply-on-tosa.patch623
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0061-tosa-bat-unify.patch342
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0062-tosa-bat-fix-charging.patch78
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0063-patch-tosa-bat-jacket-detect.patch84
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0064-Export-modes-via-sysfs.patch27
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0065-wm97xx-core-fixes.patch49
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0066-tmiofb_probe-should-be-__devinit.patch26
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0067-modeswitching.patch225
-rw-r--r--packages/linux/linux-rp-2.6.24/tosa/0068-Preliminary-tosa-denoiser.patch239
-rw-r--r--packages/linux/linux-rp_2.6.24.bb99
-rw-r--r--packages/linux/linux.inc1
-rw-r--r--packages/linux/linux_2.6.24.bb19
-rw-r--r--packages/man-pages/man-pages_2.41.bb2
-rw-r--r--packages/man-pages/man-pages_2.79.bb15
-rw-r--r--packages/maradns/maradns_1.0.41.bb43
-rw-r--r--packages/meta/cross-linkage_1.0.bb11
-rw-r--r--packages/meta/external-toolchain.bb1
-rw-r--r--packages/meta/meta-toolchain.bb12
-rw-r--r--packages/meta/staging-linkage_1.0.bb3
-rw-r--r--packages/mono/mono-mcs-intermediate.inc2
-rw-r--r--packages/mpeg2dec/mpeg2dec_0.4.0b.bb2
-rw-r--r--packages/mplayer/mplayer_0.0+1.0rc1.bb5
-rw-r--r--packages/mplayer/mplayer_0.0+1.0rc2.bb8
-rw-r--r--packages/nano/files/.mtn2git_empty0
-rw-r--r--packages/nano/files/glib.m4 (renamed from packages/nano/nano-1.2.1/glib.m4)0
-rw-r--r--packages/nano/nano-1.2.1/configure.patch1116
-rw-r--r--packages/nano/nano-2.0.6/glib.m4196
-rw-r--r--packages/nano/nano_1.2.1.bb16
-rw-r--r--packages/nano/nano_2.0.7.bb (renamed from packages/nano/nano_2.0.6.bb)3
-rw-r--r--packages/ncdu/.mtn2git_empty0
-rw-r--r--packages/ncdu/ncdu_1.3.bb6
-rw-r--r--packages/ncftp/ncftp_3.2.0.bb2
-rw-r--r--packages/ncurses/ncurses-native_5.4.bb12
-rw-r--r--packages/ncurses/ncurses.inc36
-rw-r--r--packages/ncurses/ncurses_5.3.bb11
-rw-r--r--packages/ncurses/ncurses_5.4.bb4
-rw-r--r--packages/net-snmp/net-snmp_5.4.1.bb3
-rw-r--r--packages/omniorb/omniorb_4.0.7.bb2
-rw-r--r--packages/openmoko-projects/diversity-daemon_svn.bb2
-rw-r--r--packages/openmoko-projects/diversity-nav_svn.bb2
-rw-r--r--packages/openmoko-projects/illume/illume-fix-includes.patch70
-rw-r--r--packages/openmoko-projects/illume/include-path.diff16
-rw-r--r--packages/openmoko-projects/illume_svn.bb33
-rw-r--r--packages/openmoko-projects/tangogps/global-config-h.patch30
-rw-r--r--packages/openmoko-projects/tangogps_0.7.bb17
-rw-r--r--packages/openmoko2/openmoko-session2.bb35
-rw-r--r--packages/openmoko2/settingsgui_0.8.bb10
-rw-r--r--packages/openttd/openttd_0.4.0.1.bb33
-rw-r--r--packages/openvpn/openvpn.inc21
-rw-r--r--packages/openvpn/openvpn_1.5.0.bb18
-rw-r--r--packages/openvpn/openvpn_1.6.0.bb20
-rw-r--r--packages/openvpn/openvpn_2.0.2.bb23
-rw-r--r--packages/openvpn/openvpn_2.0.9.bb23
-rw-r--r--packages/openvpn/openvpn_2.0.bb23
-rw-r--r--packages/opkg/opkg-collateral.bb22
-rw-r--r--packages/opkg/opkg-collateral/.mtn2git_empty0
-rw-r--r--packages/opkg/opkg-collateral/dest1
-rw-r--r--packages/opkg/opkg-collateral/lists2
-rw-r--r--packages/opkg/opkg-collateral/opkg.conf.comments23
-rw-r--r--packages/opkg/opkg-collateral/src0
-rw-r--r--packages/opkg/opkg-native_svn.bb8
-rw-r--r--packages/opkg/opkg-sdk_svn.bb7
-rw-r--r--packages/opkg/opkg.inc15
-rw-r--r--packages/opkg/opkg_svn.bb42
-rw-r--r--packages/packagekit/packagekit_git.bb2
-rw-r--r--packages/pango/files/pkgconfig_fixes.patch (renamed from packages/pango/pango-1.18.3/pkgconfig_fixes.patch)0
-rw-r--r--packages/pango/pango_1.8.2.bb3
-rw-r--r--packages/perl/libxml-parser-perl-native_2.34.bb3
-rw-r--r--packages/popt/popt-native_1.13.bb16
-rw-r--r--packages/popt/popt-native_1.7.bb19
-rw-r--r--packages/popt/popt.inc5
-rw-r--r--packages/popt/popt_1.13.bb16
-rw-r--r--packages/popt/popt_1.7.bb19
-rw-r--r--packages/pv/.mtn2git_empty0
-rw-r--r--packages/pv/pv_1.1.4.bb11
-rw-r--r--packages/pwgen/.mtn2git_empty0
-rw-r--r--packages/pwgen/pwgen_2.06.bb7
-rw-r--r--packages/python/python-gsmd_svn.bb4
-rw-r--r--packages/python/python-lightmediascanner_svn.bb2
-rw-r--r--packages/python/python-pyiw_0.3.3.bb15
-rw-r--r--packages/qt4/qt4-x11-free.inc2
-rw-r--r--packages/qt4/qt_packaging.inc9
-rw-r--r--packages/qt4/qt_staging.inc29
-rw-r--r--packages/qt4/qtopia-core.inc2
-rw-r--r--packages/qtopia-phone/qtopia-phone-x11_4.3.1.bb4
-rw-r--r--packages/quagga/quagga.inc2
-rw-r--r--packages/quagga/quagga_0.99.6.bb2
-rw-r--r--packages/quagga/quagga_0.99.7.bb4
-rw-r--r--packages/quagga/quagga_0.99.8.bb4
-rw-r--r--packages/rsync/files/m4.patch33
-rw-r--r--packages/rsync/rsync.inc16
-rw-r--r--packages/rsync/rsync_2.6.9.bb19
-rw-r--r--packages/rsync/rsync_3.0.0.bb11
-rw-r--r--packages/setserial/setserial_2.17.bb18
-rw-r--r--packages/smartmontools/smartmontools_5.38.bb1
-rw-r--r--packages/speech-dispatcher/files/configure_fix.patch46
-rw-r--r--packages/speech-dispatcher/speech-dispatcher_0.6.6.bb (renamed from packages/speech-dispatcher/speech-dispatcher_0.6.5.bb)5
-rwxr-xr-xpackages/stage-manager/files/stage-manager23
-rw-r--r--packages/stage-manager/stagemanager-native_0.0.1.bb5
-rw-r--r--packages/starling/starling_0.1.bb22
-rw-r--r--packages/starling/starling_0.2.bb21
-rw-r--r--packages/starling/starling_svn.bb2
-rw-r--r--packages/strace/strace-4.5.14/strace-4.5.14-add-syscalls-up-to-sysvipc.patch75
-rw-r--r--packages/strace/strace-4.5.14/strace-4.5.14-avr32.patch2701
-rw-r--r--packages/strace/strace-4.5.15/.mtn2git_empty0
-rw-r--r--packages/strace/strace-4.5.15/strace-4.5.15.atmel.1.patch14842
-rw-r--r--packages/strace/strace_4.5.14.bb10
-rw-r--r--packages/strace/strace_4.5.15.bb18
-rw-r--r--packages/subversion/subversion_1.4.5.bb7
-rw-r--r--packages/syslog-ng/syslog-ng_2.0.5.bb2
-rw-r--r--packages/sysvinit/sysvinit_2.86.bb34
-rw-r--r--packages/tasks/task-base.bb3
-rw-r--r--packages/tasks/task-gpe.bb4
-rw-r--r--packages/tasks/task-openmoko-ui.bb1
-rw-r--r--packages/tasks/task-python-everything.bb10
-rw-r--r--packages/tasks/task-slugos.bb3
-rw-r--r--packages/thttpd/thttpd_2.25b.bb1
-rw-r--r--packages/tzdata/tzdata_2007k.bb8
-rw-r--r--packages/u-boot/u-boot-openmoko_1.3.1+git+svn.bb2
-rw-r--r--packages/uclibc/uclibc-0.9.29/avr32/.mtn2git_empty0
-rw-r--r--packages/uclibc/uclibc-0.9.29/avr32/uClibc.machine50
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-avr32-bzero.patch11
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-nonposix_bashisms.patch13
-rw-r--r--packages/uclibc/uclibc-initial_0.9.29.bb1
-rw-r--r--packages/uclibc/uclibc.inc2
-rw-r--r--packages/uclibc/uclibc_0.9.29.bb5
-rw-r--r--packages/update-alternatives/update-alternatives-cworth-native_0.99.154.bb2
-rw-r--r--packages/update-alternatives/update-alternatives-cworth.inc2
-rw-r--r--packages/update-alternatives/update-alternatives-cworth_0.99.154.bb2
-rw-r--r--packages/update-alternatives/update-alternatives-dpkg-native_1.13.22.bb2
-rw-r--r--packages/vpnc/files/makeman.patch11
-rw-r--r--packages/vpnc/files/vpnc0.5.1--long-help173
-rw-r--r--packages/vpnc/vpnc.inc19
-rw-r--r--packages/vpnc/vpnc_0.3.2.bb16
-rw-r--r--packages/vpnc/vpnc_0.3.3.bb22
-rw-r--r--packages/vpnc/vpnc_0.5.1.bb8
-rw-r--r--packages/vte/vte_0.16.13.bb1
-rw-r--r--packages/wireless-tools/wireless-tools.inc18
-rw-r--r--packages/wireless-tools/wireless-tools_28+29pre10.bb14
-rw-r--r--packages/wireless-tools/wireless-tools_28+29pre21.bb16
-rw-r--r--packages/wireless-tools/wireless-tools_28.bb14
-rw-r--r--packages/wireless-tools/wireless-tools_29.bb3
-rw-r--r--packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/.mtn2git_empty0
-rw-r--r--packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/config.in (renamed from packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/config.in)0
-rw-r--r--packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/only-the-modules.patch (renamed from packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/only-the-modules.patch)0
-rw-r--r--packages/wlan-ng/wlan-ng-modules.inc2
-rw-r--r--packages/wlan-ng/wlan-ng-modules_0.2.1-pre26.bb29
-rw-r--r--packages/wlan-ng/wlan-ng-modules_0.2.8+svn20080315.bb (renamed from packages/wlan-ng/wlan-ng-modules_0.2.8+svn20071030.bb)2
-rw-r--r--packages/xorg-app/mkcomposecache_1.2.bb3
-rw-r--r--packages/xorg-app/mkfontdir-native_1.0.4.bb8
-rw-r--r--packages/xorg-app/mkfontdir_1.0.4.bb8
-rw-r--r--packages/xorg-app/mkfontscale-native_1.0.4.bb7
-rw-r--r--packages/xorg-app/mkfontscale_1.0.4.bb5
-rw-r--r--packages/xorg-app/twm_1.0.4.bb11
-rw-r--r--packages/xorg-app/x11perf_1.5.bb7
-rw-r--r--packages/xorg-app/xauth_1.0.3.bb5
-rw-r--r--packages/xorg-app/xcompmgr_1.1.4.bb6
-rw-r--r--packages/xorg-app/xdm_1.1.7.bb10
-rw-r--r--packages/xorg-app/xev-1.0.2/diet-x11.patch80
-rw-r--r--packages/xorg-app/xev/diet-x11.patch38
-rw-r--r--packages/xorg-app/xev_1.0.3.bb7
-rw-r--r--packages/xorg-app/xfontsel_1.0.2.bb4
-rw-r--r--packages/xorg-app/xfs_1.0.6.bb5
-rw-r--r--packages/xorg-app/xinit_1.0.8.bb6
-rw-r--r--packages/xorg-app/xinput_1.3.0.bb4
-rw-r--r--packages/xorg-app/xkbcomp_1.0.4.bb5
-rw-r--r--packages/xorg-app/xprop_1.0.4.bb6
-rw-r--r--packages/xorg-app/xrandr_1.2.3.bb8
-rw-r--r--packages/xorg-app/xrdb_1.0.5.bb6
-rw-r--r--packages/xorg-app/xset_1.0.4.bb11
-rw-r--r--packages/xorg-driver/xf86-input-aiptek_1.1.1.bb2
-rw-r--r--packages/xorg-driver/xf86-video-ati_6.8.0.bb5
-rw-r--r--packages/xorg-driver/xf86-video-intel_2.2.1.bb5
-rw-r--r--packages/xorg-driver/xf86-video-nv_2.1.8.bb4
-rw-r--r--packages/xorg-font/font-xfree86-type1_1.0.1.bb3
-rw-r--r--packages/xorg-lib/libxext_1.0.4.bb8
-rw-r--r--packages/xorg-lib/xtrans_1.1.bb7
-rw-r--r--packages/xorg-proto/inputproto_1.4.3.bb3
-rw-r--r--packages/xorg-proto/printproto_1.0.4.bb3
-rw-r--r--packages/xorg-util/util-macros_1.1.6.bb4
-rw-r--r--packages/xorg-xserver/files/pkgconfig_fix.patch (renamed from packages/xorg-xserver/xserver-kdrive-1.4/pkgconfig_fix.patch)2
-rw-r--r--packages/xorg-xserver/files/sysroot_fix.patch13
-rw-r--r--packages/xorg-xserver/xserver-xorg-1.4/.mtn2git_empty0
-rw-r--r--packages/xorg-xserver/xserver-xorg-1.4/drmfix.patch13
-rw-r--r--packages/xorg-xserver/xserver-xorg_1.4.bb16
-rw-r--r--packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb2
-rw-r--r--site/arm-linux-uclibc1
-rw-r--r--site/armeb-linux1
-rw-r--r--site/avr32-common17
-rw-r--r--site/common-linux2
-rw-r--r--site/powerpc-common7
-rw-r--r--site/sh-common1
643 files changed, 62587 insertions, 6048 deletions
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index 4f3e0b1c4d..1f03825b92 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -1,5 +1,8 @@
inherit base
+# use autotools_stage_all for native packages
+AUTOTOOLS_NATIVE_STAGE_INSTALL = "1"
+
def autotools_dep_prepend(d):
import bb;
@@ -17,7 +20,6 @@ def autotools_dep_prepend(d):
deps += 'libtool-native '
if not bb.data.inherits_class('native', d) \
and not bb.data.inherits_class('cross', d) \
- and not bb.data.inherits_class('sdk', d) \
and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1):
deps += 'libtool-cross '
@@ -56,6 +58,7 @@ oe_runconf () {
--oldincludedir=${oldincludedir} \
--infodir=${infodir} \
--mandir=${mandir} \
+ --enable-mainainer-mode \
${EXTRA_OECONF} \
$@"
oenote "Running $cfgcmd..."
@@ -162,6 +165,17 @@ autotools_stage_includes() {
fi
}
+autotools_stage_dir() {
+ from="$1"
+ to="$2"
+ # This will remove empty directories so we can ignore them
+ rmdir "$from" 2> /dev/null || true
+ if [ -d "$from" ]; then
+ mkdir -p "$to"
+ cp -fpPR -t "$to" "$from"/*
+ fi
+}
+
autotools_stage_all() {
if [ "${INHIBIT_AUTO_STAGE}" = "1" ]
then
@@ -170,26 +184,40 @@ autotools_stage_all() {
rm -rf ${STAGE_TEMP}
mkdir -p ${STAGE_TEMP}
oe_runmake DESTDIR="${STAGE_TEMP}" install
- if [ -d ${STAGE_TEMP}/${includedir} ]; then
- cp -fpPR ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}
+ autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR}
+ if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
+ autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${layout_bindir}
+ autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${layout_sbindir}
+ autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${layout_base_bindir}
+ autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${layout_base_sbindir}
+ autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${layout_libexecdir}
fi
if [ -d ${STAGE_TEMP}/${libdir} ]
then
- find ${STAGE_TEMP}/${libdir} -name '*.la' -exec sed -i s,installed=yes,installed=no, {} \;
-
- for i in ${STAGE_TEMP}/${libdir}/*.la
- do
- if [ ! -f "$i" ]; then
- cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}
- break
- fi
- oe_libinstall -so $(basename $i .la) ${STAGING_LIBDIR}
- done
- fi
- if [ -d ${STAGE_TEMP}/${datadir}/aclocal ]; then
- install -d ${STAGING_DATADIR}/aclocal
- cp -fpPR ${STAGE_TEMP}/${datadir}/aclocal/* ${STAGING_DATADIR}/aclocal
+ olddir=`pwd`
+ cd ${STAGE_TEMP}/${libdir}
+ las=$(find . -name \*.la -type f)
+ cd $olddir
+ echo "Found la files: $las"
+ if [ -n "$las" ]; then
+ # If there are .la files then libtool was used in the
+ # build, so install them with magic mangling.
+ for i in $las
+ do
+ dir=$(dirname $i)
+ echo "oe_libinstall -C ${S} -so $(basename $i .la) ${STAGING_LIBDIR}/${dir}"
+ oe_libinstall -C ${S} -so $(basename $i .la) ${STAGING_LIBDIR}/${dir}
+ done
+ else
+ # Otherwise libtool wasn't used, and lib/ can be copied
+ # directly.
+ echo "cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}"
+ cp -fpPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}
+ fi
fi
+ rm -rf ${STAGE_TEMP}/${mandir} || true
+ rm -rf ${STAGE_TEMP}/${infodir} || true
+ autotools_stage_dir ${STAGE_TEMP}/${datadir} ${STAGING_DATADIR}
rm -rf ${STAGE_TEMP}
}
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 615d02d07e..c2ce508538 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -325,6 +325,7 @@ oe_libinstall() {
__runcmd rm -f $destpath/$libname.la
__runcmd sed -e 's/^installed=yes$/installed=no/' \
-e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \
+ -e "/^dependency_libs=/s,\([[:space:]']+\)${libdir},\1${STAGING_LIBDIR},g" \
$dotlai >$destpath/$libname.la
else
__runcmd install -m 0644 $dotlai $destpath/$libname.la
@@ -367,6 +368,25 @@ oe_libinstall() {
__runcmd cd "$olddir"
}
+def package_stagefile(file, d):
+ import bb, os
+
+ if bb.data.getVar('PSTAGING_ACTIVE', d, True) == "1":
+ destfile = file.replace(bb.data.getVar("TMPDIR", d, 1), bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1))
+ bb.mkdirhier(os.path.dirname(destfile))
+ #print "%s to %s" % (file, destfile)
+ bb.copyfile(file, destfile)
+
+package_stagefile_shell() {
+ if [ "$PSTAGING_ACTIVE" = "1" ]; then
+ srcfile=$1
+ destfile=`echo $srcfile | sed s#${TMPDIR}#${PSTAGE_TMPDIR_STAGE}#`
+ destdir=`dirname $destfile`
+ mkdir -p $destdir
+ cp -dp $srcfile $destfile
+ fi
+}
+
oe_machinstall() {
# Purpose: Install machine dependent files, if available
# If not available, check if there is a default
diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass
index 5a0b4a5c92..506d4c4c81 100644
--- a/classes/cpan.bbclass
+++ b/classes/cpan.bbclass
@@ -50,7 +50,16 @@ cpan_do_compile () {
}
cpan_do_install () {
- oe_runmake install_vendor
+ if [ ${@is_target(d)} == "yes" ]; then
+ oe_runmake install_vendor
+ fi
+}
+
+cpan_do_stage () {
+ if [ ${@is_target(d)} == "no" ]; then
+ oe_runmake install_vendor
+ fi
}
+
-EXPORT_FUNCTIONS do_configure do_compile do_install
+EXPORT_FUNCTIONS do_configure do_compile do_install do_stage
diff --git a/classes/image.bbclass b/classes/image.bbclass
index 67a3a4fa10..f8d896d813 100644
--- a/classes/image.bbclass
+++ b/classes/image.bbclass
@@ -85,8 +85,6 @@ fakeroot do_rootfs () {
insert_feed_uris
- rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/lists/*
-
${IMAGE_PREPROCESS_COMMAND}
export TOPDIR=${TOPDIR}
@@ -132,7 +130,7 @@ insert_feed_uris () {
echo "Added $feed_name feed with URL $feed_uri"
# insert new feed-sources
- echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/ipkg/${feed_name}-feed.conf
+ echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf
done
# Allow to use package deploy directory contents as quick devel-testing
@@ -142,7 +140,7 @@ insert_feed_uris () {
if [ -n "${FEED_DEPLOYDIR_BASE_URI}" ]; then
for arch in ${PACKAGE_ARCHS}
do
- echo "src/gz local-$arch ${FEED_DEPLOYDIR_BASE_URI}/$arch" >> ${IMAGE_ROOTFS}/etc/ipkg/local-$arch-feed.conf
+ echo "src/gz local-$arch ${FEED_DEPLOYDIR_BASE_URI}/$arch" >> ${IMAGE_ROOTFS}/etc/opkg/local-$arch-feed.conf
done
fi
}
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 5ff49cd65e..1f7c761b47 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -162,7 +162,7 @@ def package_qa_get_elf(path, bits32):
# 2 - package depends on debug package
# 3 - non dbg contains .so
# 4 - wrong architecture
-# 5 - .la contains installed=yes
+# 5 - .la contains installed=yes or reference to the workdir
# 6 - .pc contains reference to /usr/include or workdir
# 7 - the desktop file is not valid
# 8 - .la contains reference to the workdir
@@ -178,7 +178,7 @@ def package_qa_make_fatal_error(error_class, name, path,d):
TODO: Load a whitelist of known errors
"""
- return not error_class in [0, 5, 7, 8]
+ return not error_class in [0, 5, 7]
def package_qa_write_error(error_class, name, path, d):
"""
@@ -313,9 +313,8 @@ def package_qa_check_desktop(path, name, d):
import bb, os
sane = True
if path.endswith(".desktop"):
- validate = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True), \
- 'desktop-file-validate')
- output = os.popen("%s %s" % (validate, path))
+ output = os.popen("desktop-file-validate %s" % path)
+ # This only produces output on errors
for l in output:
sane = package_qa_handle_error(7, l.strip(), name, path, d)
@@ -336,11 +335,10 @@ def package_qa_check_staged(path,d):
tmpdir = bb.data.getVar('TMPDIR', d, True)
workdir = os.path.join(tmpdir, "work")
+ installed = "installed=yes"
if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d):
- installed = "installed=no"
pkgconfigcheck = workdir
else:
- installed = "installed=yes"
pkgconfigcheck = tmpdir
# find all .la and .pc files
@@ -351,9 +349,11 @@ def package_qa_check_staged(path,d):
path = os.path.join(root,file)
if file[-2:] == "la":
file_content = open(path).read()
- if installed in file_content:
- error_msg = "%s failed sanity test (installed) in path %s" % (file,root)
- sane = package_qa_handle_error(5, error_msg, "staging", path, d)
+ # Don't check installed status for native/cross packages
+ if not bb.data.inherits_class("native", d) and not bb.data.inherits_class("cross", d):
+ if installed in file_content:
+ error_msg = "%s failed sanity test (installed) in path %s" % (file,root)
+ sane = package_qa_handle_error(5, error_msg, "staging", path, d)
if workdir in file_content:
error_msg = "%s failed sanity test (workdir) in path %s" % (file,root)
sane = package_qa_handle_error(8, error_msg, "staging", path, d)
diff --git a/classes/native.bbclass b/classes/native.bbclass
index 63e9741397..4022cb09c0 100644
--- a/classes/native.bbclass
+++ b/classes/native.bbclass
@@ -76,7 +76,12 @@ export oldincludedir = "${STAGING_DIR_NATIVE}${layout_includedir}"
do_stage () {
if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ]
then
- oe_runmake install
+ if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" != "1" ]
+ then
+ oe_runmake install
+ else
+ autotools_stage_all
+ fi
fi
}
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 325c0b52f5..eb43856c55 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -152,7 +152,7 @@ def runstrip(file, d):
# If the file is in a .debug directory it was already stripped,
# don't do it again...
if os.path.dirname(file).endswith(".debug"):
- bb.note("Already run strip")
+ bb.note("Already ran strip")
return 0
strip = bb.data.getVar("STRIP", d, 1)
@@ -472,24 +472,31 @@ python emit_pkgdata() {
if val:
f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
- packages = bb.data.getVar('PACKAGES', d, 1)
+ packages = bb.data.getVar('PACKAGES', d, True)
+ pkgdatadir = bb.data.getVar('PKGDATA_DIR', d, True)
+
+ pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True)
+ if pstageactive == "1":
+ lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
- data_file = bb.data.expand("${PKGDATA_DIR}/${PN}", d)
+ data_file = pkgdatadir + bb.data.expand("/${PN}" , d)
f = open(data_file, 'w')
f.write("PACKAGES: %s\n" % packages)
f.close()
+ package_stagefile(data_file, d)
workdir = bb.data.getVar('WORKDIR', d, 1)
for pkg in packages.split():
- subdata_file = bb.data.expand("${PKGDATA_DIR}/runtime/%s" % pkg, d)
+ subdata_file = pkgdatadir + "/runtime/%s" % pkg
sf = open(subdata_file, 'w')
+ write_if_exists(sf, pkg, 'PN')
+ write_if_exists(sf, pkg, 'PR')
write_if_exists(sf, pkg, 'DESCRIPTION')
write_if_exists(sf, pkg, 'RDEPENDS')
write_if_exists(sf, pkg, 'RPROVIDES')
write_if_exists(sf, pkg, 'RRECOMMENDS')
write_if_exists(sf, pkg, 'RSUGGESTS')
- write_if_exists(sf, pkg, 'RPROVIDES')
write_if_exists(sf, pkg, 'RREPLACES')
write_if_exists(sf, pkg, 'RCONFLICTS')
write_if_exists(sf, pkg, 'PKG')
@@ -501,6 +508,10 @@ python emit_pkgdata() {
write_if_exists(sf, pkg, 'pkg_prerm')
sf.close()
+ package_stagefile(subdata_file, d)
+ #if pkgdatadir2:
+ # bb.copyfile(subdata_file, pkgdatadir2 + "/runtime/%s" % pkg)
+
allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % pkg, d, 1)
if not allow_empty:
allow_empty = bb.data.getVar('ALLOW_EMPTY', d, 1)
@@ -508,8 +519,11 @@ python emit_pkgdata() {
os.chdir(root)
g = glob('*')
if g or allow_empty == "1":
- packagedfile = bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d)
+ packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg
file(packagedfile, 'w').close()
+ package_stagefile(packagedfile, d)
+ if pstageactive == "1":
+ bb.utils.unlockfile(lf)
}
emit_pkgdata[dirs] = "${PKGDATA_DIR}/runtime"
@@ -549,6 +563,10 @@ python package_do_shlibs() {
shlibs_dir = bb.data.getVar('SHLIBSDIR', d, 1)
bb.mkdirhier(shlibs_dir)
+ pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True)
+ if pstageactive == "1":
+ lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
+
needed = {}
private_libs = bb.data.getVar('PRIVATE_LIBS', d, 1)
for pkg in packages.split():
@@ -590,9 +608,11 @@ python package_do_shlibs() {
for s in sonames:
fd.write(s + '\n')
fd.close()
+ package_stagefile(shlibs_file, d)
fd = open(shver_file, 'w')
fd.write(ver + '\n')
fd.close()
+ package_stagefile(shver_file, d)
if needs_ldconfig:
bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
@@ -601,6 +621,9 @@ python package_do_shlibs() {
postinst += bb.data.getVar('ldconfig_postinst_fragment', d, 1)
bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
+ if pstageactive == "1":
+ bb.utils.unlockfile(lf)
+
shlib_provider = {}
list_re = re.compile('^(.*)\.list$')
for dir in [shlibs_dir]:
@@ -715,6 +738,10 @@ python package_do_pkgconfig () {
if hdr == 'Requires':
pkgconfig_needed[pkg] += exp.replace(',', ' ').split()
+ pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True)
+ if pstageactive == "1":
+ lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
+
for pkg in packages.split():
pkgs_file = os.path.join(shlibs_dir, pkg + ".pclist")
if os.path.exists(pkgs_file):
@@ -724,6 +751,7 @@ python package_do_pkgconfig () {
for p in pkgconfig_provided[pkg]:
f.write('%s\n' % p)
f.close()
+ package_stagefile(pkgs_file, d)
for dir in [shlibs_dir]:
if not os.path.exists(dir):
@@ -758,6 +786,10 @@ python package_do_pkgconfig () {
for dep in deps:
fd.write(dep + '\n')
fd.close()
+ package_stagefile(deps_file, d)
+
+ if pstageactive == "1":
+ bb.utils.unlockfile(lf)
}
python read_shlibdeps () {
diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass
index 22b6166685..e59d194aeb 100644
--- a/classes/package_deb.bbclass
+++ b/classes/package_deb.bbclass
@@ -88,20 +88,13 @@ python do_package_deb () {
return
bb.mkdirhier(dvar)
- packages = bb.data.getVar('PACKAGES', d, 1)
- if not packages:
- bb.debug(1, "PACKAGES not defined, nothing to package")
- return
tmpdir = bb.data.getVar('TMPDIR', d, 1)
if os.access(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"),os.R_OK):
os.unlink(os.path.join(tmpdir, "stamps", "DEB_PACKAGE_INDEX_CLEAN"))
- if packages == []:
- bb.debug(1, "No packages; nothing to do")
- return
-
+ packages = bb.data.getVar('PACKAGES', d, 1)
for pkg in packages.split():
localdata = bb.data.createCopy(d)
pkgdest = bb.data.getVar('PKGDEST', d, 1)
@@ -273,8 +266,13 @@ python () {
}
python do_package_write_deb () {
- bb.build.exec_func("read_subpackage_metadata", d)
- bb.build.exec_func("do_package_deb", d)
+ packages = bb.data.getVar('PACKAGES', d, True)
+ if not packages:
+ bb.debug(1, "No PACKAGES defined, nothing to package")
+ return
+
+ bb.build.exec_func("read_subpackage_metadata", d)
+ bb.build.exec_func("do_package_deb", d)
}
do_package_write_deb[dirs] = "${D}"
addtask package_write_deb before do_package_write after do_package
diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass
index 2feaeba3b3..f05b7449cf 100644
--- a/classes/package_ipk.bbclass
+++ b/classes/package_ipk.bbclass
@@ -1,17 +1,17 @@
inherit package
-BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg"
+BOOTSTRAP_EXTRA_RDEPENDS += "opkg-collateral opkg"
IMAGE_PKGTYPE ?= "ipk"
-IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/ipkg.conf"
-IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/ipkg-sdk.conf"
+IPKGCONF_TARGET = "${STAGING_ETCDIR_NATIVE}/opkg.conf"
+IPKGCONF_SDK = "${STAGING_ETCDIR_NATIVE}/opkg-sdk.conf"
python package_ipk_fn () {
from bb import data
bb.data.setVar('PKGFN', bb.data.getVar('PKG',d), d)
}
-python package_ipk_install () {
+python package_ipk_install () {
#
# Warning - this function is not multimachine safe (see stagingdir reference)!
#
@@ -35,7 +35,7 @@ python package_ipk_install () {
raise bb.build.FuncFailed
# Generate ipk.conf if it or the stamp doesnt exist
- conffile = os.path.join(stagingdir,"ipkg.conf")
+ conffile = os.path.join(stagingdir,"opkg.conf")
if not os.access(conffile, os.R_OK):
ipkg_archs = bb.data.getVar('PACKAGE_ARCHS',d)
if ipkg_archs is None:
@@ -60,8 +60,8 @@ python package_ipk_install () {
f = open(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"),"w")
f.close()
- ret = os.system('ipkg-cl -o %s -f %s update' % (rootfs, conffile))
- ret = os.system('ipkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn))
+ ret = os.system('opkg-cl -o %s -f %s update' % (rootfs, conffile))
+ ret = os.system('opkg-cl -o %s -f %s install %s' % (rootfs, conffile, pkgfn))
if (ret != 0 ):
raise bb.build.FuncFailed
}
@@ -137,20 +137,12 @@ python do_package_ipk () {
return
bb.mkdirhier(dvar)
- packages = bb.data.getVar('PACKAGES', d, 1)
- if not packages:
- bb.debug(1, "PACKAGES not defined, nothing to package")
- return
-
tmpdir = bb.data.getVar('TMPDIR', d, 1)
if os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"), os.R_OK):
os.unlink(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"))
- if packages == []:
- bb.debug(1, "No packages; nothing to do")
- return
-
+ packages = bb.data.getVar('PACKAGES', d, True)
for pkg in packages.split():
localdata = bb.data.createCopy(d)
pkgdest = bb.data.getVar('PKGDEST', d, 1)
@@ -313,6 +305,11 @@ python () {
}
python do_package_write_ipk () {
+ packages = bb.data.getVar('PACKAGES', d, True)
+ if not packages:
+ bb.debug(1, "No PACKAGES defined, nothing to package")
+ return
+
bb.build.exec_func("read_subpackage_metadata", d)
bb.build.exec_func("do_package_ipk", d)
}
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index b564136e3f..1c717b415e 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -4,35 +4,89 @@
#
# To use it add that line to conf/local.conf:
#
-# INHERIT = "packaged-staging"
+# INHERIT += "packaged-staging"
+#
+
+
+#
+# bitbake.conf set PSTAGING_ACTIVE = "0", this class sets to "1" if we're active
+#
+PSTAGE_PKGVERSION = "${PV}-${PR}"
+PSTAGE_PKGARCH = "${BUILD_SYS}"
+PSTAGE_EXTRAPATH ?= ""
+PSTAGE_PKGPATH = "${DISTRO}${PSTAGE_EXTRAPATH}"
+PSTAGE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d).replace('_', '-')}"
+PSTAGE_PKGNAME = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk"
+PSTAGE_PKG = "${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}"
+
+# multimachine.bbclass will override this but add a default in case we're not using it
+MULTIMACH_ARCH ?= "${PACKAGE_ARCH}"
+
+PSTAGE_NATIVEDEPENDS = "\
+ pkgconfig-native \
+ autoconf-native \
+ automake-native \
+ curl-native \
+ zlib-native \
+ libtool-native \
+ gnu-config-native \
+ shasum-native \
+ libtool-native \
+ automake-native \
+ update-alternatives-cworth-native \
+ ipkg-utils-native \
+ opkg-native \
+ m4-native \
+ quilt-native \
+ stagemanager-native \
+ "
python () {
import bb
- if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('image', d) and not bb.data.inherits_class('cross', d) and not bb.data.inherits_class('sdk', d):
+ pstage_allowed = True
+
+ # These classes encode staging paths into the binary data so can only be
+ # reused if the path doesn't change/
+ if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d):
+ path = bb.data.getVar('PSTAGE_PKGPATH', d, 1)
+ path = path + bb.data.getVar('TMPDIR', d, 1).replace('/', '-')
+ bb.data.setVar('PSTAGE_PKGPATH', path, d)
+
+ # PSTAGE_NATIVEDEPENDS lists the packages we need before we can use packaged
+ # staging. There will always be some packages we depend on.
+ if bb.data.inherits_class('native', d):
+ pn = bb.data.getVar('PN', d, True)
+ nativedeps = bb.data.getVar('PSTAGE_NATIVEDEPENDS', d, True).split()
+ if pn in nativedeps:
+ pstage_allowed = False
+
+ # Images aren't of interest to us
+ if bb.data.inherits_class('image', d):
+ pstage_allowed = False
+
+ # Add task dependencies if we're active, otherwise mark packaged staging
+ # as inactive.
+ if pstage_allowed:
deps = bb.data.getVarFlag('do_populate_staging', 'depends', d) or ""
deps += " stagemanager-native:do_populate_staging"
bb.data.setVarFlag('do_populate_staging', 'depends', deps, d)
deps = bb.data.getVarFlag('do_prepackaged_stage', 'depends', d) or ""
- deps += " ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
+ deps += " opkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
bb.data.setVarFlag('do_prepackaged_stage', 'depends', deps, d)
+ bb.data.setVar("PSTAGING_ACTIVE", "1", d)
else:
- bb.data.setVar("PSTAGING_DISABLED", "1", d)
+ bb.data.setVar("PSTAGING_ACTIVE", "0", d)
}
-# multimachine.bbclass will override this
-MULTIMACH_ARCH ?= "${PACKAGE_ARCH}"
-
-export PSTAGING_DISABLED = "0"
-
-DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage"
+DEPLOY_DIR_PSTAGE = "${DEPLOY_DIR}/pstage"
+PSTAGE_MACHCONFIG = "${DEPLOY_DIR_PSTAGE}/opkg.conf"
PSTAGE_BUILD_CMD = "${IPKGBUILDCMD}"
-PSTAGE_INSTALL_CMD = "ipkg-cl install -force-depends -f ${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf -o ${TMPDIR}"
-PSTAGE_UPDATE_CMD = "ipkg-cl update -f ${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf -o ${TMPDIR}"
-PSTAGE_REMOVE_CMD = "ipkg-cl remove -force-depends -f ${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf -o ${TMPDIR}"
-PSTAGE_LIST_CMD = "ipkg-cl list_installed -f ${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf -o ${TMPDIR}"
-PSTAGE_PKGNAME = "staging-${PN}_${PV}-${PR}_${MULTIMACH_ARCH}.ipk"
+PSTAGE_INSTALL_CMD = "opkg-cl install -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
+PSTAGE_UPDATE_CMD = "opkg-cl update -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
+PSTAGE_REMOVE_CMD = "opkg-cl remove -force-depends -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
+PSTAGE_LIST_CMD = "opkg-cl list_installed -f ${PSTAGE_MACHCONFIG} -o ${TMPDIR}"
PSTAGE_TMPDIR_STAGE = "${WORKDIR}/staging-pkg"
@@ -43,56 +97,50 @@ do_clean_append() {
bb.note("Uninstalling package from staging...")
path = bb.data.getVar("PATH", d, 1)
removecmd = bb.data.getVar("PSTAGE_REMOVE_CMD", d, 1)
- removepkg = bb.data.expand("staging-${PN}", d)
+ removepkg = bb.data.expand("${PSTAGE_PKGPN}", d)
ret = os.system("PATH=\"%s\" %s %s" % (path, removecmd, removepkg))
if ret != 0:
bb.note("Failure removing staging package")
- stagepkg = bb.data.expand("${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGNAME}", d)
+ stagepkg = bb.data.expand("${PSTAGE_PKG}", d)
bb.note("Removing staging package %s" % stagepkg)
- #os.system('rm -rf ' + stagepkg)
+ os.system('rm -rf ' + stagepkg)
}
staging_helper () {
- #assemble appropriate ipkg.conf
- conffile=${DEPLOY_DIR_PSTAGE}/ipkg-${MACHINE}.conf
+ # Assemble appropriate opkg.conf
+ conffile=${PSTAGE_MACHCONFIG}
mkdir -p ${DEPLOY_DIR_PSTAGE}/pstaging_lists
if [ ! -e $conffile ]; then
- ipkgarchs="${BUILD_ARCH} all any noarch ${TARGET_ARCH} ${PACKAGE_ARCHS} ${PACKAGE_EXTRA_ARCHS} ${MACHINE}"
+ ipkgarchs="${BUILD_SYS}"
priority=1
for arch in $ipkgarchs; do
echo "arch $arch $priority" >> $conffile
priority=$(expr $priority + 5)
done
- echo "src oe-staging file:${DEPLOY_DIR_PSTAGE}" >> $conffile
-
- OLD_PWD=`pwd`
- cd ${DEPLOY_DIR_PSTAGE}
- ipkg-make-index -p Packages .
- cd ${OLD_PWD}
-
- ${PSTAGE_UPDATE_CMD}
fi
}
+PSTAGE_TASKS_COVERED = "fetch unpack munge patch configure qa_configure rig_locales compile sizecheck install deploy package populate_staging package_write_deb package_write_ipk package_write package_stage qa_staging"
+
python do_prepackaged_stage () {
import os
- if bb.data.getVar("PSTAGING_DISABLED", d, 1) == "1":
+ if bb.data.getVar("PSTAGING_ACTIVE", d, 1) == "0":
bb.build.make_stamp("do_prepackaged_stage", d)
return
bb.note("Uninstalling any existing package from staging...")
path = bb.data.getVar("PATH", d, 1)
removecmd = bb.data.getVar("PSTAGE_REMOVE_CMD", d, 1)
- removepkg = bb.data.expand("staging-${PN}", d)
+ removepkg = bb.data.expand("${PSTAGE_PKGPN}", d)
lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
ret = os.system("PATH=\"%s\" %s %s" % (path, removecmd, removepkg))
bb.utils.unlockfile(lf)
if ret != 0:
bb.note("Failure attempting to remove staging package")
- stagepkg = bb.data.expand("${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGNAME}", d)
+ stagepkg = bb.data.expand("${PSTAGE_PKG}", d)
if os.path.exists(stagepkg):
bb.note("Following speedup\n")
@@ -108,24 +156,10 @@ python do_prepackaged_stage () {
if ret != 0:
bb.note("Failure installing prestage package")
- bb.build.make_stamp("do_prepackaged_stage", d)
- bb.build.make_stamp("do_fetch", d)
- bb.build.make_stamp("do_unpack", d)
- bb.build.make_stamp("do_munge", d)
- bb.build.make_stamp("do_patch", d)
- bb.build.make_stamp("do_configure", d)
- bb.build.make_stamp("do_qa_configure", d)
- bb.build.make_stamp("do_rig_locales", d)
- bb.build.make_stamp("do_compile", d)
- bb.build.make_stamp("do_install", d)
- bb.build.make_stamp("do_deploy", d)
- bb.build.make_stamp("do_package", d)
- bb.build.make_stamp("do_populate_staging", d)
- bb.build.make_stamp("do_package_write_deb", d)
- bb.build.make_stamp("do_package_write_ipk", d)
- bb.build.make_stamp("do_package_write", d)
- bb.build.make_stamp("do_package_stage", d)
- bb.build.make_stamp("do_qa_staging", d)
+ #bb.build.make_stamp("do_prepackaged_stage", d)
+ #for task in bb.data.getVar("PSTAGE_TASKS_COVERED", d, 1).split():
+ # bb.build.make_stamp("do_" + task, d)
+ bb.build.make_stamp("do_stage_package_populated", d)
else:
bb.build.make_stamp("do_prepackaged_stage", d)
@@ -134,17 +168,38 @@ do_prepackaged_stage[cleandirs] = "${PSTAGE_TMPDIR_STAGE}"
do_prepackaged_stage[selfstamp] = "1"
addtask prepackaged_stage before do_fetch
-populate_staging_preamble () {
- if [ "$PSTAGING_DISABLED" != "1" ]; then
- #mkdir -p ${DEPLOY_DIR_PSTAGE}
+addhandler packagedstage_stampfixing_eventhandler
+python packagedstage_stampfixing_eventhandler() {
+ from bb.event import getName
+ import os
+
+ if getName(e) == "StampUpdate":
+ taskscovered = bb.data.getVar("PSTAGE_TASKS_COVERED", e.data, 1).split()
+ for (fn, task) in e.targets:
+ # strip off 'do_'
+ task = task[3:]
+ if task in taskscovered:
+ stamp = "%s.do_stage_package_populated" % e.stampPrefix[fn]
+ if os.path.exists(stamp):
+ # We're targetting a task which was skipped with packaged staging
+ # so we need to remove the autogenerated stamps.
+ for task in taskscovered:
+ dir = "%s.do_%s" % (e.stampPrefix[fn], task)
+ os.system('rm -f ' + dir)
+ os.system('rm -f ' + stamp)
+
+ return NotHandled
+}
- stage-manager -p ${STAGING_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-staging -u
- stage-manager -p ${CROSS_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-cross -u
+populate_staging_preamble () {
+ if [ "$PSTAGING_ACTIVE" = "1" ]; then
+ stage-manager -p ${STAGING_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-staging -u || true
+ stage-manager -p ${CROSS_DIR} -c ${DEPLOY_DIR_PSTAGE}/stamp-cache-cross -u || true
fi
}
populate_staging_postamble () {
- if [ "$PSTAGING_DISABLED" != "1" ]; then
+ if [ "$PSTAGING_ACTIVE" = "1" ]; then
# list the packages currently installed in staging
${PSTAGE_LIST_CMD} | awk '{print $1}' > ${DEPLOY_DIR_PSTAGE}/installed-list
@@ -169,33 +224,42 @@ python do_populate_staging_append() {
staging_packager () {
mkdir -p ${PSTAGE_TMPDIR_STAGE}/CONTROL
+ mkdir -p ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}
- echo "Package: staging-${PN}" > ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
- echo "Version: ${PV}-${PR}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
+ echo "Package: ${PSTAGE_PKGPN}" > ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
+ echo "Version: ${PSTAGE_PKGVERSION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
echo "Description: ${DESCRIPTION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
echo "Section: ${SECTION}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
echo "Priority: Optional" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
echo "Maintainer: ${MAINTAINER}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
- echo "Architecture: ${MULTIMACH_ARCH}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
+ echo "Architecture: ${PSTAGE_PKGARCH}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
echo "Source: ${SRC_URI}" >> ${PSTAGE_TMPDIR_STAGE}/CONTROL/control
- ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}
- ${PSTAGE_INSTALL_CMD} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGNAME}
+ ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${DEPLOY_DIR_PSTAGE}/${PSTAGE_PKGPATH}
+ ${PSTAGE_INSTALL_CMD} ${PSTAGE_PKG}
+}
+
+staging_package_installer () {
+ ${PSTAGE_INSTALL_CMD} ${PSTAGE_PKG}
}
python do_package_stage () {
- if bb.data.getVar("PSTAGING_DISABLED", d, 1) == "1":
+ if bb.data.getVar("PSTAGING_ACTIVE", d, 1) != "1":
return
+ #
+ # Handle deploy/ packages
+ #
bb.build.exec_func("read_subpackage_metadata", d)
+ stagepath = bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1)
+ tmpdir = bb.data.getVar("TMPDIR", d, True)
packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
if len(packages) > 0:
- stagepath = bb.data.getVar("PSTAGE_TMPDIR_STAGE", d, 1)
if bb.data.inherits_class('package_ipk', d):
- ipkpath = os.path.join(stagepath, "deploy", "ipk")
+ ipkpath = bb.data.getVar('DEPLOY_DIR_IPK', d, True).replace(tmpdir, stagepath)
bb.mkdirhier(ipkpath)
if bb.data.inherits_class('package_deb', d):
- debpath = os.path.join(stagepath, "deploy", "deb")
+ debpath = bb.data.getVar('DEPLOY_DIR_DEB', d, True).replace(tmpdir, stagepath)
bb.mkdirhier(debpath)
for pkg in packages:
@@ -205,28 +269,45 @@ python do_package_stage () {
arch = bb.data.getVar('PACKAGE_ARCH_%s' % pkg, d, 1)
if not arch:
arch = bb.data.getVar('PACKAGE_ARCH', d, 1)
+ pr = bb.data.getVar('PR_%s' % pkg, d, 1)
+ if not pr:
+ pr = bb.data.getVar('PR', d, 1)
if not packaged(pkg, d):
continue
if bb.data.inherits_class('package_ipk', d):
- srcname = bb.data.expand(pkgname + "_${PV}-${PR}_" + arch + ".ipk", d)
+ srcname = bb.data.expand(pkgname + "_${PV}-" + pr + "_" + arch + ".ipk", d)
srcfile = bb.data.expand("${DEPLOY_DIR_IPK}/" + arch + "/" + srcname, d)
if not os.path.exists(srcfile):
bb.fatal("Package %s does not exist yet it should" % srcfile)
bb.copyfile(srcfile, ipkpath + "/" + srcname)
if bb.data.inherits_class('package_deb', d):
if arch == 'all':
- srcname = bb.data.expand(pkgname + "_${PV}-${PR}_all.deb", d)
- else:
- srcname = bb.data.expand(pkgname + "_${PV}-${PR}_${DPKG_ARCH}.deb", d)
+ srcname = bb.data.expand(pkgname + "_${PV}-" + pr + "_all.deb", d)
+ else:
+ srcname = bb.data.expand(pkgname + "_${PV}-" + pr + "_${DPKG_ARCH}.deb", d)
srcfile = bb.data.expand("${DEPLOY_DIR_DEB}/" + arch + "/" + srcname, d)
if not os.path.exists(srcfile):
bb.fatal("Package %s does not exist yet it should" % srcfile)
bb.copyfile(srcfile, debpath + "/" + srcname)
+
+ #
+ # Handle stamps/ files
+ #
+ stampfn = bb.data.getVar("STAMP", d, True)
+ destdir = os.path.dirname(stampfn.replace(tmpdir, stagepath))
+ bb.mkdirhier(destdir)
+ # We need to include the package_stage stamp in the staging package so create one
+ bb.build.make_stamp("do_package_stage", d)
+ os.system("cp %s.do_* %s/" % (stampfn, destdir))
+
bb.build.exec_func("staging_helper", d)
- lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
bb.build.exec_func("staging_packager", d)
+ lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d))
+ bb.build.exec_func("staging_package_installer", d)
bb.utils.unlockfile(lf)
}
+#
+# Note an assumption here is that do_deploy runs before do_package_write/do_populate_staging
+#
addtask package_stage after do_package_write do_populate_staging before do_build
-
diff --git a/classes/qmake2.bbclass b/classes/qmake2.bbclass
index cf3419f824..9ac4945ab4 100644
--- a/classes/qmake2.bbclass
+++ b/classes/qmake2.bbclass
@@ -14,6 +14,6 @@ export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/qmake2"
export OE_QMAKE_LINK = "${CXX}"
export OE_QMAKE_CXXFLAGS = "${CXXFLAGS}"
export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qt4"
-export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}/qt4"
+export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
export OE_QMAKE_LIBS_QT = "qt"
export OE_QMAKE_LIBS_X11 = "-lXext -lX11 -lm"
diff --git a/classes/qtopia4core.bbclass b/classes/qtopia4core.bbclass
index fd8939a23f..c6a05488ef 100644
--- a/classes/qtopia4core.bbclass
+++ b/classes/qtopia4core.bbclass
@@ -5,7 +5,7 @@ inherit qmake2
# override variables set by qmake-base to compile QtopiaCore apps
#
export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qtopia"
-export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}/qtopia"
+export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
export OE_QMAKE_LIBS_QT = "qt"
export OE_QMAKE_LIBS_X11 = ""
export OE_QMAKE_EXTRA_MODULES = "network"
diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass
index 97de5e2774..917fadd750 100644
--- a/classes/rm_work.bbclass
+++ b/classes/rm_work.bbclass
@@ -6,6 +6,10 @@
# INHERIT += "rm_work"
#
+# Use the completion scheulder by default when rm_work is active
+# to try and reduce disk usage
+BB_SCHEDULER ?= "completion"
+
RMWORK_ORIG_TASK := "${BB_DEFAULT_TASK}"
BB_DEFAULT_TASK = "rm_work_all"
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index 5237285e4c..3a69b82010 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -46,6 +46,7 @@ fakeroot rootfs_deb_do_rootfs () {
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
+ export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT}
mkdir -p ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives
@@ -109,22 +110,22 @@ fakeroot rootfs_deb_do_rootfs () {
set -e
- # Hacks to make dpkg/ipkg coexist for now
+ # Hacks to make dpkg/opkg coexist for now
mv ${IMAGE_ROOTFS}/var/dpkg ${IMAGE_ROOTFS}/usr/
if [ -e ${IMAGE_ROOTFS}/usr/dpkg/alternatives ]; then
rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives
fi
- if [ ! -e ${IMAGE_ROOTFS}${libdir}/ipkg ] ; then
- mkdir -p ${IMAGE_ROOTFS}${libdir}/ipkg
+ if [ ! -e ${IMAGE_ROOTFS}${libdir}/opkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}${libdir}/opkg
fi
- if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/ipkg ] ; then
- mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ipkg
+ if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/opkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/opkg
fi
- ln -sf ${libdir}/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
- ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}${libdir}/ipkg/info
- ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}${libdir}/ipkg/status
+ ln -sf ${libdir}/opkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
+ ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}${libdir}/opkg/info
+ ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}${libdir}/opkg/status
${ROOTFS_POSTPROCESS_COMMAND}
@@ -152,6 +153,6 @@ rootfs_deb_log_check() {
}
remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}${libdir}/ipkg/
+ rm -rf ${IMAGE_ROOTFS}${libdir}/opkg/
rm -rf ${IMAGE_ROOTFS}/usr/dpkg/
}
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 28ba03d675..c8e068f739 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -5,12 +5,12 @@
# See image.bbclass for a usage of this.
#
-do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
+do_rootfs[depends] += "opkg-native:do_populate_staging ipkg-utils-native:do_populate_staging"
do_rootfs[recrdeptask] += "do_package_write_ipk"
IPKG_ARGS = "-f ${IPKGCONF_TARGET} -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}"
-DISTRO_EXTRA_RDEPENDS += " ipkg ipkg-collateral "
+DISTRO_EXTRA_RDEPENDS += " opkg opkg-collateral "
PACKAGE_INSTALL_NO_DEPS ?= "0"
fakeroot rootfs_ipk_do_rootfs () {
@@ -21,41 +21,45 @@ fakeroot rootfs_ipk_do_rootfs () {
mkdir -p ${T}
- ipkg-cl ${IPKG_ARGS} update
+ opkg-cl ${IPKG_ARGS} update
# Uclibc builds don't provide this stuff...
if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
if [ ! -z "${LINGUAS_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
+ opkg-cl ${IPKG_ARGS} install glibc-localedata-i18n
for i in ${LINGUAS_INSTALL}; do
- ipkg-cl ${IPKG_ARGS} install $i
+ opkg-cl ${IPKG_ARGS} install $i
done
fi
fi
if [ ! -z "${PACKAGE_INSTALL}" ]; then
- ipkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
+ opkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL}
fi
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
- mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ipkg/
- grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}${sysconfdir}/ipkg/arch.conf
+ export OPKG_OFFLINE_ROOT=${IPKG_OFFLINE_ROOT}
+
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/opkg/
+ grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}${sysconfdir}/opkg/arch.conf
- for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.preinst; do
+ for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.preinst; do
if [ -f $i ] && ! sh $i; then
- ipkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
+ opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .preinst`
fi
done
- for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.postinst; do
+ for i in ${IMAGE_ROOTFS}${libdir}/opkg/info/*.postinst; do
if [ -f $i ] && ! sh $i configure; then
- ipkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
+ opkg-cl ${IPKG_ARGS} flag unpacked `basename $i .postinst`
fi
done
install -d ${IMAGE_ROOTFS}/${sysconfdir}
echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version
+ rm -f ${IMAGE_ROOTFS}${libdir}/opkg/lists/*
+
${ROOTFS_POSTPROCESS_COMMAND}
log_check rootfs
@@ -82,5 +86,5 @@ rootfs_ipk_log_check() {
}
remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}${libdir}/ipkg/
+ rm -rf ${IMAGE_ROOTFS}${libdir}/opkg/
}
diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass
index 2e097a812e..b7aa3e20f1 100644
--- a/classes/seppuku.bbclass
+++ b/classes/seppuku.bbclass
@@ -228,7 +228,7 @@ def seppuku_file_bug(poster, file, product, component, bugname, text):
else:
return res[0]
-def seppuku_create_attachment(debug, poster, attach_query, product, component, bug_number, text, file):
+def seppuku_create_attachment(data, debug, poster, attach_query, product, component, bug_number, text, file):
"""
Create a new attachment for the failed report
@@ -246,9 +246,11 @@ def seppuku_create_attachment(debug, poster, attach_query, product, component, b
print >> debug, "Can't create an attachment, no attach_query passed to method"
return False
+ import bb
+ logdescription = "Build log for machine %s" % (bb.data.getVar('MACHINE', data, True))
import urllib2
- param = { "bugid" : bug_number, "action" : "insert", "data" : file, "description" : "Build log", "ispatch" : "0", "contenttypemethod" : "list", "contenttypeselection" : "text/plain", "comment" : text }
+ param = { "bugid" : bug_number, "action" : "insert", "data" : file, "description" : logdescription, "ispatch" : "0", "contenttypemethod" : "list", "contenttypeselection" : "text/plain", "comment" : text }
try:
result = poster.open( attach_query, param )
@@ -329,12 +331,11 @@ python seppuku_eventhandler() {
file = None
if name == "TaskFailed":
- bugname = "%(package)s-%(pv)s-%(pr)s-%(task)s" % { "package" : bb.data.getVar("PN", data, True),
+ bugname = "%(package)s-%(pv)s-autobuild" % { "package" : bb.data.getVar("PN", data, True),
"pv" : bb.data.getVar("PV", data, True),
- "pr" : bb.data.getVar("PR", data, True),
- "task" : e.task }
+ }
log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task))
- text = "The package failed to build at %s for machine %s" % (bb.data.getVar('DATETIME', data, True), bb.data.getVar( 'MACHINE', data, True ) )
+ text = "The %s step in %s failed at %s for machine %s" % (e.task, bb.data.getVar("PN", data, True), bb.data.getVar('DATETIME', data, True), bb.data.getVar( 'MACHINE', data, True ) )
if len(log_file) != 0:
print >> debug_file, "Adding log file %s" % log_file[0]
file = open(log_file[0], 'r')
@@ -351,7 +352,7 @@ python seppuku_eventhandler() {
if bug_number and bug_open:
print >> debug_file, "The bug is known as '%s'" % bug_number
if file:
- if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file):
+ if not seppuku_create_attachment(data, debug_file, poster, attach, product, component, bug_number, text, file):
print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number
else:
print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number)
@@ -372,7 +373,7 @@ python seppuku_eventhandler() {
print >> debug_file, "The new bug_number: '%s'" % bug_number
if bug_number and file:
- if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file):
+ if not seppuku_create_attachment(data, debug_file, poster, attach, product, component, bug_number, text, file):
print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number
else:
print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number)
diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass
index a3b67b5798..0d31be4dc4 100644
--- a/classes/siteinfo.bbclass
+++ b/classes/siteinfo.bbclass
@@ -21,40 +21,39 @@ def get_siteinfo_list(d):
target = bb.data.getVar('HOST_ARCH', d, 1) + "-" + bb.data.getVar('HOST_OS', d, 1)
targetinfo = {\
- "armeb-linux": "endian-big bit-32 common-glibc arm-common",\
- "armeb-linux-gnueabi": "endian-big bit-32 common-glibc arm-common armeb-linux",\
- "armeb-linux-uclibc": "endian-big bit-32 common-uclibc arm-common",\
- "armeb-linux-uclibcgnueabi": "endian-big bit-32 common-uclibc arm-common armeb-linux-uclibc",\
+ "armeb-linux": "endian-big bit-32 common-linux common-glibc arm-common",\
+ "armeb-linux-gnueabi": "endian-big bit-32 common-linux common-glibc arm-common armeb-linux",\
+ "armeb-linux-uclibc": "endian-big bit-32 common-linux common-uclibc arm-common",\
+ "armeb-linux-uclibcgnueabi": "endian-big bit-32 common-linux common-uclibc arm-common armeb-linux-uclibc",\
"arm-darwin": "endian-little bit-32 common-darwin",\
- "arm-linux": "endian-little bit-32 common-glibc arm-common",\
- "arm-linux-gnueabi": "endian-little bit-32 common-glibc arm-common arm-linux",\
- "arm-linux-uclibc": "endian-little bit-32 common-uclibc arm-common",\
- "arm-linux-uclibcgnueabi": "endian-little bit-32 common-uclibc arm-common arm-linux-uclibc",\
- "avr32-linux": "endian-big bit-32 common-glibc avr32-common",\
- "avr32-linux-uclibc": "endian-big bit-32 common-uclibc avr32-common",\
+ "arm-linux": "endian-little bit-32 common-linux common-glibc arm-common",\
+ "arm-linux-gnueabi": "endian-little bit-32 common-linux common-glibc arm-common arm-linux",\
+ "arm-linux-uclibc": "endian-little bit-32 common-linux common-uclibc arm-common",\
+ "arm-linux-uclibcgnueabi": "endian-little bit-32 common-linux common-uclibc arm-common arm-linux-uclibc",\
+ "avr32-linux-uclibc": "endian-big bit-32 common-linux common-uclibc avr32-common",\
"bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\
- "i386-linux": "endian-little bit-32 common-glibc ix86-common",\
- "i486-linux": "endian-little bit-32 common-glibc ix86-common",\
- "i586-linux": "endian-little bit-32 common-glibc ix86-common",\
- "i686-linux": "endian-little bit-32 common-glibc ix86-common",\
- "i386-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
- "i486-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
- "i586-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
- "i686-linux-uclibc": "endian-little bit-32 common-uclibc ix86-common",\
- "mipsel-linux": "endian-little bit-32 common-glibc",\
- "mipsel-linux-uclibc": "endian-little bit-32 common-uclibc",\
- "mips-linux": "endian-big bit-32 common-glibc",\
- "mips-linux-uclibc": "endian-big bit-32 common-uclibc",\
+ "i386-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
+ "i486-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
+ "i586-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
+ "i686-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\
+ "i386-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\
+ "i486-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\
+ "i586-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\
+ "i686-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\
+ "mipsel-linux": "endian-little bit-32 common-linux common-glibc",\
+ "mipsel-linux-uclibc": "endian-little bit-32 common-linux common-uclibc",\
+ "mips-linux": "endian-big bit-32 common-linux common-glibc",\
+ "mips-linux-uclibc": "endian-big bit-32 common-linux common-uclibc",\
"powerpc-darwin": "endian-big bit-32 common-darwin",\
- "ppc-linux": "endian-big bit-32 common-glibc powerpc-common",\
- "powerpc-linux": "endian-big bit-32 common-glibc powerpc-common",\
- "powerpc-linux-uclibc": "endian-big bit-32 common-uclibc powerpc-common",\
- "sh3-linux": "endian-little bit-32 common-glibc sh-common",\
- "sh4-linux": "endian-little bit-32 common-glibc sh-common",\
- "sh4-linux-uclibc": "endian-little bit-32 common-uclibc sh-common",\
- "sparc-linux": "endian-big bit-32 common-glibc",\
- "x86_64-linux": "endian-little bit-64 common-glibc",\
- "x86_64-linux-uclibc": "endian-little bit-64 common-uclibc"}
+ "ppc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\
+ "powerpc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\
+ "powerpc-linux-uclibc": "endian-big bit-32 common-linux common-uclibc powerpc-common",\
+ "sh3-linux": "endian-little bit-32 common-linux common-glibc sh-common",\
+ "sh4-linux": "endian-little bit-32 common-linux common-glibc sh-common",\
+ "sh4-linux-uclibc": "endian-little bit-32 common-linux common-uclibc sh-common",\
+ "sparc-linux": "endian-big bit-32 common-linux common-glibc",\
+ "x86_64-linux": "endian-little bit-64 common-linux common-glibc",\
+ "x86_64-linux-uclibc": "endian-little bit-64 common-linux common-uclibc"}
if target in targetinfo:
info = targetinfo[target].split()
info.append(target)
diff --git a/classes/testlab.bbclass b/classes/testlab.bbclass
index 5a88f3de62..ba0bc794e7 100644
--- a/classes/testlab.bbclass
+++ b/classes/testlab.bbclass
@@ -19,26 +19,26 @@
# * add test suite to run on the target device
-# Needs 'dot', 'ipkg-cl'
+# Needs 'dot', 'opkg-cl'
do_testlab() {
-if [ -e ${IMAGE_ROOTFS}/etc/ipkg ] ; then
+if [ -e ${IMAGE_ROOTFS}/etc/opkg ] ; then
TESTLAB_DIR="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}-testlab"
mkdir -p ${TESTLAB_DIR}/
- ls -laR ${IMAGE_ROOTFS} >& ${TESTLAB_DIR}/files-in-image.txt
+ ls -laR ${IMAGE_ROOTFS} > ${TESTLAB_DIR}/files-in-image.txt
echo > ${TESTLAB_DIR}/installed-packages.txt
echo -e "digraph depends {\n node [shape=plaintext]" > ${TESTLAB_DIR}/depends.dot
- for pkg in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} list_installed | awk '{print $1}') ; do
- ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} info $pkg | grep Filename | awk -F: '{print $2}' >> ${TESTLAB_DIR}/installed-packages.txt
+ for pkg in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} list_installed | awk '{print $1}') ; do
+ opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Filename | awk -F: '{print $2}' >> ${TESTLAB_DIR}/installed-packages.txt
- for depends in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do
+ for depends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Depends) ; do
echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" | grep -v Depends | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot
done
- for recommends in $(ipkg-cl -f ${IMAGE_ROOTFS}/etc/ipkg -o ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do
+ for recommends in $(opkg-cl -f ${IMAGE_ROOTFS}/etc/opkg -o ${IMAGE_ROOTFS} info $pkg | grep Recom) ; do
echo "$pkg OPP $recommends [style=dotted];" | grep -v "(" | grep -v ")" | grep -v Recom | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot
done
done
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index c86cda5040..ba2b2c71f5 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -203,10 +203,11 @@ FILESDIR = "${@bb.which(bb.data.getVar('FILESPATH', d, 1), '.')}"
TMPDIR = "${TOPDIR}/tmp"
CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}"
-CVSDIR = "${DL_DIR}/cvs"
-SVNDIR = "${DL_DIR}/svn"
-GITDIR = "${DL_DIR}/git"
-BZRDIR = "${DL_DIR}/bzr"
+CO_DIR = "${DL_DIR}"
+CVSDIR = "${CO_DIR}/cvs"
+SVNDIR = "${CO_DIR}/svn"
+GITDIR = "${CO_DIR}/git"
+BZRDIR = "${CO_DIR}/bzr"
STAMP = "${TMPDIR}/stamps/${PF}"
WORKDIR = "${TMPDIR}/work/${PF}"
@@ -563,6 +564,9 @@ IMAGE_ROOTFS_SIZE_ext3.gz ?= "65536"
# MACHINE don't change the path to the cache
CACHE := "${CACHE}"
+# Default to disabling packaged staging code
+export PSTAGING_ACTIVE = "0"
+
##################################################################
# Magic Cookie for SANITY CHECK
##################################################################
diff --git a/conf/distro/angstrom-2008.1.conf b/conf/distro/angstrom-2008.1.conf
index e42dd1cb3b..a78469c3d1 100644
--- a/conf/distro/angstrom-2008.1.conf
+++ b/conf/distro/angstrom-2008.1.conf
@@ -20,6 +20,9 @@
DISTRO_VERSION = "2008.1-test-${DATE}"
DISTRO_REVISION = "1"
+#build staging from packages
+INHERIT += "packaged-staging"
+
require conf/distro/include/sane-srcdates.inc
require conf/distro/include/sane-srcrevs.inc
require conf/distro/include/angstrom-2008-preferred-versions.inc
@@ -61,7 +64,8 @@ PCMCIA_MANAGER = "pcmciautils"
PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh20"
#Initramfs for kernels
-KERNEL_INITRAMFS_PATH = "${TMPDIR}/deploy/uclibc/images/${MACHINE}/initramfs-bootmenu-image-${MACHINE}.cpio.gz"
+KERNEL_INITRAMFS_DIR = "${TMPDIR}/deploy/uclibc/images/${MACHINE}/"
+KERNEL_INITRAMFS_PATH = "${KERNEL_INITRAMFS_DIR}/$(readlink ${KERNEL_INITRAMFS_DIR}initramfs-bootmenu-image-${MACHINE}.cpio.gz)"
#This is unrelated to the kernel version, but userspace apps (e.g. HAL) require a recent version to build against
PREFERRED_VERSION_linux-libc-headers = "2.6.23"
@@ -77,7 +81,6 @@ PREFERRED_VERSION_uclibc-initial ?= "0.9.29"
#Prefer a newer GTK+ and friends
PREFERRED_VERSION_gtk+ ?= "2.12.3"
PREFERRED_VERSION_glib-2.0 ?= "2.14.4"
-PREFERRED_VERSION_pango ?= "1.18.1"
PREFERRED_PROVIDER_avahi = "avahi"
@@ -101,28 +104,30 @@ PREFERRED_VERSION_gcc-cross_mpc8323e-rdb ?= "4.1.1"
PREFERRED_VERSION_gcc-cross-sdk_mpc8323e-rdb ?= "4.1.1"
PREFERRED_VERSION_gcc-cross-initial_mpc8323e-rdb ?= "4.1.1"
+# GCC 4.3.0 is the first release with armv7 support
+#PREFERRED_VERSION_gcc_beagleboard = "4.3.0"
+#PREFERRED_VERSION_gcc-cross_beagleboard = "4.3.0"
+#PREFERRED_VERSION_gcc-cross-sdk_beagleboard = "4.3.0"
+#PREFERRED_VERSION_gcc-cross-initial_beagleboard = "4.3.0"
+
PREFERRED_VERSION_gcc ?= "4.2.2"
PREFERRED_VERSION_gcc-cross ?= "4.2.2"
PREFERRED_VERSION_gcc-cross-sdk ?= "4.2.2"
PREFERRED_VERSION_gcc-cross-initial ?= "4.2.2"
-
#Loads preferred versions from files, these have weak assigments (?=), so put them at the bottom
require conf/distro/include/preferred-gpe-versions-2.8.inc
require conf/distro/include/preferred-e-versions.inc
require conf/distro/include/preferred-xorg-versions-X11R7.3.inc
-#avr32 only has patches for binutils 2.17 and gcc 4.1.2 in OE
-PREFERRED_VERSION_gcc_avr32 = "4.1.2"
-PREFERRED_VERSION_gcc-cross_avr32 = "4.1.2"
-PREFERRED_VERSION_gcc-cross-sdk_avr32 = "4.1.2"
-PREFERRED_VERSION_gcc-cross-initial_avr32 = "4.1.2"
+#avr32 only has patches for binutils 2.17 and gcc 4.2.1 in OE
+PREFERRED_VERSION_gcc_avr32 = "4.2.1"
+PREFERRED_VERSION_gcc-cross_avr32 = "4.2.1"
+PREFERRED_VERSION_gcc-cross-sdk_avr32 = "4.2.1"
+PREFERRED_VERSION_gcc-cross-initial_avr32 = "4.2.1"
PREFERRED_VERSION_binutils_avr32 = "2.17"
PREFERRED_VERSION_binutils-cross_avr32 = "2.17"
PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17"
-#there's is no avr32 patch for 0.9.29
-PREFERRED_VERSION_uclibc_avr32 = "0.9.28"
-PREFERRED_VERSION_uclibc-initial_avr32 = "0.9.28"
# Virtuals:
PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils = "binutils-cross"
@@ -204,7 +209,7 @@ DISTRO_EXTRA_RDEPENDS += "\
update-modules \
${@base_contains("MACHINE_FEATURES", "screen", "psplash", "",d)} \
angstrom-version \
- opkg-ipkg-compat ${ANGSTROM_FEED_CONFIGS} \
+ opkg opkg-collateral ${ANGSTROM_FEED_CONFIGS} \
util-linux-mount util-linux-umount \
${DEBUG_APPS} \
"
diff --git a/conf/distro/include/angstrom-2007-for-openmoko-versions.inc b/conf/distro/include/angstrom-2007-for-openmoko-versions.inc
index 700af88653..905e8680a5 100644
--- a/conf/distro/include/angstrom-2007-for-openmoko-versions.inc
+++ b/conf/distro/include/angstrom-2007-for-openmoko-versions.inc
@@ -224,12 +224,12 @@ PREFERRED_VERSION_db ?= "4.3.29"
PREFERRED_VERSION_db-native ?= "4.3.29"
PREFERRED_VERSION_db3 ?= "3.2.9"
PREFERRED_VERSION_db3-native ?= "3.2.9"
-PREFERRED_VERSION_dbench ?= "3.04"
+PREFERRED_VERSION_dbench ?= "4.0"
PREFERRED_VERSION_dbh ?= "1.0-18"
PREFERRED_VERSION_dbus ?= "1.0.2"
PREFERRED_VERSION_dbus-glib ?= "0.74"
PREFERRED_VERSION_dbus-glib-native ?= "0.74"
-PREFERRED_VERSION_dbus-native ?= "1.0.1"
+PREFERRED_VERSION_dbus-native ?= "1.0.3"
PREFERRED_VERSION_dbus-python ?= "0.71"
PREFERRED_VERSION_dcetest ?= "1.2"
PREFERRED_VERSION_dcopidl-native ?= "3.5.4"
@@ -613,11 +613,11 @@ PREFERRED_VERSION_gspcav1 ?= "20070110"
PREFERRED_VERSION_gst-ffmpeg ?= "0.10.2"
PREFERRED_VERSION_gst-meta-base ?= "0.10"
PREFERRED_VERSION_gst-plugin-pulse ?= "0.9.4"
-PREFERRED_VERSION_gst-plugins-bad ?= "0.10.5"
-PREFERRED_VERSION_gst-plugins-base ?= "0.10.14"
+PREFERRED_VERSION_gst-plugins-bad ?= "0.10.6"
+PREFERRED_VERSION_gst-plugins-base ?= "0.10.17"
PREFERRED_VERSION_gst-plugins-farsight ?= "0.10.1"
-PREFERRED_VERSION_gst-plugins-good ?= "0.10.6"
-PREFERRED_VERSION_gst-plugins-ugly ?= "0.10.6"
+PREFERRED_VERSION_gst-plugins-good ?= "0.10.7"
+PREFERRED_VERSION_gst-plugins-ugly ?= "0.10.7"
PREFERRED_VERSION_gstreamer ?= "0.10.14"
PREFERRED_VERSION_gthumb ?= "2.6.9"
PREFERRED_VERSION_gtk+ ?= "2.10.14"
@@ -662,7 +662,7 @@ PREFERRED_VERSION_hexatrolic ?= "1.0beta3"
PREFERRED_VERSION_hfsplusutils ?= "1.0.4-4"
PREFERRED_VERSION_hfsutils ?= "3.2.6"
PREFERRED_VERSION_hibernate-script ?= "1.12"
-PREFERRED_VERSION_hicolor-icon-theme ?= "0.10"
+PREFERRED_VERSION_hicolor-icon-theme ?= "0.9"
PREFERRED_VERSION_hiker ?= "0.9.1"
PREFERRED_VERSION_hildon-base-lib ?= "0.11.1"
PREFERRED_VERSION_hildon-control-panel ?= "0.9.1-1.2"
@@ -884,7 +884,7 @@ PREFERRED_VERSION_libg15 ?= "1.2.1"
PREFERRED_VERSION_libg15render ?= "1.2"
PREFERRED_VERSION_libgalago ?= "0.3.3"
PREFERRED_VERSION_libgc ?= "6.7"
-PREFERRED_VERSION_libgcrypt ?= "1.2.3"
+PREFERRED_VERSION_libgcrypt ?= "1.4.0"
PREFERRED_VERSION_libgeda ?= "20050820"
PREFERRED_VERSION_libgemwidget ?= "1.0"
PREFERRED_VERSION_libglade ?= "2.6.2"
@@ -985,7 +985,7 @@ PREFERRED_VERSION_libparams-util-perl ?= "0.20"
PREFERRED_VERSION_libparams-util-perl-native ?= "0.20"
PREFERRED_VERSION_libparams-validate-perl ?= "0.86"
PREFERRED_VERSION_libparams-validate-perl-native ?= "0.86"
-PREFERRED_VERSION_libpcap ?= "0.9.6"
+PREFERRED_VERSION_libpcap ?= "0.9.8"
PREFERRED_VERSION_libpcl ?= "1.4"
PREFERRED_VERSION_libpcre ?= "4.4"
PREFERRED_VERSION_libpcre-native ?= "4.4"
@@ -1023,7 +1023,7 @@ PREFERRED_VERSION_libsndfile1 ?= "1.0.17"
PREFERRED_VERSION_libsoundgen ?= "0.6"
PREFERRED_VERSION_libsoup ?= "2.2.100"
PREFERRED_VERSION_libspf2 ?= "1.0.4"
-PREFERRED_VERSION_libspiff ?= "0.7.2"
+PREFERRED_VERSION_libspiff ?= "0.8.2"
PREFERRED_VERSION_libssh ?= "0.11"
PREFERRED_VERSION_libsub-exporter-perl ?= "0.970"
PREFERRED_VERSION_libsub-exporter-perl-native ?= "0.970"
@@ -1404,7 +1404,7 @@ PREFERRED_VERSION_p4 ?= "05.2"
PREFERRED_VERSION_package-index ?= "1.0"
PREFERRED_VERSION_pad-native ?= "1.0"
PREFERRED_VERSION_pairs ?= "1.1.1"
-PREFERRED_VERSION_pango ?= "1.18.1"
+PREFERRED_VERSION_pango ?= "1.18.3"
PREFERRED_VERSION_panoramixext ?= "1.1"
PREFERRED_VERSION_parted ?= "1.8.7"
PREFERRED_VERSION_patch ?= "2.5.9"
@@ -1492,7 +1492,7 @@ PREFERRED_VERSION_pxaregs ?= "1.14"
PREFERRED_VERSION_python ?= "2.5.2"
PREFERRED_VERSION_python-ao ?= "0.82"
PREFERRED_VERSION_python-constraint ?= "1.1"
-PREFERRED_VERSION_python-dbus ?= "0.81.1"
+PREFERRED_VERSION_python-dbus ?= "0.82.4"
PREFERRED_VERSION_python-fam ?= "1.1.1"
PREFERRED_VERSION_python-fnorb ?= "1.3"
PREFERRED_VERSION_python-fpconst ?= "0.6.0"
@@ -1862,7 +1862,7 @@ PREFERRED_VERSION_tscalib ?= "0.0.1-3"
PREFERRED_VERSION_tsclient ?= "0.140"
PREFERRED_VERSION_tslib ?= "1.0"
PREFERRED_VERSION_ttf-bitstream-vera ?= "1.10"
-PREFERRED_VERSION_ttf-dejavu ?= "2.18"
+PREFERRED_VERSION_ttf-dejavu ?= "2.23"
PREFERRED_VERSION_ttf-gentium ?= "1.02"
PREFERRED_VERSION_ttf-hunkyfonts ?= "0.3.0"
PREFERRED_VERSION_ttf-liberation ?= "0.2"
@@ -1876,8 +1876,8 @@ PREFERRED_VERSION_twm ?= "1.0.3"
PREFERRED_VERSION_twutils ?= "0.2"
PREFERRED_VERSION_txdrug ?= "0.1"
PREFERRED_VERSION_tximage ?= "0.2"
-PREFERRED_VERSION_tzcode-native ?= "2007e"
-PREFERRED_VERSION_tzdata ?= "2007e"
+PREFERRED_VERSION_tzcode-native ?= "2007k"
+PREFERRED_VERSION_tzdata ?= "2007k"
PREFERRED_VERSION_u-boot ?= "1.2.0"
PREFERRED_VERSION_u-boot-omap2430sdp ?= "1.1.4"
PREFERRED_VERSION_u2nl ?= "1.3"
@@ -1944,7 +1944,7 @@ PREFERRED_VERSION_void11 ?= "0.2.0"
PREFERRED_VERSION_vorbis-tools ?= "1.0.1"
PREFERRED_VERSION_vpnc ?= "0.3.3"
PREFERRED_VERSION_vsftpd ?= "2.0.5"
-PREFERRED_VERSION_vte ?= "0.16.8"
+PREFERRED_VERSION_vte ?= "0.16.9"
PREFERRED_VERSION_vtun ?= "2.6"
PREFERRED_VERSION_w3cam ?= "0.7.2"
PREFERRED_VERSION_wakelan ?= "1.1"
diff --git a/conf/distro/include/angstrom-2008-preferred-versions.inc b/conf/distro/include/angstrom-2008-preferred-versions.inc
index 2c9543abd9..e326118a1a 100644
--- a/conf/distro/include/angstrom-2008-preferred-versions.inc
+++ b/conf/distro/include/angstrom-2008-preferred-versions.inc
@@ -1,8 +1,8 @@
PREFERRED_VERSION_busybox = "1.9.1"
PREFERRED_VERSION_dbus = "1.1.20"
-PREFERRED_VERSION_glib-2.0 = "2.15.6"
+PREFERRED_VERSION_glib-2.0 = "2.16.1"
PREFERRED_VERSION_gst-pulse = "0.9.7"
PREFERRED_VERSION_libtool = "1.5.10"
+PREFERRED_VERSION_pango = "1.18.3"
PREFERRED_VERSION_pulseaudio = "0.9.9"
PREFERRED_VERSION_udev = "118"
-PREFERRED_VERSION_vte = "0.16.10"
diff --git a/conf/distro/include/angstrom-uclinux-uclibc.inc b/conf/distro/include/angstrom-uclinux-uclibc.inc
new file mode 100644
index 0000000000..7d65fc1f02
--- /dev/null
+++ b/conf/distro/include/angstrom-uclinux-uclibc.inc
@@ -0,0 +1,22 @@
+# uclibc:
+#fix some iconv issues, needs to be adjusted when doing uclibc builds
+PREFERRED_PROVIDER_virtual/libc = "uclibc"
+PREFERRED_PROVIDER_virtual/libiconv ?= "libiconv"
+PREFERRED_PROVIDER_virtual/libintl ?= "gettext"
+
+USE_NLS ?= "no"
+USE_NLS_glib-2.0 = "yes"
+
+TARGET_OS_UC = "uclinux${@['-uclibc','-uclibcgnueabi'][bb.data.getVar('TARGET_ARCH',d,1) in ['arm', 'armeb'] and bb.data.getVar('MACHINE',d) not in ['collie','h3600', 'h3800', 'simpad', 'htcwallaby']]}"
+
+#mess with compiler flags to use -Os instead of -O2
+#Please see http://free-electrons.com/doc/embedded_linux_optimizations/img47.html for some more info
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os"
+BUILD_OPTIMIZATION = "-Os"
+
+#Gcc will die with 'internal consistency error when using the above optimizations
+FULL_OPTIMIZATION_avr32 = ""
+BUILD_OPTIMIZATION_avr32 = ""
+
+CXXFLAGS += "-fvisibility-inlines-hidden"
+
diff --git a/conf/distro/include/angstrom.inc b/conf/distro/include/angstrom.inc
index 0f7ce15a9d..8699dc183c 100644
--- a/conf/distro/include/angstrom.inc
+++ b/conf/distro/include/angstrom.inc
@@ -11,6 +11,7 @@ TARGET_VENDOR = "-angstrom"
# Can be "glibc", "eglibc" or "uclibc"
ANGSTROM_MODE ?= "glibc"
+PSTAGE_EXTRAPATH = "${ANGSTROM_MODE}"
CACHE = "${TMPDIR}/cache/${ANGSTROM_MODE}/${MACHINE}"
DEPLOY_DIR = "${TMPDIR}/deploy/${ANGSTROM_MODE}"
@@ -28,8 +29,26 @@ ANGSTROM_FEED_CONFIGS ?= "angstrom-feed-configs"
MAINTAINER = "Angstrom Developers <angstrom-distro-devel@linuxtogo.org>"
#use debian style naming
+INHERIT += "debian"
+
#use multimachine buildrules
-INHERIT += "debian multimachine sanity devshell angstrom-mirrors insane"
+INHERIT += "multimachine"
+
+#activate config checker
+INHERIT += "sanity"
+
+#make devshell available as task
+INHERIT += "devshell"
+
+#use angstrom source mirrors to combat 404s
+INHERIT += "angstrom-mirrors"
+
+#run QA tests on builds and packages and log them
+INHERIT += "insane"
+QA_LOG = "1"
+
+#save statistical info on images
+INHERIT += "testlab"
ANGSTROM_PKG_FORMAT ?= "ipk"
require conf/distro/include/angstrom-package-${ANGSTROM_PKG_FORMAT}.inc
@@ -46,6 +65,7 @@ ENABLE_BINARY_LOCALE_GENERATION_mx31ads = "0"
ENABLE_BINARY_LOCALE_GENERATION_nokia800 = "0"
ENABLE_BINARY_LOCALE_GENERATION_omap2420h4 = "0"
ENABLE_BINARY_LOCALE_GENERATION_omap2430sdp = "0"
+ENABLE_BINARY_LOCALE_GENERATION_beagleboard = "0"
#qemu has taken a dislike to armeb as well
ENABLE_BINARY_LOCALE_GENERATION_armeb = "0"
diff --git a/conf/distro/include/preferred-om-2008-versions.inc b/conf/distro/include/preferred-om-2008-versions.inc
index 7fb0bc28e0..a54cf9174f 100644
--- a/conf/distro/include/preferred-om-2008-versions.inc
+++ b/conf/distro/include/preferred-om-2008-versions.inc
@@ -11,4 +11,5 @@ PREFERRED_VERSION_libtool = "1.5.24"
PREFERRED_VERSION_midori = "0.0.17"
PREFERRED_VERSION_pulseaudio = "0.9.9"
PREFERRED_VERSION_udev = "118"
-PREFERRED_VERSION_vte = "0.16.10"
+PREFERRED_VERSION_vte = "0.16.9"
+
diff --git a/conf/distro/include/preferred-xorg-versions-X11R7.4.inc b/conf/distro/include/preferred-xorg-versions-X11R7.4.inc
index 4af2405aa7..d81067302e 100644
--- a/conf/distro/include/preferred-xorg-versions-X11R7.4.inc
+++ b/conf/distro/include/preferred-xorg-versions-X11R7.4.inc
@@ -138,7 +138,7 @@ PREFERRED_VERSION_xorg-docs ?= "1.4"
PREFERRED_VERSION_xorg-sgml-doctools ?= "1.2"
# driver
-PREFERRED_VERSION_xf86-input-acecad ?= "1.2.1"
+PREFERRED_VERSION_xf86-input-acecad ?= "1.2.2"
PREFERRED_VERSION_xf86-input-aiptek ?= "1.0.1"
PREFERRED_VERSION_xf86-input-calcomp ?= "1.1.1"
PREFERRED_VERSION_xf86-input-citron ?= "2.2.1"
@@ -155,7 +155,7 @@ PREFERRED_VERSION_xf86-input-joystick ?= "1.3.1"
PREFERRED_VERSION_xf86-input-keyboard ?= "1.2.2"
PREFERRED_VERSION_xf86-input-magellan ?= "1.1.1"
PREFERRED_VERSION_xf86-input-magictouch ?= "1.0.0.5"
-PREFERRED_VERSION_xf86-input-microtouch ?= "1.1.0"
+PREFERRED_VERSION_xf86-input-microtouch ?= "1.1.1"
PREFERRED_VERSION_xf86-input-mouse ?= "1.2.3"
PREFERRED_VERSION_xf86-input-mutouch ?= "1.1.0"
PREFERRED_VERSION_xf86-input-palmax ?= "1.1.0"
@@ -169,7 +169,7 @@ PREFERRED_VERSION_xf86-input-void ?= "1.1.1"
PREFERRED_VERSION_xf86-video-apm ?= "1.1.1"
PREFERRED_VERSION_xf86-video-ark ?= "0.6.0"
PREFERRED_VERSION_xf86-video-ast ?= "0.81.0"
-PREFERRED_VERSION_xf86-video-ati ?= "6.6.193"
+PREFERRED_VERSION_xf86-video-ati ?= "6.8.0"
PREFERRED_VERSION_xf86-video-chips ?= "1.1.1"
PREFERRED_VERSION_xf86-video-cirrus ?= "1.1.0"
PREFERRED_VERSION_xf86-video-cyrix ?= "1.1.0"
@@ -181,7 +181,7 @@ PREFERRED_VERSION_xf86-video-i128 ?= "1.1.0.6"
PREFERRED_VERSION_xf86-video-i740 ?= "1.1.0"
PREFERRED_VERSION_xf86-video-i810 ?= "1.6.5"
PREFERRED_VERSION_xf86-video-imstt ?= "1.1.0"
-PREFERRED_VERSION_xf86-video-intel ?= "2.2.0"
+PREFERRED_VERSION_xf86-video-intel ?= "2.2.1"
PREFERRED_VERSION_xf86-video-mga ?= "1.4.8"
PREFERRED_VERSION_xf86-video-neomagic ?= "1.1.1"
PREFERRED_VERSION_xf86-video-newport ?= "0.2.1"
@@ -237,7 +237,7 @@ PREFERRED_VERSION_libxdamage ?= "1.0.4"
PREFERRED_VERSION_libxdmcp-native ?= "1.0.2"
PREFERRED_VERSION_libxdmcp ?= "1.0.2"
PREFERRED_VERSION_libxevie ?= "1.0.2"
-PREFERRED_VERSION_libxext ?= "1.0.3"
+PREFERRED_VERSION_libxext ?= "1.0.4"
PREFERRED_VERSION_libxfixes ?= "4.0.3"
PREFERRED_VERSION_libxfont ?= "1.3.1"
PREFERRED_VERSION_libxfontcache ?= "1.0.4"
diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc
index dc5961c620..a3569ff226 100644
--- a/conf/distro/include/sane-srcrevs.inc
+++ b/conf/distro/include/sane-srcrevs.inc
@@ -17,14 +17,14 @@ SRCREV_pn-bfin-uclibc ?= "1857"
SRCREV_pn-contact ?= "1410"
SRCREV_pn-dbus-c++-native ?= "13131"
SRCREV_pn-dbus-c++ ?= "13131"
-SRCREV_pn-dfu-util ?= "2866"
-SRCREV_pn-dfu-util-native ?= "2866"
+SRCREV_pn-dfu-util ?= "4160"
+SRCREV_pn-dfu-util-native ?= "4160"
SRCREV_pn-diversity-daemon ?= "127"
SRCREV_pn-diversity-nav ?= "238"
SRCREV_pn-eds-dbus ?= "659"
-SRCREV_pn-eglibc ?= "4355"
-SRCREV_pn-eglibc-initial ?= "4355"
-SRCREV_pn-eglibc-intermediate ?= "4355"
+SRCREV_pn-eglibc ?= "5522"
+SRCREV_pn-eglibc-initial ?= "5522"
+SRCREV_pn-eglibc-intermediate ?= "5522"
SRCREV_pn-ezxd ?= "2074"
SRCREV_pn-elf2flt ?= "1786"
SRCREV_pn-epiphany ?= "7837"
@@ -38,18 +38,18 @@ SRCREV_pn-gsm0710muxd ?= "90"
SRCREV_pn-gtkhtml2 ?= "1158"
SRCREV_pn-gypsy ?= "134"
SRCREV_pn-hildon-1 ?= "14429"
-SRCREV_pn-illume ?= "12"
+SRCREV_pn-illume ?= "14"
SRCREV_pn-kismet ?= "2285"
SRCREV_pn-kismet-newcore ?= "2285"
SRCREV_pn-libcalenabler2 ?= "1410"
SRCREV_pn-libfakekey ?= "1455"
-SRCREV_pn-libgsmd ?= "3684"
+SRCREV_pn-libgsmd ?= "4216"
SRCREV_pn-libgsmd-devel ?= "3293"
-SRCREV_pn-libjana ?= "700"
+SRCREV_pn-libjana ?= "704"
SRCREV_pn-libmokogsmd2 ?= "3663"
-SRCREV_pn-libmokojournal2 ?= "3217"
+SRCREV_pn-libmokojournal2 ?= "3473"
SRCREV_pn-libmokopanelui2 ?= "3349"
-SRCREV_pn-libmokoui2 ?= "3688"
+SRCREV_pn-libmokoui2 ?= "3976"
SRCREV_pn-libw100 ?= "47"
SRCREV_pn-libowl ?= "277"
SRCREV_pn-libxosd ?= "627"
@@ -57,7 +57,7 @@ SRCREV_pn-lightmediascanner ?= "68"
SRCREV_pn-linux-bfin ?= "3758"
SRCREV_pn-linux-hackndev-2.6 ?= "1308"
SRCREV_pn-linux-ixp4xx ?= "1039"
-SRCREV_pn-linux-openmoko ?= "4102"
+SRCREV_pn-linux-openmoko ?= "4194"
SRCREV_pn-llvm-gcc4 ?= "374"
SRCREV_pn-llvm-gcc4-cross ?= "374"
SRCREV_pn-maemo-mapper ?= "118"
@@ -66,11 +66,11 @@ SRCREV_pn-matchbox-keyboard ?= "1739"
SRCREV_pn-matchbox-keyboard-inputmethod ?= "1739"
SRCREV_pn-matchbox-panel-2 ?= "1626"
SRCREV_pn-matchbox-stroke ?= "1820"
-SRCREV_pn-moko-gtk-engine ?= "3405"
+SRCREV_pn-moko-gtk-engine ?= "3612"
SRCREV_pn-mpd-alsa ?= "6952"
SRCREV_pn-mplayer ?= "24587"
SRCREV_pn-multitap-pad ?= "337"
-SRCREV_pn-neod ?= "3421"
+SRCREV_pn-neod ?= "4219"
SRCREV_pn-netsurf ?= "3859"
SRCREV_pn-networkmanager ?= "2887"
SRCREV_pn-networkmanager-applet ?= "200"
@@ -79,39 +79,39 @@ SRCREV_pn-osb-browser ?= "125"
SRCREV_pn-osb-jscore ?= "117"
SRCREV_pn-osb-nrcit ?= "125"
SRCREV_pn-osb-nrcore ?= "126"
-SRCREV_pn-openmoko-appearance ?= "3239"
+SRCREV_pn-openmoko-appearance ?= "3262"
SRCREV_pn-openmoko-appmanager ?= "1851"
SRCREV_pn-openmoko-appmanager2 ?= "3442"
-SRCREV_pn-openmoko-browser2 ?= "3646"
+SRCREV_pn-openmoko-browser2 ?= "4172"
SRCREV_pn-openmoko-calculator ?= "2404"
SRCREV_pn-openmoko-calculator2 ?= "3655"
SRCREV_pn-openmoko-common ?= "397"
SRCREV_pn-openmoko-common2 ?= "3259"
SRCREV_pn-openmoko-contacts ?= "2298"
-SRCREV_pn-openmoko-contacts2 ?= "387"
+SRCREV_pn-openmoko-contacts2 ?= "412"
SRCREV_pn-openmoko-dates ?= "467"
SRCREV_pn-openmoko-dates2 ?= "673"
SRCREV_pn-openmoko-dialer ?= "2811"
-SRCREV_pn-openmoko-dialer2 ?= "3689"
+SRCREV_pn-openmoko-dialer2 ?= "4224"
SRCREV_pn-openmoko-feedreader2 ?= "3645"
SRCREV_pn-openmoko-finger-demo ?= "1671"
SRCREV_pn-openmoko-firststart2 ?= "3158"
SRCREV_pn-openmoko-footer ?= "2354"
SRCREV_pn-openmoko-icon-theme-standard ?= "2232"
-SRCREV_pn-openmoko-icon-theme-standard2 ?= "3247"
-SRCREV_pn-openmoko-icon-theme-standard2-qvga ?= "3247"
+SRCREV_pn-openmoko-icon-theme-standard2 ?= "4225"
+SRCREV_pn-openmoko-icon-theme-standard2-qvga ?= "4225"
SRCREV_pn-openmoko-keyboard ?= "1631"
SRCREV_pn-openmoko-libs ?= "2367"
SRCREV_pn-openmoko-mediaplayer2 ?= "4173"
SRCREV_pn-openmoko-messages ?= "2276"
-SRCREV_pn-openmoko-messages2 ?= "3712"
+SRCREV_pn-openmoko-messages2 ?= "4182"
SRCREV_pn-openmoko-panel-battery ?= "3360"
-SRCREV_pn-openmoko-panel-bt ?= "3149"
+SRCREV_pn-openmoko-panel-bt ?= "4197"
SRCREV_pn-openmoko-panel-clock ?= "2567"
SRCREV_pn-openmoko-panel-demo ?= "1622"
SRCREV_pn-openmoko-panel-demo-simple ?= "1328"
SRCREV_pn-openmoko-panel-gps ?= "2900"
-SRCREV_pn-openmoko-panel-gsm ?= "3664"
+SRCREV_pn-openmoko-panel-gsm ?= "4191"
SRCREV_pn-openmoko-panel-mainmenu ?= "2567"
SRCREV_pn-openmoko-panel-memory ?= "3903"
SRCREV_pn-openmoko-panel-usb ?= "3360"
@@ -124,21 +124,22 @@ SRCREV_pn-openmoko-stylus-demo ?= "2324"
SRCREV_pn-openmoko-stylus-demo-simple ?= "1818"
SRCREV_pn-openmoko-taskmanager ?= "1663"
SRCREV_pn-openmoko-tasks ?= "320"
-SRCREV_pn-openmoko-tasks2 ?= "361"
-SRCREV_pn-openmoko-terminal2 ?= "3764"
-SRCREV_pn-openmoko-theme-standard ?= "2370"
-SRCREV_pn-openmoko-theme-standard-qvga ?= "2370"
+SRCREV_pn-openmoko-tasks2 ?= "398"
+SRCREV_pn-openmoko-terminal2 ?= "4039"
+SRCREV_pn-openmoko-theme-standard ?= "4167"
+SRCREV_pn-openmoko-theme-standard-qvga ?= "4167"
SRCREV_pn-openmoko-theme-standard2 ?= "3425"
SRCREV_pn-openmoko-theme-standard2-qvga ?= "3425"
SRCREV_pn-openmoko-today ?= "3056"
-SRCREV_pn-openmoko-today2 ?= "3609"
-SRCREV_pn-openmoko-today2-folders ?= "3414"
+SRCREV_pn-openmoko-today2 ?= "4168"
+SRCREV_pn-openmoko-today2-folders ?= "3704"
SRCREV_pn-openmoko-toolchain-scripts ?= "3767"
SRCREV_pn-openmoko-worldclock2 ?= "3365"
-SRCREV_pn-openocd ?= "206"
-SRCREV_pn-openocd-native ?= "206"
-SRCREV_pn-opkg ?= "4142"
-SRCREV_pn-opkg-native ?= "4142"
+SRCREV_pn-openocd ?= "517"
+SRCREV_pn-openocd-native ?= "517"
+SRCREV_pn-opkg ?= "4235"
+SRCREV_pn-opkg-native ?= "4235"
+SRCREV_pn-opkg-sdk ?= "4235"
SRCREV_pn-oprofileui ?= "160"
SRCREV_pn-psplash ?= "249"
SRCREV_pn-pty-forward-native ?= "4214"
@@ -155,8 +156,8 @@ SRCREV_pn-sjf2410-linux-native ?= "933"
SRCREV_pn-sphyrna ?= "45"
SRCREV_pn-tmut ?= "60"
SRCREV_pn-u-boot-openmoko ?= "4138"
-SRCREV_pn-usbpath ?= "3108"
-SRCREV_pn-usbpath-native ?= "3108"
+SRCREV_pn-usbpath ?= "3172"
+SRCREV_pn-usbpath-native ?= "3172"
SRCREV_pn-webkit-gtk ?= "30762"
SRCREV_pn-webkit-qt ?= "28656"
SRCREV_pn-webkit-qtopia ?= "28656"
diff --git a/conf/distro/openmoko.conf b/conf/distro/openmoko.conf
index 8fab5e5058..62d2189c8a 100644
--- a/conf/distro/openmoko.conf
+++ b/conf/distro/openmoko.conf
@@ -15,6 +15,7 @@ DISTRO_VERSION = "P1-Snapshot-${DATE}"
#DISTRO_TYPE = "release"
DISTRO_TYPE = "debug"
DISTRO_EXTRA_RDEPENDS += "opkg-ipkg-compat"
+DISTRO = "openmoko"
OVERRIDES = "local:${MACHINE}:openmoko:angstrom:${TARGET_OS}:${TARGET_ARCH}:build-${BUILD_OS}:fail-fast:pn-${PN}"
diff --git a/conf/distro/unslung.conf b/conf/distro/unslung.conf
index 5246df3990..b5d28f9024 100644
--- a/conf/distro/unslung.conf
+++ b/conf/distro/unslung.conf
@@ -59,6 +59,10 @@ PREFERRED_VERSION_gcc ?= "3.4.4"
PREFERRED_VERSION_glibc ?= "2.2.5"
PREFERRED_VERSION_glibc-initial ?= "2.2.5"
+# Whilst gcc 3.4.4 sypports sysroot, binutils 2.15.94.0.1 does not
+# so we need the linkage helpers to help binutils find staging.
+DEPENDS_append_pn-linux-libc-headers = "cross-linkage staging-linkage"
+
PREFERRED_PROVIDER_virtual/kernel = "unslung-kernel"
PREFERRED_VERSION_unslung-kernel ?= "2.4.22.l2.3r63"
PREFERRED_VERSION_unslung-rootfs ?= "2.3r63"
@@ -76,3 +80,6 @@ INHERIT += "nslu2-mirrors"
# - mwester 16 Dec 2006
#
PREFERRED_VERSION_linux-libc-headers ?= "2.6.11.1"
+
+require conf/distro/include/sane-srcdates.inc
+require conf/distro/include/sane-srcrevs.inc
diff --git a/conf/machine/at32stk1000.conf b/conf/machine/at32stk1000.conf
index add4c7e2d9..23c8942ab2 100644
--- a/conf/machine/at32stk1000.conf
+++ b/conf/machine/at32stk1000.conf
@@ -14,7 +14,7 @@ USE_VT = "0"
MACHINE_FEATURES = "kernel26 alsa ext2 usbgadget touchscreen screen"
# used by sysvinit_2
-SERIAL_CONSOLE = "115200"
+SERIAL_CONSOLE = "115200 ttyS0"
# used by some images
IMAGE_FSTYPES ?= "jffs2"
@@ -24,4 +24,7 @@ EXTRA_IMAGECMD_jffs2 = " --big-endian --pagesize=4096 --eraseblock=65536"
KERNEL_IMAGETYPE = "uImage"
PREFERRED_VERSION_u-boot = "1.1.4"
+UBOOT_ENTRYPOINT = "0x90000000"
+UBOOT_LOADADDRESS = "0x10000000"
+
diff --git a/conf/machine/atngw100.conf b/conf/machine/atngw100.conf
index 559bd40c75..77f9fdf34e 100644
--- a/conf/machine/atngw100.conf
+++ b/conf/machine/atngw100.conf
@@ -13,7 +13,7 @@ MACHINE_FEATURES = "kernel26 ext2 usbgadget"
PREFERRED_PROVIDER_virtual/kernel = "linux"
# used by sysvinit_2
-SERIAL_CONSOLE = "115200"
+SERIAL_CONSOLE = "115200 ttyS0"
# used by some images
ROOT_FLASH_SIZE = "8"
@@ -23,6 +23,6 @@ PREFERRED_VERSION_u-boot = "1.1.4"
KERNEL_IMAGETYPE = "uImage"
UBOOT_ENTRYPOINT = "0x90000000"
-UBOOT_LOADADRESS = "0x10000000"
+UBOOT_LOADADDRESS = "0x10000000"
diff --git a/conf/machine/beagleboard.conf b/conf/machine/beagleboard.conf
new file mode 100644
index 0000000000..76c27b153e
--- /dev/null
+++ b/conf/machine/beagleboard.conf
@@ -0,0 +1,34 @@
+#@TYPE: Machine
+#@NAME: Beagleboard machine
+#@DESCRIPTION: Machine configuration for the http://beagleboard.org/ board
+TARGET_ARCH = "arm"
+PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te armv6 armv7 armv7-a"
+
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive-xomap"
+XSERVER = "xserver-kdrive-xomap"
+
+# Only has DVI connector for external screen
+GUI_MACHINE_CLASS = "bigscreen"
+
+TARGET_FPU = "hard"
+include conf/machine/include/tune-arm1136jf-s.inc
+# requires gcc 4.3.0:
+#include conf/machine/include/tune-cortexa8.inc
+
+
+IMAGE_FSTYPES ?= "tar.bz2"
+
+# Guesswork
+SERIAL_CONSOLE = "115200 ttyS2"
+
+# No kernel recipe yet
+PREFERRED_PROVIDER_virtual/kernel = "linux-beagleboard"
+
+KERNEL_IMAGETYPE = "uImage"
+
+UBOOT_ENTRYPOINT = "0x80008000"
+UBOOT_LOADADDRESS = "0x80008000"
+
+
+# and sdio
+MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat"
diff --git a/conf/machine/h2200.conf b/conf/machine/h2200.conf
index cad7d0393c..4c7e413fa0 100644
--- a/conf/machine/h2200.conf
+++ b/conf/machine/h2200.conf
@@ -41,6 +41,7 @@ EXTRA_IMAGECMD_jffs2 = "--pad --eraseblock=0x4000"
module_autoload_snd-pcm-oss = "snd-pcm-oss"
module_autoload_snd-mixer-oss = "snd-mixer-oss"
module_autoload_snd-h2200-audio = "snd-h2200-audio"
+module_autoload_g_ether = "g_ether"
SERIAL_CONSOLE = "115200 ttyS0 vt100"
USE_VT = "0"
diff --git a/conf/machine/include/tune-armv7.inc b/conf/machine/include/tune-armv7.inc
new file mode 100644
index 0000000000..61b4685f10
--- /dev/null
+++ b/conf/machine/include/tune-armv7.inc
@@ -0,0 +1,5 @@
+# valid options for -march: `armv7', `armv7-a', `armv7-r', `armv7-m'
+# valid option for -mtune: `cortex-a8', `cortex-r4', `cortex-m3', `cortex-m1'
+TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"
+FEED_ARCH = "armv7"
+PACKAGE_ARCH = "armv7"
diff --git a/conf/machine/include/tune-cortexa8.inc b/conf/machine/include/tune-cortexa8.inc
new file mode 100644
index 0000000000..2da31ecd35
--- /dev/null
+++ b/conf/machine/include/tune-cortexa8.inc
@@ -0,0 +1,4 @@
+# valid options for -march: `armv7', `armv7-a'
+TARGET_CC_ARCH = "-march=armv7 -mtune=cortex-a8 -mfpu=vfp -mfloat-abi=softfp"
+FEED_ARCH = "armv7"
+PACKAGE_ARCH = "armv7"
diff --git a/conf/machine/include/tune-cortexm1.inc b/conf/machine/include/tune-cortexm1.inc
new file mode 100644
index 0000000000..a0d18b69c6
--- /dev/null
+++ b/conf/machine/include/tune-cortexm1.inc
@@ -0,0 +1,3 @@
+TARGET_CC_ARCH = "-march=armv7 -mtune=cortex-m1 -mfpu=vfp -mfloat-abi=softfp"
+FEED_ARCH = "armv6"
+PACKAGE_ARCH = "armv6"
diff --git a/conf/machine/include/tune-cortexm3.inc b/conf/machine/include/tune-cortexm3.inc
new file mode 100644
index 0000000000..72ec53d7c0
--- /dev/null
+++ b/conf/machine/include/tune-cortexm3.inc
@@ -0,0 +1,4 @@
+# valid options for -march: `armv7', `armv7-m'
+TARGET_CC_ARCH = "-march=armv7 -mtune=cortex-m3 -mfpu=vfp -mfloat-abi=softfp"
+FEED_ARCH = "armv7"
+PACKAGE_ARCH = "armv7"
diff --git a/conf/machine/include/tune-cortexr4.inc b/conf/machine/include/tune-cortexr4.inc
new file mode 100644
index 0000000000..5d9a30f629
--- /dev/null
+++ b/conf/machine/include/tune-cortexr4.inc
@@ -0,0 +1,4 @@
+# valid options for -march: `armv7', `armv7-r'
+TARGET_CC_ARCH = "-march=armv7 -mtune=cortex-r4 -mfpu=vfp -mfloat-abi=softfp"
+FEED_ARCH = "armv7"
+PACKAGE_ARCH = "armv7"
diff --git a/conf/machine/mainstone.conf b/conf/machine/mainstone.conf
index af3e5a5cc3..68dcfb069a 100644
--- a/conf/machine/mainstone.conf
+++ b/conf/machine/mainstone.conf
@@ -7,15 +7,14 @@ TARGET_ARCH = "arm"
GUI_MACHINE_CLASS = "smallscreen"
PACKAGE_EXTRA_ARCHS = "armv5te"
-PREFERRED_PROVIDER_virtual/kernel = "${MACHINE}-kernel"
+PREFERRED_PROVIDER_virtual/kernel = "linux-${MACHINE}"
require conf/machine/include/tune-xscale.inc
# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttyS0"
-# used by opie-collections.inc
ROOT_FLASH_SIZE = "16"
MACHINE_FEATURES = "kernel26 pcmcia usbhost usbgadget pcmcia touchscreen keyboard alsa irda"
-EXTRA_IMAGECMD_jffs2 = "--pad --little-endian -e 0x40000 --pad=0x01000000"
+EXTRA_IMAGECMD_jffs2 = "--little-endian -e 0x40000 --pad=0x02000000"
diff --git a/conf/machine/omap5912osk.conf b/conf/machine/omap5912osk.conf
index 7a7b5c1a60..5c7f5bed7f 100644
--- a/conf/machine/omap5912osk.conf
+++ b/conf/machine/omap5912osk.conf
@@ -8,6 +8,8 @@ PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5e armv5te"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
PREFERRED_PROVIDER_virtual/kernel = "linux-omap1"
+UBOOT_ENTRYPOINT="0x10c08000"
+
# PREFERRED_VERSION_u-boot = "1.1.6"
SERIAL_CONSOLE ?= "115200 ttyS0"
@@ -26,6 +28,8 @@ MACHINE_EXTRA_RRECOMMENDS = "kernel-module-ide-cs \
kernel-module-nls-base \
kernel-module-vfat \
kernel-module-ohci-hcd \
+ kernel-module-tlv320aic23 \
+ kernel-module-snd-omap-alsa-aic23 \
"
RDEPENDS_kernel-base = ""
diff --git a/contrib/angstrom/build-feeds.sh b/contrib/angstrom/build-feeds.sh
index d5354b2735..600352ec6e 100755
--- a/contrib/angstrom/build-feeds.sh
+++ b/contrib/angstrom/build-feeds.sh
@@ -43,7 +43,7 @@ do
BUILD_MACHINE=$machine
BUILD_CLEAN="libtool-cross qmake-native qmake2-native"
BUILD_TARGETS="texinfo flex bison gperf gcc binutils make automake autoconf m4 pkgconfig distcc \
- usbutils pciutils mtd-utils usbview hal \
+ usbutils pciutils mtd-utils usbview hal setserial \
task-proper-tools mc screen findutils \
mono perl python ruby \
gtk+ qt-x11-free qt4-x11-free \
@@ -55,7 +55,7 @@ do
roadmap-gtk2 gpsdrive navit \
xmms mplayer quasar vlc-gpe gnome-mplayer \
wpa-gui wifi-radar kismet aircrack-ng dsniff \
- nmap iptables iperf \
+ nmap iptables iperf openvpn vpnc \
gpe-login ipaq-sleep \
gpe-bluetooth bluez-gnome python-pybluez \
abiword gnumeric evince epdfview gimp \
diff --git a/packages/aircrack/aircrack-ng_0.9.1.bb b/packages/aircrack/aircrack-ng_0.9.1.bb
deleted file mode 100644
index 116ee599e3..0000000000
--- a/packages/aircrack/aircrack-ng_0.9.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "Aircrack-ng is a set of tools for wep key statistical cracking"
-HOMEPAGE = "http://www.aircrack-ng.org/"
-SECTION = "console/network"
-LICENSE = "GPLv2"
-PR = "r2"
-
-SRC_URI = "http://download.aircrack-ng.org/aircrack-ng-${PV}.tar.gz"
-
-do_install() {
- install -d ${D}/${sbindir}
- install -d ${D}/${bindir}
- install -m 0755 airodump-ng ${D}/${sbindir}
- install -m 0755 aircrack-ng ${D}/${bindir}
- install -m 0755 aireplay-ng ${D}/${sbindir}
- install -m 0755 airdecap-ng ${D}/${bindir}
- install -m 0755 packetforge-ng ${D}/${bindir}
- install -m 0755 airmon-ng ${D}/${sbindir}
- install -m 0755 ivstools ${D}/${bindir}
- install -m 0755 kstats ${D}/${bindir}
- install -m 0755 airtun-ng ${D}/${sbindir}
- install -m 0755 makeivs ${D}/${bindir}
-}
diff --git a/packages/aircrack/aircrack-ng_0.9.3.bb b/packages/aircrack/aircrack-ng_0.9.3.bb
new file mode 100644
index 0000000000..1452a64bc1
--- /dev/null
+++ b/packages/aircrack/aircrack-ng_0.9.3.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "Aircrack-ng is a set of tools for wep key statistical cracking"
+HOMEPAGE = "http://www.aircrack-ng.org/"
+SECTION = "console/network"
+LICENSE = "GPLv2"
+PR = "r0"
+
+SRC_URI = "http://download.aircrack-ng.org/aircrack-ng-${PV}.tar.gz"
+
+SBINFILES = "airodump-ng aireplay-ng airmon-ng airtun-ng"
+BINFILES = "aircrack-ng airdecap-ng packetforge-ng ivstools kstats makeivs"
+
+do_install() {
+ install -d ${D}/${sbindir}
+ for i in ${SBINFILES}; do
+ install -m 0755 $i ${D}/${sbindir}
+ done
+
+ install -d ${D}/${bindir}
+ for i in ${BINFILES}; do
+ install -m 0755 $i ${D}/${bindir}
+ done
+}
diff --git a/packages/alsa/alsa-state.bb b/packages/alsa/alsa-state.bb
index 16fee583d4..fa9dbe0fb8 100644
--- a/packages/alsa/alsa-state.bb
+++ b/packages/alsa/alsa-state.bb
@@ -8,7 +8,7 @@ DESCRIPTION = "Default ALSA configuration"
LICENSE = "GPL"
RRECOMMENDS_alsa-state = "alsa-states"
PV = "0.1.0"
-PR = "r13"
+PR = "r14"
SRC_URI = " \
file://asoundrc \
diff --git a/packages/angstrom/angstrom-feed-configs.bb b/packages/angstrom/angstrom-feed-configs.bb
index d0465b4d53..0b17aa6cb8 100644
--- a/packages/angstrom/angstrom-feed-configs.bb
+++ b/packages/angstrom/angstrom-feed-configs.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Configuration files for online package repositories aka feeds"
#PV = "${DISTRO_VERSION}"
-PR = "r4"
+PR = "r5"
PACKAGE_ARCH = "${MACHINE_ARCH}"
FEED_BASEPATH ?= "unstable/feed/"
@@ -9,37 +9,32 @@ FEED_BASEPATH ?= "unstable/feed/"
IWMMXT_FEED = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '',d)}"
do_compile() {
- mkdir -p ${S}/${sysconfdir}/ipkg
+ mkdir -p ${S}/${sysconfdir}/opkg
for feed in base debug perl python gstreamer ; do
- echo "src/gz ${feed} ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/${feed}" > ${S}/${sysconfdir}/ipkg/${feed}-feed.conf
+ echo "src/gz ${feed} ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/${feed}" > ${S}/${sysconfdir}/opkg/${feed}-feed.conf
done
- echo "src/gz ${MACHINE_ARCH} ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/machine/${MACHINE_ARCH}" > ${S}/${sysconfdir}/ipkg/${MACHINE_ARCH}-feed.conf
- echo "src/gz no-arch ${ANGSTROM_URI}/${FEED_BASEPATH}/all" > ${S}/${sysconfdir}/ipkg/noarch-feed.conf
+ echo "src/gz ${MACHINE_ARCH} ${ANGSTROM_URI}/${FEED_BASEPATH}${FEED_ARCH}/machine/${MACHINE_ARCH}" > ${S}/${sysconfdir}/opkg/${MACHINE_ARCH}-feed.conf
+ echo "src/gz no-arch ${ANGSTROM_URI}/${FEED_BASEPATH}/all" > ${S}/${sysconfdir}/opkg/noarch-feed.conf
# iwmmxt is a special case, add the iwmmxt feed for machine that have 'iwmmxt' in MACHINE_FEATURES
if [ "${IWMMXT_FEED}" = "iwmmxt" ] ; then
- echo "src/gz iwmmxt ${ANGSTROM_URI}/${FEED_BASEPATH}iwmmxt/base" > ${S}/${sysconfdir}/ipkg/iwmmxt-feed.conf
+ echo "src/gz iwmmxt ${ANGSTROM_URI}/${FEED_BASEPATH}iwmmxt/base" > ${S}/${sysconfdir}/opkg/iwmmxt-feed.conf
fi
}
do_install () {
- install -d ${D}${sysconfdir}/ipkg
- install -m 0644 ${S}/${sysconfdir}/ipkg/* ${D}${sysconfdir}/ipkg/
- # opkg compat symlinks
install -d ${D}${sysconfdir}/opkg
- for feed in ${D}${sysconfdir}/ipkg/* ; do
- ln -sf ${sysconfdir}/ipkg/$(basename $feed) ${D}${sysconfdir}/opkg/$(basename $feed)
- done
+ install -m 0644 ${S}/${sysconfdir}/opkg/* ${D}${sysconfdir}/opkg/
}
-CONFFILES_${PN} += "${sysconfdir}/ipkg/base-feed.conf \
- ${sysconfdir}/ipkg/debug-feed.conf \
- ${sysconfdir}/ipkg/perl-feed.conf \
- ${sysconfdir}/ipkg/python-feed.conf \
- ${sysconfdir}/ipkg/gstreamer-feed.conf \
- ${sysconfdir}/ipkg/${MACHINE_ARCH}-feed.conf \
- ${sysconfdir}/ipkg/noarch-feed.conf \
+CONFFILES_${PN} += "${sysconfdir}/opkg/base-feed.conf \
+ ${sysconfdir}/opkg/debug-feed.conf \
+ ${sysconfdir}/opkg/perl-feed.conf \
+ ${sysconfdir}/opkg/python-feed.conf \
+ ${sysconfdir}/opkg/gstreamer-feed.conf \
+ ${sysconfdir}/opkg/${MACHINE_ARCH}-feed.conf \
+ ${sysconfdir}/opkg/noarch-feed.conf \
"
diff --git a/packages/apache2/apache2-native_2.2.3.bb b/packages/apache2/apache2-native_2.2.3.bb
index d5fb0cff21..ebf68b52e5 100644
--- a/packages/apache2/apache2-native_2.2.3.bb
+++ b/packages/apache2/apache2-native_2.2.3.bb
@@ -12,7 +12,7 @@ do_configure () {
./configure --with-included-apr --prefix=${prefix}
}
-do_populate_staging () {
+do_stage () {
cp srclib/pcre/dftables ${STAGING_BINDIR}
cp server/gen_test_char ${STAGING_BINDIR}
cp srclib/apr/apr-1-config ${STAGING_BINDIR}
diff --git a/packages/apex/apex-nslu2-16mb_1.5.13.bb b/packages/apex/apex-nslu2-16mb_1.5.13.bb
index 2937876c03..84199ed053 100644
--- a/packages/apex/apex-nslu2-16mb_1.5.13.bb
+++ b/packages/apex/apex-nslu2-16mb_1.5.13.bb
@@ -50,7 +50,7 @@ do_configure() {
DEPENDS += "devio-native"
-do_populate_staging() {
+do_stage() {
install -d ${STAGING_LOADER_DIR}
. ${CONFIG_SITE}
if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
diff --git a/packages/apex/apex-nslu2-16mb_1.5.8.bb b/packages/apex/apex-nslu2-16mb_1.5.8.bb
index 6289d7c104..52e13d2073 100644
--- a/packages/apex/apex-nslu2-16mb_1.5.8.bb
+++ b/packages/apex/apex-nslu2-16mb_1.5.8.bb
@@ -48,7 +48,7 @@ do_configure() {
DEPENDS += "devio-native"
-do_populate_staging() {
+do_stage() {
install -d ${STAGING_LOADER_DIR}
. ${CONFIG_SITE}
if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
diff --git a/packages/apex/apex-nslu2_1.5.13.bb b/packages/apex/apex-nslu2_1.5.13.bb
index 7fc7ea65b6..a3ce223e92 100644
--- a/packages/apex/apex-nslu2_1.5.13.bb
+++ b/packages/apex/apex-nslu2_1.5.13.bb
@@ -50,7 +50,7 @@ do_configure() {
DEPENDS += "devio-native"
-do_populate_staging() {
+do_stage() {
install -d ${STAGING_LOADER_DIR}
. ${CONFIG_SITE}
if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
diff --git a/packages/apex/apex-nslu2_1.5.8.bb b/packages/apex/apex-nslu2_1.5.8.bb
index 8444d19472..ada148e2b4 100644
--- a/packages/apex/apex-nslu2_1.5.8.bb
+++ b/packages/apex/apex-nslu2_1.5.8.bb
@@ -48,7 +48,7 @@ do_configure() {
DEPENDS += "devio-native"
-do_populate_staging() {
+do_stage() {
install -d ${STAGING_LOADER_DIR}
. ${CONFIG_SITE}
if [ "x$ac_cv_c_bigendian" = "xyes" -o "x$ac_cv_c_littleendian" = "xno" ]; then
diff --git a/packages/busybox/busybox-1.9.1/openmoko/.mtn2git_empty b/packages/apr/apr-util/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/busybox/busybox-1.9.1/openmoko/.mtn2git_empty
+++ b/packages/apr/apr-util/.mtn2git_empty
diff --git a/packages/apr/apr-util/configure_fixes.patch b/packages/apr/apr-util/configure_fixes.patch
new file mode 100644
index 0000000000..16f88b3bba
--- /dev/null
+++ b/packages/apr/apr-util/configure_fixes.patch
@@ -0,0 +1,25 @@
+Index: apr-util-1.2.12/configure.in
+===================================================================
+--- apr-util-1.2.12.orig/configure.in 2008-03-08 19:15:00.000000000 +0000
++++ apr-util-1.2.12/configure.in 2008-03-08 19:15:13.000000000 +0000
+@@ -8,13 +8,13 @@
+ AC_CONFIG_HEADER(include/private/apu_config.h)
+ AC_CONFIG_AUX_DIR(build)
+
+-sinclude(build/apu-conf.m4)
+-sinclude(build/apu-iconv.m4)
+-sinclude(build/apu-hints.m4)
+-sinclude(build/apr_common.m4)
+-sinclude(build/find_apr.m4)
+-sinclude(build/dbm.m4)
+-sinclude(build/dbd.m4)
++#sinclude(build/apu-conf.m4)
++#sinclude(build/apu-iconv.m4)
++#sinclude(build/apu-hints.m4)
++#sinclude(build/apr_common.m4)
++#sinclude(build/find_apr.m4)
++#sinclude(build/dbm.m4)
++#sinclude(build/dbd.m4)
+
+ dnl Generate ./config.nice for reproducing runs of configure
+ dnl
diff --git a/packages/apr/apr-util_1.2.12.bb b/packages/apr/apr-util_1.2.12.bb
new file mode 100644
index 0000000000..64f6bcbcf8
--- /dev/null
+++ b/packages/apr/apr-util_1.2.12.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Apache Portable Runtime (APR) companion library"
+SECTION = "libs"
+DEPENDS = "apr expat gdbm"
+LICENSE = "Apache License, Version 2.0"
+
+PR = "r2"
+
+# apache mirrors?
+SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.gz \
+ file://configure_fixes.patch;patch=1"
+
+EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS} --with-dbm=gdbm \
+ --with-gdbm=${STAGING_DIR_HOST}${layout_prefix} \
+ --without-sqlite2 \
+ --without-sqlite3 \
+ --with-expat=${STAGING_DIR_HOST}${layout_prefix}"
+
+
+inherit autotools lib_package binconfig
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+do_configure_prepend() {
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
+}
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/packages/apr/apr-util_1.2.7.bb b/packages/apr/apr-util_1.2.7.bb
index 904e41f8a3..5f019d624e 100644
--- a/packages/apr/apr-util_1.2.7.bb
+++ b/packages/apr/apr-util_1.2.7.bb
@@ -3,10 +3,11 @@ SECTION = "libs"
DEPENDS = "apr expat gdbm"
LICENSE = "Apache License, Version 2.0"
-PR = "r2"
+PR = "r3"
# apache mirrors?
-SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.gz"
+SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.gz \
+ file://configure_fixes.patch;patch=1"
EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS} --with-dbm=gdbm \
--with-gdbm=${STAGING_DIR_HOST}${layout_prefix} \
@@ -19,14 +20,10 @@ inherit autotools lib_package binconfig
OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
-do_configure() {
- cp ${STAGING_DATADIR}/apr_rules.mk ${S}/build/rules.mk
- oe_runconf
+do_configure_prepend () {
+ cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk
}
do_stage() {
- autotools_stage_all
- sed -i s,/usr/lib/libgdbm.la,-lgdbm,g ${STAGING_LIBDIR}/libaprutil-1.la
- sed -i s,/usr/lib/libexpat.la,-lexpat,g ${STAGING_LIBDIR}/libaprutil-1.la
- sed -i s,/usr/lib/libapr-1.la,-lapr-1,g ${STAGING_LIBDIR}/libaprutil-1.la
+ autotools_stage_all
}
diff --git a/packages/gcc/gcc-4.1.0/.mtn2git_empty b/packages/apr/apr/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/gcc/gcc-4.1.0/.mtn2git_empty
+++ b/packages/apr/apr/.mtn2git_empty
diff --git a/packages/apr/apr/configure_fixes.patch b/packages/apr/apr/configure_fixes.patch
new file mode 100644
index 0000000000..2b2e0eccb2
--- /dev/null
+++ b/packages/apr/apr/configure_fixes.patch
@@ -0,0 +1,22 @@
+Index: apr-1.2.12/configure.in
+===================================================================
+--- apr-1.2.12.orig/configure.in 2008-03-08 21:41:43.000000000 +0000
++++ apr-1.2.12/configure.in 2008-03-08 21:43:08.000000000 +0000
+@@ -13,12 +13,11 @@
+ dnl
+ dnl Include our own M4 macros along with those for libtool
+ dnl
+-sinclude(build/apr_common.m4)
+-sinclude(build/apr_network.m4)
+-sinclude(build/apr_threads.m4)
+-sinclude(build/apr_hints.m4)
+-sinclude(build/libtool.m4)
+-sinclude(build/ltsugar.m4)
++#sinclude(build/apr_common.m4)
++#sinclude(build/apr_network.m4)
++#sinclude(build/apr_threads.m4)
++#sinclude(build/apr_hints.m4)
++#sinclude(build/libtool.m4)
+
+ dnl Hard-coded inclusion at the tail end of apr_private.h:
+ AH_BOTTOM([
diff --git a/packages/apr/apr_1.2.12.bb b/packages/apr/apr_1.2.12.bb
new file mode 100644
index 0000000000..923e9b380c
--- /dev/null
+++ b/packages/apr/apr_1.2.12.bb
@@ -0,0 +1,26 @@
+DESCRIPTION = "Apache Portable Runtime (APR) library"
+SECTION = "libs"
+LICENSE = "Apache License, Version 2.0"
+
+PR = "r0"
+
+# apache mirrors?
+SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.bz2 \
+ file://configure_fixes.patch;patch=1"
+
+inherit autotools lib_package binconfig
+
+OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'"
+
+do_stage() {
+ autotools_stage_all
+ install -d ${STAGING_DATADIR}/apr
+ cp ${S}/build/apr_rules.mk ${STAGING_DATADIR}/apr/
+ sed -i s,apr_builddir=.*,apr_builddir=,g ${STAGING_DATADIR}/apr/apr_rules.mk
+ sed -i s,apr_builders=.*,apr_builders=,g ${STAGING_DATADIR}/apr/apr_rules.mk
+ sed -i s,LIBTOOL=.*,LIBTOOL=\$\(SHELL\)\ ${TARGET_PREFIX}libtool,g ${STAGING_DATADIR}/apr/apr_rules.mk
+ sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g ${STAGING_DATADIR}/apr/apr_rules.mk
+ cp ${S}/build/mkdir.sh ${STAGING_DATADIR}/apr/
+ cp ${S}/build/make_exports.awk ${STAGING_DATADIR}/apr/
+ cp ${S}/build/make_var_export.awk ${STAGING_DATADIR}/apr/
+}
diff --git a/packages/apr/apr_1.2.7.bb b/packages/apr/apr_1.2.7.bb
index d0f2916bfa..16365d7998 100644
--- a/packages/apr/apr_1.2.7.bb
+++ b/packages/apr/apr_1.2.7.bb
@@ -2,10 +2,11 @@ DESCRIPTION = "Apache Portable Runtime (APR) library"
SECTION = "libs"
LICENSE = "Apache License, Version 2.0"
-PR = "r1"
+PR = "r2"
# apache mirrors?
-SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.bz2"
+SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.bz2 \
+ file://configure_fixes.patch;patch=1"
inherit autotools lib_package binconfig
@@ -17,5 +18,13 @@ do_configure() {
do_stage() {
autotools_stage_all
- cp ${S}/build/apr_rules.mk ${STAGING_DATADIR}
+ install -d ${STAGING_DATADIR}/apr
+ cp ${S}/build/apr_rules.mk ${STAGING_DATADIR}/apr/
+ sed -i s,apr_builddir=.*,apr_builddir=,g ${STAGING_DATADIR}/apr/apr_rules.mk
+ sed -i s,apr_builders=.*,apr_builders=,g ${STAGING_DATADIR}/apr/apr_rules.mk
+ sed -i s,LIBTOOL=.*,LIBTOOL=\$\(SHELL\)\ ${TARGET_PREFIX}libtool,g ${STAGING_DATADIR}/apr/apr_rules.mk
+ sed -i s,\$\(apr_builders\),${STAGING_DATADIR}/apr/,g ${STAGING_DATADIR}/apr/apr_rules.mk
+ cp ${S}/build/mkdir.sh ${STAGING_DATADIR}/apr/
+ cp ${S}/build/make_exports.awk ${STAGING_DATADIR}/apr/
+ cp ${S}/build/make_var_export.awk ${STAGING_DATADIR}/apr/
}
diff --git a/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb b/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb
index fee3691c3c..c6761c99b2 100644
--- a/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb
+++ b/packages/arm-kernel-shim/arm-kernel-shim_1.5.bb
@@ -76,7 +76,7 @@ oe_runmake() {
mv ${S}/config.h.orig ${S}/config.h
}
-do_populate_staging() {
+do_stage() {
install -d ${STAGING_LOADER_DIR}
cp ${S}/arm-kernel-shim-nslu2.bin ${STAGING_LOADER_DIR}/
cp ${S}/arm-kernel-shim-nas100d.bin ${STAGING_LOADER_DIR}/
diff --git a/packages/binutils/binutils-cross-sdk.inc b/packages/binutils/binutils-cross-sdk.inc
new file mode 100644
index 0000000000..b545083d94
--- /dev/null
+++ b/packages/binutils/binutils-cross-sdk.inc
@@ -0,0 +1,25 @@
+inherit sdk
+DEPENDS += "flex-native bison-native"
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
+EXTRA_OECONF = "--with-sysroot=${prefix}/${TARGET_SYS} \
+ --program-prefix=${TARGET_PREFIX}"
+
+do_stage() {
+ :
+}
+
+do_install () {
+ autotools_do_install
+
+ # Fix the ${prefix}/${TARGET_SYS}/bin/* files to be symlinks
+ rm ${D}${prefix}/${TARGET_SYS}/bin/.debug -Rf
+ rm ${D}${prefix}/${TARGET_SYS}/bin/*
+ for l in ${D}${bindir}/*; do
+ ln -sf "${bindir}/`basename $l`" "${D}${prefix}/${TARGET_SYS}/bin/`basename $l | sed -e 's,${TARGET_PREFIX},,'`"
+ done
+
+ # Install the libiberty header
+ install -d ${D}${includedir}
+ install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+ install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+}
diff --git a/packages/binutils/binutils-cross-sdk_2.14.90.0.6.bb b/packages/binutils/binutils-cross-sdk_2.14.90.0.6.bb
index 33e0a24a53..f50956680d 100644
--- a/packages/binutils/binutils-cross-sdk_2.14.90.0.6.bb
+++ b/packages/binutils/binutils-cross-sdk_2.14.90.0.6.bb
@@ -1,11 +1,2 @@
-SECTION = "devel"
require binutils_${PV}.bb
-inherit sdk
-DEPENDS += "flex-native bison-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage() {
- :
-}
+require binutils-cross-sdk.inc
diff --git a/packages/binutils/binutils-cross-sdk_2.14.90.0.7.bb b/packages/binutils/binutils-cross-sdk_2.14.90.0.7.bb
index 33e0a24a53..f50956680d 100644
--- a/packages/binutils/binutils-cross-sdk_2.14.90.0.7.bb
+++ b/packages/binutils/binutils-cross-sdk_2.14.90.0.7.bb
@@ -1,11 +1,2 @@
-SECTION = "devel"
require binutils_${PV}.bb
-inherit sdk
-DEPENDS += "flex-native bison-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage() {
- :
-}
+require binutils-cross-sdk.inc
diff --git a/packages/binutils/binutils-cross-sdk_2.15.94.0.1.bb b/packages/binutils/binutils-cross-sdk_2.15.94.0.1.bb
index 33e0a24a53..76dff5449f 100644
--- a/packages/binutils/binutils-cross-sdk_2.15.94.0.1.bb
+++ b/packages/binutils/binutils-cross-sdk_2.15.94.0.1.bb
@@ -1,11 +1,3 @@
-SECTION = "devel"
require binutils_${PV}.bb
-inherit sdk
-DEPENDS += "flex-native bison-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage() {
- :
-}
+require binutils-cross-sdk.inc
+PR = "r0"
diff --git a/packages/binutils/binutils-cross-sdk_2.16.91.0.6.bb b/packages/binutils/binutils-cross-sdk_2.16.91.0.6.bb
index 7d3bb6c09c..f50956680d 100644
--- a/packages/binutils/binutils-cross-sdk_2.16.91.0.6.bb
+++ b/packages/binutils/binutils-cross-sdk_2.16.91.0.6.bb
@@ -1,20 +1,2 @@
-SECTION = "devel"
require binutils_${PV}.bb
-inherit sdk
-DEPENDS += "flex-native bison-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage() {
- :
-}
-
-do_install () {
- autotools_do_install
-
- # Install the libiberty header
- install -d ${D}${includedir}
- install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
- install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-}
+require binutils-cross-sdk.inc
diff --git a/packages/binutils/binutils-cross-sdk_2.16.91.0.7.bb b/packages/binutils/binutils-cross-sdk_2.16.91.0.7.bb
index 7d3bb6c09c..4695c61cd5 100644
--- a/packages/binutils/binutils-cross-sdk_2.16.91.0.7.bb
+++ b/packages/binutils/binutils-cross-sdk_2.16.91.0.7.bb
@@ -1,20 +1,3 @@
-SECTION = "devel"
require binutils_${PV}.bb
-inherit sdk
-DEPENDS += "flex-native bison-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage() {
- :
-}
-
-do_install () {
- autotools_do_install
-
- # Install the libiberty header
- install -d ${D}${includedir}
- install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
- install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-}
+require binutils-cross-sdk.inc
+PR = "r3"
diff --git a/packages/binutils/binutils-cross-sdk_2.17.50.0.12.bb b/packages/binutils/binutils-cross-sdk_2.17.50.0.12.bb
index a045d9bc9c..4695c61cd5 100644
--- a/packages/binutils/binutils-cross-sdk_2.17.50.0.12.bb
+++ b/packages/binutils/binutils-cross-sdk_2.17.50.0.12.bb
@@ -1,21 +1,3 @@
-SECTION = "devel"
require binutils_${PV}.bb
-inherit sdk
-DEPENDS += "flex-native bison-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-EXTRA_OECONF = "--with-sysroot=${prefix}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-PR = "r2"
-
-do_stage() {
- :
-}
-
-do_install () {
- autotools_do_install
-
- # Install the libiberty header
- install -d ${D}${includedir}
- install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
- install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-}
+require binutils-cross-sdk.inc
+PR = "r3"
diff --git a/packages/binutils/binutils-cross-sdk_2.18.bb b/packages/binutils/binutils-cross-sdk_2.18.bb
index 81c84229b0..4695c61cd5 100644
--- a/packages/binutils/binutils-cross-sdk_2.18.bb
+++ b/packages/binutils/binutils-cross-sdk_2.18.bb
@@ -1,23 +1,3 @@
-SECTION = "devel"
require binutils_${PV}.bb
-inherit sdk
-DEPENDS += "flex-native bison-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-EXTRA_OECONF = "--with-sysroot=${prefix}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
+require binutils-cross-sdk.inc
PR = "r3"
-
-FILES_${PN}-dbg += "${prefix}/${TARGET_SYS}/bin/.debug"
-
-do_stage() {
- :
-}
-
-do_install () {
- autotools_do_install
-
- # Install the libiberty header
- install -d ${D}${includedir}
- install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
- install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-}
diff --git a/packages/binutils/binutils-cross-sdk_cvs.bb b/packages/binutils/binutils-cross-sdk_cvs.bb
index 1a9093ff15..ae5691cf93 100644
--- a/packages/binutils/binutils-cross-sdk_cvs.bb
+++ b/packages/binutils/binutils-cross-sdk_cvs.bb
@@ -1,11 +1,3 @@
-SECTION = "devel"
require binutils_cvs.bb
-inherit sdk
-DEPENDS += "flex-native bison-native"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage() {
- :
-}
+require binutils-cross-sdk.inc
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs" \ No newline at end of file
diff --git a/packages/binutils/binutils-cross.inc b/packages/binutils/binutils-cross.inc
index 642d5318e7..384d18cfa7 100644
--- a/packages/binutils/binutils-cross.inc
+++ b/packages/binutils/binutils-cross.inc
@@ -3,7 +3,7 @@ inherit cross
DEPENDS += "flex-native bison-native"
PROVIDES = "virtual/${TARGET_PREFIX}binutils"
PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
+EXTRA_OECONF = "--with-sysroot=${STAGING_DIR_TARGET} \
--program-prefix=${TARGET_PREFIX} \
--enable-install-libbfd \
--disable-werror"
@@ -24,9 +24,9 @@ do_stage () {
rmdir ${CROSS_DIR}/${prefix} || :
# We want to move this into the target specific location
- mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
- mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib || \
- mv -f ${CROSS_DIR}/lib64/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
+ mkdir -p ${STAGING_DIR_TARGET}/lib
+ mv -f ${CROSS_DIR}/lib/libiberty.a ${STAGING_DIR_TARGET}/lib || \
+ mv -f ${CROSS_DIR}/lib64/libiberty.a ${STAGING_DIR_TARGET}/lib
rmdir ${CROSS_DIR}/lib || :
rmdir ${CROSS_DIR}/lib64 || :
}
diff --git a/packages/binutils/binutils-cross_2.14.90.0.6.bb b/packages/binutils/binutils-cross_2.14.90.0.6.bb
index 1f2f43ecf8..d245f7d11a 100644
--- a/packages/binutils/binutils-cross_2.14.90.0.6.bb
+++ b/packages/binutils/binutils-cross_2.14.90.0.6.bb
@@ -1,32 +1,3 @@
-SECTION = "devel"
-require binutils_${PV}.bb
-inherit cross
-DEPENDS += "flex-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}binutils"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage () {
- oe_runmake install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${CROSS_DIR}/lib/ldscripts
- rm -rf ${CROSS_DIR}/share/info
- rm -rf ${CROSS_DIR}/share/locale
- rm -rf ${CROSS_DIR}/share/man
- rmdir ${CROSS_DIR}/share || :
- rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
- rmdir ${CROSS_DIR}/${libdir} || :
- rmdir ${CROSS_DIR}/${prefix} || :
-
- # We want to move this into the target specific location
- mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
- mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
- rmdir ${CROSS_DIR}/lib || :
-}
-
-do_install () {
- :
-}
+require binutils_${PV}.bb
+require binutils-cross.inc
diff --git a/packages/binutils/binutils-cross_2.14.90.0.7.bb b/packages/binutils/binutils-cross_2.14.90.0.7.bb
index 1f2f43ecf8..d245f7d11a 100644
--- a/packages/binutils/binutils-cross_2.14.90.0.7.bb
+++ b/packages/binutils/binutils-cross_2.14.90.0.7.bb
@@ -1,32 +1,3 @@
-SECTION = "devel"
-require binutils_${PV}.bb
-inherit cross
-DEPENDS += "flex-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}binutils"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage () {
- oe_runmake install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${CROSS_DIR}/lib/ldscripts
- rm -rf ${CROSS_DIR}/share/info
- rm -rf ${CROSS_DIR}/share/locale
- rm -rf ${CROSS_DIR}/share/man
- rmdir ${CROSS_DIR}/share || :
- rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
- rmdir ${CROSS_DIR}/${libdir} || :
- rmdir ${CROSS_DIR}/${prefix} || :
-
- # We want to move this into the target specific location
- mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
- mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
- rmdir ${CROSS_DIR}/lib || :
-}
-
-do_install () {
- :
-}
+require binutils_${PV}.bb
+require binutils-cross.inc
diff --git a/packages/binutils/binutils-cross_2.15.94.0.1.bb b/packages/binutils/binutils-cross_2.15.94.0.1.bb
index 1f2f43ecf8..d245f7d11a 100644
--- a/packages/binutils/binutils-cross_2.15.94.0.1.bb
+++ b/packages/binutils/binutils-cross_2.15.94.0.1.bb
@@ -1,32 +1,3 @@
-SECTION = "devel"
-require binutils_${PV}.bb
-inherit cross
-DEPENDS += "flex-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}binutils"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage () {
- oe_runmake install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${CROSS_DIR}/lib/ldscripts
- rm -rf ${CROSS_DIR}/share/info
- rm -rf ${CROSS_DIR}/share/locale
- rm -rf ${CROSS_DIR}/share/man
- rmdir ${CROSS_DIR}/share || :
- rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
- rmdir ${CROSS_DIR}/${libdir} || :
- rmdir ${CROSS_DIR}/${prefix} || :
-
- # We want to move this into the target specific location
- mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
- mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
- rmdir ${CROSS_DIR}/lib || :
-}
-
-do_install () {
- :
-}
+require binutils_${PV}.bb
+require binutils-cross.inc
diff --git a/packages/binutils/binutils-cross_2.16.91.0.6.bb b/packages/binutils/binutils-cross_2.16.91.0.6.bb
index 1f2f43ecf8..d245f7d11a 100644
--- a/packages/binutils/binutils-cross_2.16.91.0.6.bb
+++ b/packages/binutils/binutils-cross_2.16.91.0.6.bb
@@ -1,32 +1,3 @@
-SECTION = "devel"
-require binutils_${PV}.bb
-inherit cross
-DEPENDS += "flex-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}binutils"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage () {
- oe_runmake install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${CROSS_DIR}/lib/ldscripts
- rm -rf ${CROSS_DIR}/share/info
- rm -rf ${CROSS_DIR}/share/locale
- rm -rf ${CROSS_DIR}/share/man
- rmdir ${CROSS_DIR}/share || :
- rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
- rmdir ${CROSS_DIR}/${libdir} || :
- rmdir ${CROSS_DIR}/${prefix} || :
-
- # We want to move this into the target specific location
- mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
- mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
- rmdir ${CROSS_DIR}/lib || :
-}
-
-do_install () {
- :
-}
+require binutils_${PV}.bb
+require binutils-cross.inc
diff --git a/packages/binutils/binutils-cross_2.16.91.0.7.bb b/packages/binutils/binutils-cross_2.16.91.0.7.bb
index 1f2f43ecf8..d245f7d11a 100644
--- a/packages/binutils/binutils-cross_2.16.91.0.7.bb
+++ b/packages/binutils/binutils-cross_2.16.91.0.7.bb
@@ -1,32 +1,3 @@
-SECTION = "devel"
-require binutils_${PV}.bb
-inherit cross
-DEPENDS += "flex-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}binutils"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
-PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage () {
- oe_runmake install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${CROSS_DIR}/lib/ldscripts
- rm -rf ${CROSS_DIR}/share/info
- rm -rf ${CROSS_DIR}/share/locale
- rm -rf ${CROSS_DIR}/share/man
- rmdir ${CROSS_DIR}/share || :
- rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
- rmdir ${CROSS_DIR}/${libdir} || :
- rmdir ${CROSS_DIR}/${prefix} || :
-
- # We want to move this into the target specific location
- mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
- mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
- rmdir ${CROSS_DIR}/lib || :
-}
-
-do_install () {
- :
-}
+require binutils_${PV}.bb
+require binutils-cross.inc
diff --git a/packages/binutils/binutils-cross_2.18.bb b/packages/binutils/binutils-cross_2.18.bb
index a418dfaab5..b78a30ac47 100644
--- a/packages/binutils/binutils-cross_2.18.bb
+++ b/packages/binutils/binutils-cross_2.18.bb
@@ -1,3 +1,4 @@
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
require binutils_${PV}.bb
require binutils-cross.inc
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-${PV}"
+
diff --git a/packages/binutils/binutils-cross_csl-arm-20050416.bb b/packages/binutils/binutils-cross_csl-arm-20050416.bb
index 2b04e83295..55fa3231f2 100644
--- a/packages/binutils/binutils-cross_csl-arm-20050416.bb
+++ b/packages/binutils/binutils-cross_csl-arm-20050416.bb
@@ -1,32 +1,3 @@
-SECTION = "devel"
require binutils_csl-arm-20050416.bb
-inherit cross
-DEPENDS += "flex-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}binutils"
+require binutils-cross.inc
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
-PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage () {
- oe_runmake install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${CROSS_DIR}/lib/ldscripts
- rm -rf ${CROSS_DIR}/share/info
- rm -rf ${CROSS_DIR}/share/locale
- rm -rf ${CROSS_DIR}/share/man
- rmdir ${CROSS_DIR}/share || :
- rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
- rmdir ${CROSS_DIR}/${libdir} || :
- rmdir ${CROSS_DIR}/${prefix} || :
-
- # We want to move this into the target specific location
- mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
- mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
- rmdir ${CROSS_DIR}/lib || :
-}
-
-do_install () {
- :
-}
diff --git a/packages/binutils/binutils-cross_csl-arm-20050603.bb b/packages/binutils/binutils-cross_csl-arm-20050603.bb
index 83eec9b9c6..e15b63e0f0 100644
--- a/packages/binutils/binutils-cross_csl-arm-20050603.bb
+++ b/packages/binutils/binutils-cross_csl-arm-20050603.bb
@@ -1,32 +1,3 @@
-SECTION = "devel"
require binutils_csl-arm-20050603.bb
-inherit cross
-DEPENDS += "flex-native bison-native"
-PROVIDES = "virtual/${TARGET_PREFIX}binutils"
+require binutils-cross.inc
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
-PACKAGES = ""
-EXTRA_OECONF = "--with-sysroot=${CROSS_DIR}/${TARGET_SYS} \
- --program-prefix=${TARGET_PREFIX}"
-
-do_stage () {
- oe_runmake install
-
- # We don't really need these, so we'll remove them...
- rm -rf ${CROSS_DIR}/lib/ldscripts
- rm -rf ${CROSS_DIR}/share/info
- rm -rf ${CROSS_DIR}/share/locale
- rm -rf ${CROSS_DIR}/share/man
- rmdir ${CROSS_DIR}/share || :
- rmdir ${CROSS_DIR}/${libdir}/gcc-lib || :
- rmdir ${CROSS_DIR}/${libdir} || :
- rmdir ${CROSS_DIR}/${prefix} || :
-
- # We want to move this into the target specific location
- mkdir -p ${CROSS_DIR}/${TARGET_SYS}/lib
- mv -f ${CROSS_DIR}/lib/libiberty.a ${CROSS_DIR}/${TARGET_SYS}/lib
- rmdir ${CROSS_DIR}/lib || :
-}
-
-do_install () {
- :
-}
diff --git a/packages/binutils/binutils_2.14.90.0.6.bb b/packages/binutils/binutils_2.14.90.0.6.bb
index e20a40cf5c..4ab8b979dd 100644
--- a/packages/binutils/binutils_2.14.90.0.6.bb
+++ b/packages/binutils/binutils_2.14.90.0.6.bb
@@ -1,7 +1,7 @@
SECTION = "devel"
inherit autotools gettext
-PR = "r3"
+PR = "r4"
DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
diff --git a/packages/binutils/binutils_2.14.90.0.7.bb b/packages/binutils/binutils_2.14.90.0.7.bb
index caae896a1f..4acc2da55c 100644
--- a/packages/binutils/binutils_2.14.90.0.7.bb
+++ b/packages/binutils/binutils_2.14.90.0.7.bb
@@ -4,7 +4,7 @@ inherit autotools gettext
DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
LICENSE = "GPL"
-PR = "r4"
+PR = "r5"
PACKAGES = "${PN} ${PN}-dev ${PN}-doc ${PN}-symlinks"
diff --git a/packages/binutils/binutils_2.15.94.0.1.bb b/packages/binutils/binutils_2.15.94.0.1.bb
index a8802c09e9..151d722265 100644
--- a/packages/binutils/binutils_2.15.94.0.1.bb
+++ b/packages/binutils/binutils_2.15.94.0.1.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
-PR = "r3"
+PR = "r4"
inherit autotools gettext
diff --git a/packages/binutils/binutils_2.16.91.0.6.bb b/packages/binutils/binutils_2.16.91.0.6.bb
index 8e63fe78dc..64f76a6e97 100644
--- a/packages/binutils/binutils_2.16.91.0.6.bb
+++ b/packages/binutils/binutils_2.16.91.0.6.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "A GNU collection of binary utilities"
HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
-PR = "r1"
+PR = "r2"
# glibc 2.3 has issues with this version
# of binutils.
diff --git a/packages/binutils/binutils_2.16.91.0.7.bb b/packages/binutils/binutils_2.16.91.0.7.bb
index ad81300957..e8d709c33e 100644
--- a/packages/binutils/binutils_2.16.91.0.7.bb
+++ b/packages/binutils/binutils_2.16.91.0.7.bb
@@ -3,6 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
DEFAULT_PREFERENCE = "-1"
+PR = "r1"
inherit autotools gettext
diff --git a/packages/binutils/binutils_2.16.bb b/packages/binutils/binutils_2.16.bb
index b9195c57ff..8d871622a8 100644
--- a/packages/binutils/binutils_2.16.bb
+++ b/packages/binutils/binutils_2.16.bb
@@ -1,4 +1,4 @@
-PR = "r8"
+PR = "r9"
SRC_URI = \
"${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.17.50.0.1.bb b/packages/binutils/binutils_2.17.50.0.1.bb
index ad81300957..e8d709c33e 100644
--- a/packages/binutils/binutils_2.17.50.0.1.bb
+++ b/packages/binutils/binutils_2.17.50.0.1.bb
@@ -3,6 +3,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
SECTION = "devel"
LICENSE = "GPL"
DEFAULT_PREFERENCE = "-1"
+PR = "r1"
inherit autotools gettext
diff --git a/packages/binutils/binutils_2.17.50.0.12.bb b/packages/binutils/binutils_2.17.50.0.12.bb
index f832d97cd1..d28b39a38e 100644
--- a/packages/binutils/binutils_2.17.50.0.12.bb
+++ b/packages/binutils/binutils_2.17.50.0.12.bb
@@ -1,5 +1,5 @@
require binutils.inc
-
+PR = "r1"
SRC_URI = \
"${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.17.50.0.5.bb b/packages/binutils/binutils_2.17.50.0.5.bb
index fa601c18a7..f659b3b8b3 100644
--- a/packages/binutils/binutils_2.17.50.0.5.bb
+++ b/packages/binutils/binutils_2.17.50.0.5.bb
@@ -1,6 +1,6 @@
require binutils.inc
-PR = "r1"
+PR = "r2"
SRC_URI = \
"${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.17.50.0.8.bb b/packages/binutils/binutils_2.17.50.0.8.bb
index a60c7524d7..fa601c18a7 100644
--- a/packages/binutils/binutils_2.17.50.0.8.bb
+++ b/packages/binutils/binutils_2.17.50.0.8.bb
@@ -1,5 +1,6 @@
require binutils.inc
+PR = "r1"
SRC_URI = \
"${KERNELORG_MIRROR}/pub/linux/devel/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.17.bb b/packages/binutils/binutils_2.17.bb
index 3e7af6d4b3..0696a24e72 100644
--- a/packages/binutils/binutils_2.17.bb
+++ b/packages/binutils/binutils_2.17.bb
@@ -1,6 +1,6 @@
require binutils.inc
-PR = "r3"
+PR = "r4"
SRC_URI = \
"http://ftp.gnu.org/gnu/binutils/binutils-${PV}.tar.bz2 \
diff --git a/packages/binutils/binutils_2.18.bb b/packages/binutils/binutils_2.18.bb
index b6a230cb18..de13f88142 100644
--- a/packages/binutils/binutils_2.18.bb
+++ b/packages/binutils/binutils_2.18.bb
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
require binutils.inc
diff --git a/packages/binutils/binutils_csl-arm-20050416.bb b/packages/binutils/binutils_csl-arm-20050416.bb
index a9e3dfd5b9..efb8b91a8a 100644
--- a/packages/binutils/binutils_csl-arm-20050416.bb
+++ b/packages/binutils/binutils_csl-arm-20050416.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
LICENSE = "GPL"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "2.15.99+csl-arm+cvs20050416"
-PR = "r1"
+PR = "r2"
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_arm-linux = "-1"
diff --git a/packages/binutils/binutils_csl-arm-20050603.bb b/packages/binutils/binutils_csl-arm-20050603.bb
index 5e07aafd4f..0c3cd5c0fe 100644
--- a/packages/binutils/binutils_csl-arm-20050603.bb
+++ b/packages/binutils/binutils_csl-arm-20050603.bb
@@ -6,7 +6,7 @@ HOMEPAGE = "http://www.gnu.org/software/binutils/"
LICENSE = "GPL"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "2.15.99+csl-arm+cvs20050603"
-PR = "r1"
+PR = "r2"
OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
DEFAULT_PREFERENCE = "-1"
#DEFAULT_PREFERENCE_arm-linux = "1"
diff --git a/packages/binutils/binutils_cvs.bb b/packages/binutils/binutils_cvs.bb
index e719d93272..7baafc8baf 100644
--- a/packages/binutils/binutils_cvs.bb
+++ b/packages/binutils/binutils_cvs.bb
@@ -1,6 +1,6 @@
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/binutils-cvs"
PV = "0.0+cvs${SRCDATE}"
-PR = "r0"
+PR = "r1"
require binutils.inc
diff --git a/packages/bluez/bluez-cups-backend_3.28.bb b/packages/bluez/bluez-cups-backend_3.28.bb
new file mode 100644
index 0000000000..40e099642a
--- /dev/null
+++ b/packages/bluez/bluez-cups-backend_3.28.bb
@@ -0,0 +1,27 @@
+require bluez-utils3.inc
+
+PR = "r1"
+
+DEPENDS += "cups"
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --disable-alsa \
+ --enable-cups \
+ --enable-glib \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+
+FILES_${PN} = "${libdir}/cups/backend/bluetooth"
+RDEPENDS_${PN} = "cups"
diff --git a/packages/bluez/bluez-gnome_0.24.bb b/packages/bluez/bluez-gnome_0.24.bb
new file mode 100644
index 0000000000..e3aaeafeb3
--- /dev/null
+++ b/packages/bluez/bluez-gnome_0.24.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "Bluetooth configuration applet"
+LICENSE = "GPL+LGPL"
+
+PR = "r1"
+
+DEPENDS = "dbus-glib gconf libnotify gtk+"
+RRECOMMENDS = "gnome-icon-theme"
+
+SRC_URI = "http://bluez.sourceforge.net/download/${P}.tar.gz"
+
+inherit autotools pkgconfig gconf
+
+FILES_${PN} += "${datadir}/gconf"
+
diff --git a/packages/bluez/bluez-gstreamer-plugin_3.28.bb b/packages/bluez/bluez-gstreamer-plugin_3.28.bb
new file mode 100644
index 0000000000..53b7eb86f2
--- /dev/null
+++ b/packages/bluez/bluez-gstreamer-plugin_3.28.bb
@@ -0,0 +1,27 @@
+require bluez-utils3.inc
+
+PR = "r1"
+
+DEPENDS += "gstreamer gst-plugins-base "
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --enable-alsa \
+ --disable-cups \
+ --enable-glib \
+ --enable-gstreamer \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+
+FILES_${PN} = "${libdir}/gstreamer-0.10/libgstbluetooth.so"
diff --git a/packages/bluez/bluez-libs_3.28.bb b/packages/bluez/bluez-libs_3.28.bb
new file mode 100644
index 0000000000..eb515b4aba
--- /dev/null
+++ b/packages/bluez/bluez-libs_3.28.bb
@@ -0,0 +1,4 @@
+require bluez-libs.inc
+
+PR = "r1"
+
diff --git a/packages/linux/linux-openmoko-devel/.mtn2git_empty b/packages/bluez/bluez-utils-3.28/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/linux/linux-openmoko-devel/.mtn2git_empty
+++ b/packages/bluez/bluez-utils-3.28/.mtn2git_empty
diff --git a/packages/bluez/bluez-utils-3.28/hciattach-ti-bts.patch b/packages/bluez/bluez-utils-3.28/hciattach-ti-bts.patch
new file mode 100644
index 0000000000..1b208f7979
--- /dev/null
+++ b/packages/bluez/bluez-utils-3.28/hciattach-ti-bts.patch
@@ -0,0 +1,477 @@
+--- bluez-utils-3.1/tools/hciattach.c.orig 2006-07-23 14:02:14.000000000 +0200
++++ bluez-utils-3.1/tools/hciattach.c 2006-07-23 14:06:29.000000000 +0200
+@@ -60,6 +60,8 @@
+ #define HCI_UART_3WIRE 2
+ #define HCI_UART_H4DS 3
+
++#include "ti_bts.h"
++
+ struct uart_t {
+ char *type;
+ int m_id;
+@@ -70,6 +72,7 @@
+ int flags;
+ char *bdaddr;
+ int (*init) (int fd, struct uart_t *u, struct termios *ti);
++ char *bts; /* bluetooth script */
+ };
+
+ #define FLOW_CTL 0x0001
+@@ -279,6 +282,114 @@
+ return 0;
+ }
+
++static int brf6150(int fd, struct uart_t *u, struct termios *ti)
++{
++ bts_t *bfp;
++ int i;
++ unsigned long vers;
++ unsigned char actionbuf[256];
++ unsigned char resp[128]; /* Response */
++ unsigned long count;
++ unsigned short atype;
++
++ if (u->bts == NULL) /* no script, ignore */
++ return 0;
++
++ bfp = bts_load_script( u->bts, &vers );
++ if (bfp == NULL)
++ return -1;
++
++ fprintf( stderr, "Loading BTS script version %lu\n", vers );
++
++ while ((count = bts_next_action( bfp, actionbuf,
++ sizeof actionbuf - 1, &atype )) != 0) {
++ if (atype == ACTION_REMARKS) {
++ if (actionbuf[0] != 0)
++ fprintf( stderr, "%s\n", actionbuf );
++ }
++ else if (atype == ACTION_SEND_COMMAND) {
++#if 0
++ fprintf( stderr, "ACTION_SEND_COMMAND: ", (int)atype );
++ for (i=0; i<count; i++) {
++ fprintf( stderr, "0x%02x ", actionbuf[i] );
++ }
++ fprintf( stderr, "\n" );
++#endif
++ int n;
++ n = write(fd, actionbuf, count);
++ if (n < 0 || n < count) {
++ perror("Failed to write TI action command");
++ return -1;
++ }
++ }
++ else if (atype == ACTION_WAIT_EVENT) {
++ action_wait_t *wait = (action_wait_t *)actionbuf;
++#if 0
++ fprintf( stderr, "ACTION_WAIT_EVENT: %u msec, %u size, data = ", wait->msec, wait->size );
++ for (i=0; i<wait->size; i++) {
++ fprintf( stderr, "0x%02x ", wait->data[i] );
++ }
++ fprintf( stderr, "\n" );
++#endif
++ usleep(wait->msec); /* seems they give usec, not msec */
++ /* Read reply. */
++ if ((count = read_hci_event(fd, resp, sizeof resp)) < 0) {
++ perror("Failed to read TI command response");
++ return -1;
++ }
++ if (count < wait->size) {
++ fprintf( stderr, "TI command response is short.");
++ }
++ for (i=0; i<wait->size; i++) {
++ if (i == 3) continue; /* ignore */
++ if (resp[i] != wait->data[i]) {
++ fprintf( stderr, "TI command response does not match expected result.\n" );
++ }
++ }
++ }
++ else if (atype == ACTION_SERIAL_PORT_PARAMETERS) {
++ action_serial_t *sercmd = (action_serial_t *)actionbuf;
++
++ /* Set actual baudrate */
++ fprintf( stderr,
++ "BTS changing baud rate to %u, flow control to %u\n",
++ sercmd->baud, sercmd->flow_control );
++
++ tcflush(fd, TCIOFLUSH);
++
++ if (sercmd->flow_control)
++ ti->c_cflag |= CRTSCTS;
++ else
++ ti->c_cflag &= ~CRTSCTS;
++ if (tcsetattr(fd, TCSANOW, ti) < 0) {
++ perror("Can't set port settings");
++ return -1;
++ }
++
++ u->speed = sercmd->baud;
++
++ tcflush(fd, TCIOFLUSH);
++ if (set_speed(fd, ti, sercmd->baud) < 0) {
++ perror("Can't set baud rate");
++ return -1;
++ }
++ }
++ else if (atype == ACTION_DELAY) {
++ action_delay_t *delay = (action_delay_t *)actionbuf;
++ usleep(delay->msec); /* seems they give usec, not msec */
++ }
++ else {
++ fprintf( stderr, "BTS action type = %d: ", (int)atype );
++ for (i=0; i<count; i++) {
++ fprintf( stderr, "0x%02x ", actionbuf[i] );
++ }
++ fprintf( stderr, "\n" );
++ }
++ }
++ bts_unload_script( bfp );
++ return 0;
++}
++
+ static int texas(int fd, struct uart_t *u, struct termios *ti)
+ {
+ struct timespec tm = {0, 50000};
+@@ -328,6 +439,17 @@
+ /* Print LMP subversion */
+ fprintf(stderr, "Texas module LMP sub-version : 0x%02x%02x\n", resp[14] & 0xFF, resp[13] & 0xFF);
+
++ if ((resp[14] >> 2) == 3) {
++ /* BRF6150 */
++ int err;
++
++ nanosleep(&tm, NULL);
++ if ((err = brf6150(fd, u, ti)) != 0) {
++ fprintf(stderr, "Texas module script failed (err=%d)\n", err);
++ return -1;
++ }
++ }
++
+ nanosleep(&tm, NULL);
+ return 0;
+ }
+@@ -1204,7 +1326,7 @@
+ {
+ printf("hciattach - HCI UART driver initialization utility\n");
+ printf("Usage:\n");
+- printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
++ printf("\thciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [-S bts-script] <tty> <type | id> [speed] [flow|noflow] [bdaddr]\n");
+ printf("\thciattach -l\n");
+ }
+
+@@ -1219,11 +1341,12 @@
+ struct sigaction sa;
+ struct pollfd p;
+ char dev[PATH_MAX];
++ char *bts = NULL;
+
+ detach = 1;
+ printpid = 0;
+
+- while ((opt=getopt(argc, argv, "bnpt:s:l")) != EOF) {
++ while ((opt=getopt(argc, argv, "bnpt:s:S:l")) != EOF) {
+ switch(opt) {
+ case 'b':
+ send_break = 1;
+@@ -1245,6 +1368,10 @@
+ init_speed = atoi(optarg);
+ break;
+
++ case 'S':
++ bts = optarg;
++ break;
++
+ case 'l':
+ for (i = 0; uart[i].type; i++) {
+ printf("%-10s0x%04x,0x%04x\n", uart[i].type,
+@@ -1320,6 +1447,8 @@
+ if (init_speed)
+ u->init_speed = init_speed;
+
++ u->bts = bts;
++
+ memset(&sa, 0, sizeof(sa));
+ sa.sa_flags = SA_NOCLDSTOP;
+ sa.sa_handler = sig_alarm;
+--- bluez-utils-3.1/tools/ti_bts.h.orig 2006-07-23 14:07:26.000000000 +0200
++++ bluez-utils-3.1/tools/ti_bts.h 2006-07-23 14:07:46.000000000 +0200
+@@ -0,0 +1,116 @@
++/*
++ * Copyright (c) 2005 Texas Instruments, Inc.
++ * Ported by SDG Systems, LLC
++ *
++ * 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;
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
++ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
++ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ *
++ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
++ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
++ * SOFTWARE IS DISCLAIMED.
++ *
++ */
++
++#ifndef BT_SCRIPT_H
++#define BT_SCRIPT_H
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++/*
++ * Define the interface of Bluetooth Script
++ */
++
++typedef void bts_t;
++
++
++#define ACTION_SEND_COMMAND 1 /* Send out raw data (as is) */
++#define ACTION_WAIT_EVENT 2 /* Wait for data */
++#define ACTION_SERIAL_PORT_PARAMETERS 3
++#define ACTION_DELAY 4
++#define ACTION_RUN_SCRIPT 5
++#define ACTION_REMARKS 6
++
++/*
++ * Structure for ACTION_SEND_COMMAND
++ */
++typedef struct tagCActionCommand
++{
++ unsigned char data[1]; /* Data to send */
++} action_command_t;
++
++/*
++ * Structure for ACTION_WAIT_EVENT
++ */
++typedef struct tagCActionWaitEvent
++{
++ unsigned long msec; /* in milliseconds */
++ unsigned long size;
++ unsigned char data[1]; /* Data to wait for */
++} action_wait_t;
++
++
++/*
++ * Structure for ACTION_SERIAL_PORT_PARAMETERS
++ */
++typedef struct tagCActionSerialPortParameters
++{
++ unsigned long baud;
++ unsigned long flow_control;
++} action_serial_t;
++
++/* Flow Control Type */
++#define FCT_NONE 0
++#define FCT_HARDWARE 1
++
++#define DONT_CHANGE 0xFFFFFFFF /* For both baud rate and flow control */
++
++
++/*
++ * Structure for ACTION_DELAY
++ */
++typedef struct tagCActionDelay
++{
++ unsigned long msec; /* in milliseconds */
++} action_delay_t;
++
++/*
++ * Structure for ACTION_RUN_SCRIPT
++ */
++typedef struct tagCActionRunScript
++{
++ char filename[1];
++} action_run_t;
++
++/*
++ * Structure for ACTION_REMARKS
++ */
++typedef struct tagCActionRemarks
++{
++ char m_szRemarks[1];
++} action_remarks_t;
++
++
++const char *cis_create_filename(const unsigned char* cmdparms);
++bts_t * bts_load_script(const char* fname, unsigned long* version);
++unsigned long bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
++ unsigned long nMaxSize, unsigned short* ptype);
++void bts_unload_script(bts_t* bts_fp);
++
++#ifdef __cplusplus
++};
++#endif
++
++#endif /* BT_SCRIPT_H */
++
+--- bluez-utils-3.1/tools/ti_bts.c.orig 2006-07-23 14:07:28.000000000 +0200
++++ bluez-utils-3.1/tools/ti_bts.c 2006-07-23 14:07:46.000000000 +0200
+@@ -0,0 +1,149 @@
++/*
++ * Copyright (c) 2005 Texas Instruments, Inc.
++ * Ported by SDG Systems, LLC
++ *
++ * 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;
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
++ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
++ * CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
++ *
++ * ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
++ * COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
++ * SOFTWARE IS DISCLAIMED.
++ *
++ */
++
++
++#include <stdio.h>
++#include <stdlib.h>
++#include "ti_bts.h"
++
++#ifndef MAKEWORD
++#define MAKEWORD(a, b) ((unsigned short)(((unsigned char)(a)) | ((unsigned short)((unsigned char)(b))) << 8))
++#endif
++
++#define TI_MANUFACTURER_ID 13
++
++/*
++ * Common Init Script specific
++ */
++const char *
++cis_create_filename(const unsigned char* cmdparms)
++{
++ static char bts_file[50];
++
++ /* Check for TI's id */
++ unsigned short manfid = MAKEWORD(cmdparms[8], cmdparms[9]);
++
++ if (TI_MANUFACTURER_ID == manfid) {
++ unsigned short version = MAKEWORD(cmdparms[10], cmdparms[11]);
++
++ unsigned short chip = (version & 0x7C00) >> 10;
++ unsigned short min_ver = (version & 0x007F);
++ unsigned short maj_ver = (version & 0x0380) >> 7;
++
++ if (0 != (version & 0x8000)) {
++ maj_ver |= 0x0008;
++ }
++
++ sprintf( bts_file, "TIInit_%d.%d.%d.bts",
++ (int)chip, (int)maj_ver, (int)min_ver);
++
++ return &bts_file[0];
++ }
++ return NULL;
++}
++
++typedef struct tagCHeader
++{
++ unsigned long magic;
++ unsigned long version;
++ unsigned char future[24];
++} cheader_t;
++
++
++/* The value 0x42535442 stands for (in ASCII) BTSB */
++/* which is Bluetooth Script Binary */
++#define FILE_HEADER_MAGIC 0x42535442
++
++
++bts_t *
++bts_load_script(const char* fname, unsigned long* version)
++{
++ bts_t* bts = NULL;
++ FILE* fp = fopen(fname, "rb");
++
++ if (NULL != fp) {
++ /* Read header */
++ cheader_t header;
++
++ /* Read header */
++ if (1 == fread(&header, sizeof(header), 1, fp)) {
++ /* Check magic number for correctness */
++ if (header.magic == FILE_HEADER_MAGIC) {
++ /* If user wants the version number */
++ if (NULL != version) {
++ *version = header.version;
++ }
++ bts = (bts_t*)fp;
++ }
++ }
++ /* If failed reading the file, close it */
++ if (NULL == bts) {
++ fclose(fp);
++ }
++ }
++ return bts;
++}
++
++unsigned long
++bts_next_action(const bts_t* bts_fp, unsigned char* action_buf,
++ unsigned long nMaxSize, unsigned short* ptype)
++{
++ unsigned long bytes = 0;
++ FILE* fp = (FILE*)bts_fp;
++ unsigned char action_hdr[4];
++
++ if (bts_fp == NULL)
++ return 0;
++
++ /* Each Action has the following: */
++ /* UINT16 type of this action */
++ /* UINT16 size of rest */
++ /* BYTE[] action buffer (for HCI, includes the type byte e.g. 1 for hci command) */
++
++ if (1 == fread(&action_hdr[0], sizeof(action_hdr), 1, fp)) {
++ unsigned short type = *(unsigned short*)&action_hdr[0];
++ unsigned short size = *(unsigned short*)&action_hdr[2];
++
++ if (size <= nMaxSize) {
++ int nread = fread(action_buf, sizeof(action_buf[0]), size, fp);
++
++ if (nread == size) {
++ *ptype = type;
++ bytes = (unsigned long)size;
++ }
++ }
++ }
++
++ return bytes;
++}
++
++void
++bts_unload_script(bts_t* bts_fp)
++{
++ FILE* fp = (FILE*)bts_fp;
++
++ if (NULL != fp) {
++ fclose(fp);
++ }
++}
++
+--- bluez-utils-3.1/tools/Makefile.am.orig 2006-07-23 14:06:59.000000000 +0200
++++ bluez-utils-3.1/tools/Makefile.am 2006-07-23 14:07:18.000000000 +0200
+@@ -45,7 +45,7 @@
+
+ noinst_PROGRAMS = hcisecfilter ppporc
+
+-hciattach_SOURCES = hciattach.c hciattach_st.c
++hciattach_SOURCES = hciattach.c hciattach_st.c ti_bts.h ti_bts.c
+ hciattach_LDADD = @BLUEZ_LIBS@
+
+ hciconfig_SOURCES = hciconfig.c csr.h csr.c
diff --git a/packages/bluez/bluez-utils-alsa_3.28.bb b/packages/bluez/bluez-utils-alsa_3.28.bb
new file mode 100644
index 0000000000..a1e3e85818
--- /dev/null
+++ b/packages/bluez/bluez-utils-alsa_3.28.bb
@@ -0,0 +1,25 @@
+require bluez-utils3.inc
+
+PR = "r1"
+
+DEPENDS += "alsa-lib"
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --disable-hid2hci \
+ --enable-alsa \
+ --disable-cups \
+ --enable-glib \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+FILES_${PN} = "${libdir}/alsa-lib/libasound*"
diff --git a/packages/bluez/bluez-utils_3.28.bb b/packages/bluez/bluez-utils_3.28.bb
new file mode 100644
index 0000000000..37365f67fc
--- /dev/null
+++ b/packages/bluez/bluez-utils_3.28.bb
@@ -0,0 +1,30 @@
+require bluez-utils3.inc
+PR = "r2"
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --disable-alsa \
+ --disable-cups \
+ --enable-glib \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+CONFFILES_${PN} = " \
+ ${sysconfdir}/bluetooth/hcid.conf \
+ ${sysconfdir}/default/bluetooth \
+ "
+
+CONFFILES_${PN}-compat = " \
+ ${sysconfdir}/bluetooth/rfcomm.conf \
+ "
+
diff --git a/packages/busybox/busybox-1.9.1/openmoko/defconfig b/packages/busybox/busybox-1.9.1/openmoko/defconfig
deleted file mode 100644
index d0505e4481..0000000000
--- a/packages/busybox/busybox-1.9.1/openmoko/defconfig
+++ /dev/null
@@ -1,777 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Busybox version: 1.9.1
-# Thu Feb 14 11:54:00 2008
-#
-CONFIG_HAVE_DOT_CONFIG=y
-
-#
-# Busybox Settings
-#
-
-#
-# General Configuration
-#
-# CONFIG_NITPICK is not set
-# CONFIG_DESKTOP is not set
-# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
-# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
-# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
-CONFIG_SHOW_USAGE=y
-# CONFIG_FEATURE_VERBOSE_USAGE is not set
-CONFIG_FEATURE_COMPRESS_USAGE=y
-# CONFIG_FEATURE_INSTALLER is not set
-CONFIG_LOCALE_SUPPORT=y
-CONFIG_GETOPT_LONG=y
-CONFIG_FEATURE_DEVPTS=y
-# CONFIG_FEATURE_CLEAN_UP is not set
-CONFIG_FEATURE_PIDFILE=y
-CONFIG_FEATURE_SUID=y
-CONFIG_FEATURE_SUID_CONFIG=y
-CONFIG_FEATURE_SUID_CONFIG_QUIET=y
-# CONFIG_SELINUX is not set
-# CONFIG_FEATURE_PREFER_APPLETS is not set
-CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
-CONFIG_FEATURE_SYSLOG=y
-CONFIG_FEATURE_HAVE_RPC=y
-
-#
-# Build Options
-#
-# CONFIG_STATIC is not set
-# CONFIG_BUILD_LIBBUSYBOX is not set
-# CONFIG_FEATURE_INDIVIDUAL is not set
-# CONFIG_FEATURE_SHARED_BUSYBOX is not set
-CONFIG_LFS=y
-
-#
-# Debugging Options
-#
-# CONFIG_DEBUG is not set
-# CONFIG_WERROR is not set
-CONFIG_NO_DEBUG_LIB=y
-# CONFIG_DMALLOC is not set
-# CONFIG_EFENCE is not set
-# CONFIG_INCLUDE_SUSv2 is not set
-
-#
-# Installation Options
-#
-# CONFIG_INSTALL_NO_USR is not set
-CONFIG_INSTALL_APPLET_SYMLINKS=y
-# CONFIG_INSTALL_APPLET_HARDLINKS is not set
-# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
-# CONFIG_INSTALL_APPLET_DONT is not set
-# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
-# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
-# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
-CONFIG_PREFIX="./_install"
-
-#
-# Busybox Library Tuning
-#
-CONFIG_PASSWORD_MINLEN=6
-CONFIG_MD5_SIZE_VS_SPEED=2
-CONFIG_FEATURE_FAST_TOP=y
-# CONFIG_FEATURE_ETC_NETWORKS is not set
-CONFIG_FEATURE_EDITING=y
-CONFIG_FEATURE_EDITING_MAX_LEN=1024
-CONFIG_FEATURE_EDITING_FANCY_KEYS=y
-# CONFIG_FEATURE_EDITING_VI is not set
-CONFIG_FEATURE_EDITING_HISTORY=15
-CONFIG_FEATURE_EDITING_SAVEHISTORY=y
-CONFIG_FEATURE_TAB_COMPLETION=y
-CONFIG_FEATURE_USERNAME_COMPLETION=y
-CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
-CONFIG_FEATURE_COPYBUF_KB=4
-CONFIG_MONOTONIC_SYSCALL=y
-CONFIG_IOCTL_HEX2STR_ERROR=y
-
-#
-# Applets
-#
-
-#
-# Archival Utilities
-#
-CONFIG_AR=y
-# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
-CONFIG_BUNZIP2=y
-# CONFIG_BZIP2 is not set
-CONFIG_CPIO=y
-# CONFIG_DPKG is not set
-# CONFIG_DPKG_DEB is not set
-# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
-CONFIG_GUNZIP=y
-# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
-CONFIG_GZIP=y
-# CONFIG_RPM2CPIO is not set
-# CONFIG_RPM is not set
-# CONFIG_FEATURE_RPM_BZ2 is not set
-CONFIG_TAR=y
-CONFIG_FEATURE_TAR_CREATE=y
-CONFIG_FEATURE_TAR_BZIP2=y
-# CONFIG_FEATURE_TAR_LZMA is not set
-CONFIG_FEATURE_TAR_FROM=y
-CONFIG_FEATURE_TAR_GZIP=y
-# CONFIG_FEATURE_TAR_COMPRESS is not set
-# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
-# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
-CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
-# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
-# CONFIG_UNCOMPRESS is not set
-# CONFIG_UNLZMA is not set
-# CONFIG_FEATURE_LZMA_FAST is not set
-CONFIG_UNZIP=y
-
-#
-# Common options for cpio and tar
-#
-# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
-# CONFIG_FEATURE_DEB_TAR_GZ is not set
-# CONFIG_FEATURE_DEB_TAR_BZ2 is not set
-# CONFIG_FEATURE_DEB_TAR_LZMA is not set
-
-#
-# Coreutils
-#
-CONFIG_BASENAME=y
-# CONFIG_CAL is not set
-CONFIG_CAT=y
-# CONFIG_CATV is not set
-CONFIG_CHGRP=y
-CONFIG_CHMOD=y
-CONFIG_CHOWN=y
-CONFIG_CHROOT=y
-# CONFIG_CKSUM is not set
-# CONFIG_COMM is not set
-CONFIG_CP=y
-CONFIG_CUT=y
-CONFIG_DATE=y
-# CONFIG_FEATURE_DATE_ISOFMT is not set
-CONFIG_DD=y
-CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-# CONFIG_FEATURE_DD_IBS_OBS is not set
-CONFIG_DF=y
-# CONFIG_FEATURE_DF_INODE is not set
-CONFIG_DIRNAME=y
-# CONFIG_DOS2UNIX is not set
-# CONFIG_UNIX2DOS is not set
-CONFIG_DU=y
-CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
-CONFIG_ECHO=y
-CONFIG_FEATURE_FANCY_ECHO=y
-CONFIG_ENV=y
-CONFIG_FEATURE_ENV_LONG_OPTIONS=y
-# CONFIG_EXPAND is not set
-# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
-CONFIG_EXPR=y
-# CONFIG_EXPR_MATH_SUPPORT_64 is not set
-CONFIG_FALSE=y
-# CONFIG_FOLD is not set
-CONFIG_HEAD=y
-# CONFIG_FEATURE_FANCY_HEAD is not set
-# CONFIG_HOSTID is not set
-CONFIG_ID=y
-# CONFIG_INSTALL is not set
-# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
-# CONFIG_LENGTH is not set
-CONFIG_LN=y
-CONFIG_LOGNAME=y
-CONFIG_LS=y
-CONFIG_FEATURE_LS_FILETYPES=y
-CONFIG_FEATURE_LS_FOLLOWLINKS=y
-CONFIG_FEATURE_LS_RECURSIVE=y
-CONFIG_FEATURE_LS_SORTFILES=y
-CONFIG_FEATURE_LS_TIMESTAMPS=y
-CONFIG_FEATURE_LS_USERNAME=y
-CONFIG_FEATURE_LS_COLOR=y
-# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
-CONFIG_MD5SUM=y
-CONFIG_MKDIR=y
-CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
-CONFIG_MKFIFO=y
-CONFIG_MKNOD=y
-CONFIG_MV=y
-# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
-# CONFIG_NICE is not set
-CONFIG_NOHUP=y
-CONFIG_OD=y
-# CONFIG_PRINTENV is not set
-CONFIG_PRINTF=y
-CONFIG_PWD=y
-CONFIG_READLINK=y
-CONFIG_FEATURE_READLINK_FOLLOW=y
-CONFIG_REALPATH=y
-CONFIG_RM=y
-CONFIG_RMDIR=y
-CONFIG_SEQ=y
-# CONFIG_SHA1SUM is not set
-CONFIG_SLEEP=y
-CONFIG_FEATURE_FANCY_SLEEP=y
-CONFIG_SORT=y
-CONFIG_FEATURE_SORT_BIG=y
-# CONFIG_SPLIT is not set
-# CONFIG_FEATURE_SPLIT_FANCY is not set
-# CONFIG_STAT is not set
-# CONFIG_FEATURE_STAT_FORMAT is not set
-CONFIG_STTY=y
-# CONFIG_SUM is not set
-CONFIG_SYNC=y
-CONFIG_TAIL=y
-CONFIG_FEATURE_FANCY_TAIL=y
-CONFIG_TEE=y
-# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
-CONFIG_TEST=y
-# CONFIG_FEATURE_TEST_64 is not set
-CONFIG_TOUCH=y
-CONFIG_TR=y
-CONFIG_FEATURE_TR_CLASSES=y
-# CONFIG_FEATURE_TR_EQUIV is not set
-CONFIG_TRUE=y
-CONFIG_TTY=y
-CONFIG_UNAME=y
-# CONFIG_UNEXPAND is not set
-# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
-CONFIG_UNIQ=y
-CONFIG_USLEEP=y
-# CONFIG_UUDECODE is not set
-# CONFIG_UUENCODE is not set
-CONFIG_WC=y
-# CONFIG_FEATURE_WC_LARGE is not set
-CONFIG_WHO=y
-CONFIG_WHOAMI=y
-CONFIG_YES=y
-
-#
-# Common options for cp and mv
-#
-# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
-
-#
-# Common options for ls, more and telnet
-#
-CONFIG_FEATURE_AUTOWIDTH=y
-
-#
-# Common options for df, du, ls
-#
-CONFIG_FEATURE_HUMAN_READABLE=y
-
-#
-# Common options for md5sum, sha1sum
-#
-CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
-
-#
-# Console Utilities
-#
-CONFIG_CHVT=y
-CONFIG_CLEAR=y
-CONFIG_DEALLOCVT=y
-CONFIG_DUMPKMAP=y
-# CONFIG_KBD_MODE is not set
-CONFIG_LOADFONT=y
-CONFIG_LOADKMAP=y
-CONFIG_OPENVT=y
-CONFIG_RESET=y
-# CONFIG_RESIZE is not set
-# CONFIG_FEATURE_RESIZE_PRINT is not set
-CONFIG_SETCONSOLE=y
-# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
-# CONFIG_SETKEYCODES is not set
-# CONFIG_SETLOGCONS is not set
-
-#
-# Debian Utilities
-#
-CONFIG_MKTEMP=y
-# CONFIG_PIPE_PROGRESS is not set
-CONFIG_RUN_PARTS=y
-CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
-# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
-CONFIG_START_STOP_DAEMON=y
-CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
-CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
-CONFIG_WHICH=y
-
-#
-# Editors
-#
-CONFIG_AWK=y
-CONFIG_FEATURE_AWK_MATH=y
-CONFIG_CMP=y
-CONFIG_DIFF=y
-CONFIG_FEATURE_DIFF_BINARY=y
-CONFIG_FEATURE_DIFF_DIR=y
-# CONFIG_FEATURE_DIFF_MINIMAL is not set
-# CONFIG_ED is not set
-CONFIG_PATCH=y
-CONFIG_SED=y
-CONFIG_VI=y
-CONFIG_FEATURE_VI_MAX_LEN=1024
-CONFIG_FEATURE_VI_8BIT=y
-CONFIG_FEATURE_VI_COLON=y
-CONFIG_FEATURE_VI_YANKMARK=y
-CONFIG_FEATURE_VI_SEARCH=y
-CONFIG_FEATURE_VI_USE_SIGNALS=y
-# CONFIG_FEATURE_VI_DOT_CMD is not set
-# CONFIG_FEATURE_VI_READONLY is not set
-# CONFIG_FEATURE_VI_SETOPTS is not set
-# CONFIG_FEATURE_VI_SET is not set
-CONFIG_FEATURE_VI_WIN_RESIZE=y
-CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
-CONFIG_FEATURE_ALLOW_EXEC=y
-
-#
-# Finding Utilities
-#
-CONFIG_FIND=y
-CONFIG_FEATURE_FIND_PRINT0=y
-CONFIG_FEATURE_FIND_MTIME=y
-CONFIG_FEATURE_FIND_MMIN=y
-CONFIG_FEATURE_FIND_PERM=y
-CONFIG_FEATURE_FIND_TYPE=y
-CONFIG_FEATURE_FIND_XDEV=y
-CONFIG_FEATURE_FIND_MAXDEPTH=y
-CONFIG_FEATURE_FIND_NEWER=y
-# CONFIG_FEATURE_FIND_INUM is not set
-CONFIG_FEATURE_FIND_EXEC=y
-CONFIG_FEATURE_FIND_USER=y
-CONFIG_FEATURE_FIND_GROUP=y
-CONFIG_FEATURE_FIND_NOT=y
-CONFIG_FEATURE_FIND_DEPTH=y
-CONFIG_FEATURE_FIND_PAREN=y
-CONFIG_FEATURE_FIND_SIZE=y
-CONFIG_FEATURE_FIND_PRUNE=y
-# CONFIG_FEATURE_FIND_DELETE is not set
-CONFIG_FEATURE_FIND_PATH=y
-CONFIG_FEATURE_FIND_REGEX=y
-# CONFIG_FEATURE_FIND_CONTEXT is not set
-CONFIG_GREP=y
-CONFIG_FEATURE_GREP_EGREP_ALIAS=y
-CONFIG_FEATURE_GREP_FGREP_ALIAS=y
-CONFIG_FEATURE_GREP_CONTEXT=y
-CONFIG_XARGS=y
-# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
-# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set
-# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set
-# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set
-
-#
-# Init Utilities
-#
-# CONFIG_INIT is not set
-# CONFIG_DEBUG_INIT is not set
-# CONFIG_FEATURE_USE_INITTAB is not set
-# CONFIG_FEATURE_INIT_SCTTY is not set
-# CONFIG_FEATURE_INIT_SYSLOG is not set
-# CONFIG_FEATURE_EXTRA_QUIET is not set
-# CONFIG_FEATURE_INIT_COREDUMPS is not set
-# CONFIG_FEATURE_INITRD is not set
-# CONFIG_HALT is not set
-# CONFIG_MESG is not set
-
-#
-# Login/Password Management Utilities
-#
-# CONFIG_FEATURE_SHADOWPASSWDS is not set
-# CONFIG_USE_BB_SHADOW is not set
-# CONFIG_USE_BB_PWD_GRP is not set
-CONFIG_ADDGROUP=y
-CONFIG_FEATURE_ADDUSER_TO_GROUP=y
-CONFIG_DELGROUP=y
-CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
-CONFIG_ADDUSER=y
-CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
-CONFIG_DELUSER=y
-CONFIG_GETTY=y
-CONFIG_FEATURE_UTMP=y
-CONFIG_FEATURE_WTMP=y
-CONFIG_LOGIN=y
-# CONFIG_PAM is not set
-# CONFIG_LOGIN_SCRIPTS is not set
-CONFIG_FEATURE_NOLOGIN=y
-CONFIG_FEATURE_SECURETTY=y
-CONFIG_PASSWD=y
-CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
-# CONFIG_CRYPTPW is not set
-# CONFIG_CHPASSWD is not set
-CONFIG_SU=y
-CONFIG_FEATURE_SU_SYSLOG=y
-CONFIG_FEATURE_SU_CHECKS_SHELLS=y
-# CONFIG_SULOGIN is not set
-CONFIG_VLOCK=y
-
-#
-# Linux Ext2 FS Progs
-#
-CONFIG_CHATTR=y
-CONFIG_FSCK=y
-# CONFIG_LSATTR is not set
-
-#
-# Linux Module Utilities
-#
-CONFIG_INSMOD=y
-# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
-# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
-# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
-# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
-# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
-CONFIG_RMMOD=y
-CONFIG_LSMOD=y
-# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
-CONFIG_MODPROBE=y
-CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
-CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
-
-#
-# Options common to multiple modutils
-#
-CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
-# CONFIG_FEATURE_2_4_MODULES is not set
-CONFIG_FEATURE_2_6_MODULES=y
-# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set
-
-#
-# Linux System Utilities
-#
-CONFIG_DMESG=y
-CONFIG_FEATURE_DMESG_PRETTY=y
-CONFIG_FBSET=y
-CONFIG_FEATURE_FBSET_FANCY=y
-CONFIG_FEATURE_FBSET_READMODE=y
-# CONFIG_FDFLUSH is not set
-# CONFIG_FDFORMAT is not set
-CONFIG_FDISK=y
-CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
-CONFIG_FEATURE_FDISK_WRITABLE=y
-# CONFIG_FEATURE_AIX_LABEL is not set
-# CONFIG_FEATURE_SGI_LABEL is not set
-# CONFIG_FEATURE_SUN_LABEL is not set
-# CONFIG_FEATURE_OSF_LABEL is not set
-# CONFIG_FEATURE_FDISK_ADVANCED is not set
-# CONFIG_FREERAMDISK is not set
-CONFIG_FSCK_MINIX=y
-CONFIG_MKFS_MINIX=y
-
-#
-# Minix filesystem support
-#
-CONFIG_FEATURE_MINIX2=y
-# CONFIG_GETOPT is not set
-CONFIG_HEXDUMP=y
-# CONFIG_HD is not set
-# CONFIG_FEATURE_HEXDUMP_REVERSE is not set
-CONFIG_HWCLOCK=y
-CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
-CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
-# CONFIG_IPCRM is not set
-# CONFIG_IPCS is not set
-CONFIG_LOSETUP=y
-# CONFIG_MDEV is not set
-# CONFIG_FEATURE_MDEV_CONF is not set
-# CONFIG_FEATURE_MDEV_EXEC is not set
-# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
-CONFIG_MKSWAP=y
-# CONFIG_FEATURE_MKSWAP_V0 is not set
-CONFIG_MORE=y
-CONFIG_FEATURE_USE_TERMIOS=y
-CONFIG_MOUNT=y
-# CONFIG_FEATURE_MOUNT_HELPERS is not set
-CONFIG_FEATURE_MOUNT_NFS=y
-# CONFIG_FEATURE_MOUNT_CIFS is not set
-CONFIG_FEATURE_MOUNT_FLAGS=y
-CONFIG_FEATURE_MOUNT_FSTAB=y
-CONFIG_PIVOT_ROOT=y
-CONFIG_RDATE=y
-# CONFIG_READPROFILE is not set
-# CONFIG_SETARCH is not set
-CONFIG_SWAPONOFF=y
-CONFIG_SWITCH_ROOT=y
-CONFIG_UMOUNT=y
-# CONFIG_FEATURE_UMOUNT_ALL is not set
-
-#
-# Common options for mount/umount
-#
-CONFIG_FEATURE_MOUNT_LOOP=y
-# CONFIG_FEATURE_MTAB_SUPPORT is not set
-
-#
-# Miscellaneous Utilities
-#
-# CONFIG_ADJTIMEX is not set
-# CONFIG_BBCONFIG is not set
-# CONFIG_CHRT is not set
-# CONFIG_CROND is not set
-# CONFIG_DEBUG_CROND_OPTION is not set
-# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
-# CONFIG_CRONTAB is not set
-CONFIG_DC=y
-# CONFIG_DEVFSD is not set
-# CONFIG_DEVFSD_MODLOAD is not set
-# CONFIG_DEVFSD_FG_NP is not set
-# CONFIG_DEVFSD_VERBOSE is not set
-# CONFIG_FEATURE_DEVFS is not set
-# CONFIG_EJECT is not set
-# CONFIG_LAST is not set
-CONFIG_LESS=y
-CONFIG_FEATURE_LESS_MAXLINES=9999999
-CONFIG_FEATURE_LESS_BRACKETS=y
-CONFIG_FEATURE_LESS_FLAGS=y
-# CONFIG_FEATURE_LESS_FLAGCS is not set
-# CONFIG_FEATURE_LESS_MARKS is not set
-# CONFIG_FEATURE_LESS_REGEXP is not set
-# CONFIG_HDPARM is not set
-# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
-# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
-# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
-# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
-# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
-# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
-# CONFIG_MAKEDEVS is not set
-# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
-# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
-# CONFIG_MICROCOM is not set
-# CONFIG_MOUNTPOINT is not set
-# CONFIG_MT is not set
-# CONFIG_RAIDAUTORUN is not set
-# CONFIG_READAHEAD is not set
-# CONFIG_RUNLEVEL is not set
-# CONFIG_RX is not set
-CONFIG_STRINGS=y
-# CONFIG_SETSID is not set
-# CONFIG_TASKSET is not set
-# CONFIG_FEATURE_TASKSET_FANCY is not set
-CONFIG_TIME=y
-# CONFIG_TTYSIZE is not set
-# CONFIG_WATCHDOG is not set
-
-#
-# Networking Utilities
-#
-CONFIG_FEATURE_IPV6=y
-CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
-# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
-# CONFIG_ARP is not set
-# CONFIG_ARPING is not set
-# CONFIG_DNSD is not set
-# CONFIG_ETHER_WAKE is not set
-# CONFIG_FAKEIDENTD is not set
-# CONFIG_FTPGET is not set
-# CONFIG_FTPPUT is not set
-# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
-CONFIG_HOSTNAME=y
-# CONFIG_HTTPD is not set
-# CONFIG_FEATURE_HTTPD_RANGES is not set
-# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
-# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
-# CONFIG_FEATURE_HTTPD_SETUID is not set
-# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
-# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
-# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
-# CONFIG_FEATURE_HTTPD_CGI is not set
-# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
-# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
-# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
-# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
-# CONFIG_FEATURE_HTTPD_PROXY is not set
-CONFIG_IFCONFIG=y
-CONFIG_FEATURE_IFCONFIG_STATUS=y
-# CONFIG_FEATURE_IFCONFIG_SLIP is not set
-# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
-CONFIG_FEATURE_IFCONFIG_HW=y
-# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
-CONFIG_IFUPDOWN=y
-CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
-# CONFIG_FEATURE_IFUPDOWN_IP is not set
-# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
-CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
-CONFIG_FEATURE_IFUPDOWN_IPV4=y
-CONFIG_FEATURE_IFUPDOWN_IPV6=y
-CONFIG_FEATURE_IFUPDOWN_MAPPING=y
-# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
-# CONFIG_INETD is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
-# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
-# CONFIG_FEATURE_INETD_RPC is not set
-CONFIG_IP=y
-CONFIG_FEATURE_IP_ADDRESS=y
-CONFIG_FEATURE_IP_LINK=y
-CONFIG_FEATURE_IP_ROUTE=y
-CONFIG_FEATURE_IP_TUNNEL=y
-# CONFIG_FEATURE_IP_RULE is not set
-# CONFIG_FEATURE_IP_SHORT_FORMS is not set
-# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
-# CONFIG_IPADDR is not set
-# CONFIG_IPLINK is not set
-# CONFIG_IPROUTE is not set
-# CONFIG_IPTUNNEL is not set
-# CONFIG_IPRULE is not set
-# CONFIG_IPCALC is not set
-# CONFIG_FEATURE_IPCALC_FANCY is not set
-# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
-# CONFIG_NAMEIF is not set
-# CONFIG_FEATURE_NAMEIF_EXTENDED is not set
-CONFIG_NC=y
-# CONFIG_NC_SERVER is not set
-# CONFIG_NC_EXTRA is not set
-CONFIG_NETSTAT=y
-# CONFIG_FEATURE_NETSTAT_WIDE is not set
-CONFIG_NSLOOKUP=y
-CONFIG_PING=y
-CONFIG_PING6=y
-# CONFIG_PSCAN is not set
-CONFIG_FEATURE_FANCY_PING=y
-CONFIG_ROUTE=y
-# CONFIG_SLATTACH is not set
-CONFIG_TELNET=y
-# CONFIG_FEATURE_TELNET_TTYPE is not set
-CONFIG_FEATURE_TELNET_AUTOLOGIN=y
-# CONFIG_TELNETD is not set
-# CONFIG_FEATURE_TELNETD_STANDALONE is not set
-CONFIG_TFTP=y
-CONFIG_FEATURE_TFTP_GET=y
-CONFIG_FEATURE_TFTP_PUT=y
-# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
-# CONFIG_DEBUG_TFTP is not set
-CONFIG_TRACEROUTE=y
-# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
-# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
-# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
-CONFIG_APP_UDHCPD=y
-# CONFIG_APP_DHCPRELAY is not set
-CONFIG_APP_DUMPLEASES=y
-# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
-CONFIG_APP_UDHCPC=y
-CONFIG_FEATURE_UDHCPC_ARPING=y
-# CONFIG_FEATURE_UDHCP_DEBUG is not set
-# CONFIG_FEATURE_RFC3397 is not set
-CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
-# CONFIG_VCONFIG is not set
-CONFIG_WGET=y
-CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-# CONFIG_ZCIP is not set
-
-#
-# Process Utilities
-#
-CONFIG_FREE=y
-CONFIG_FUSER=y
-CONFIG_KILL=y
-CONFIG_KILLALL=y
-# CONFIG_KILLALL5 is not set
-# CONFIG_NMETER is not set
-# CONFIG_PGREP is not set
-CONFIG_PIDOF=y
-# CONFIG_FEATURE_PIDOF_SINGLE is not set
-# CONFIG_FEATURE_PIDOF_OMIT is not set
-# CONFIG_PKILL is not set
-CONFIG_PS=y
-CONFIG_FEATURE_PS_WIDE=y
-CONFIG_RENICE=y
-CONFIG_BB_SYSCTL=y
-CONFIG_TOP=y
-CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
-CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
-# CONFIG_FEATURE_TOP_DECIMALS is not set
-# CONFIG_FEATURE_TOPMEM is not set
-CONFIG_UPTIME=y
-CONFIG_WATCH=y
-
-#
-# Shells
-#
-CONFIG_FEATURE_SH_IS_ASH=y
-# CONFIG_FEATURE_SH_IS_HUSH is not set
-# CONFIG_FEATURE_SH_IS_MSH is not set
-# CONFIG_FEATURE_SH_IS_NONE is not set
-CONFIG_ASH=y
-
-#
-# Ash Shell Options
-#
-CONFIG_ASH_JOB_CONTROL=y
-CONFIG_ASH_READ_NCHARS=y
-CONFIG_ASH_READ_TIMEOUT=y
-CONFIG_ASH_ALIAS=y
-CONFIG_ASH_MATH_SUPPORT=y
-# CONFIG_ASH_MATH_SUPPORT_64 is not set
-CONFIG_ASH_GETOPTS=y
-# CONFIG_ASH_BUILTIN_ECHO is not set
-CONFIG_ASH_BUILTIN_TEST=y
-# CONFIG_ASH_CMDCMD is not set
-# CONFIG_ASH_MAIL is not set
-CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
-# CONFIG_ASH_RANDOM_SUPPORT is not set
-CONFIG_ASH_EXPAND_PRMT=y
-# CONFIG_HUSH is not set
-# CONFIG_HUSH_HELP is not set
-# CONFIG_HUSH_INTERACTIVE is not set
-# CONFIG_HUSH_JOB is not set
-# CONFIG_HUSH_TICK is not set
-# CONFIG_HUSH_IF is not set
-# CONFIG_HUSH_LOOPS is not set
-# CONFIG_LASH is not set
-# CONFIG_MSH is not set
-
-#
-# Bourne Shell Options
-#
-CONFIG_FEATURE_SH_EXTRA_QUIET=y
-# CONFIG_FEATURE_SH_STANDALONE is not set
-# CONFIG_CTTYHACK is not set
-
-#
-# System Logging Utilities
-#
-CONFIG_SYSLOGD=y
-CONFIG_FEATURE_ROTATE_LOGFILE=y
-CONFIG_FEATURE_REMOTE_LOG=y
-CONFIG_FEATURE_IPC_SYSLOG=y
-CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
-CONFIG_LOGREAD=y
-CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
-CONFIG_KLOGD=y
-CONFIG_LOGGER=y
-
-#
-# Runit Utilities
-#
-# CONFIG_RUNSV is not set
-# CONFIG_RUNSVDIR is not set
-# CONFIG_SV is not set
-# CONFIG_SVLOGD is not set
-# CONFIG_CHPST is not set
-# CONFIG_SETUIDGID is not set
-# CONFIG_ENVUIDGID is not set
-# CONFIG_ENVDIR is not set
-# CONFIG_SOFTLIMIT is not set
-# CONFIG_CHCON is not set
-# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
-# CONFIG_GETENFORCE is not set
-# CONFIG_GETSEBOOL is not set
-# CONFIG_LOAD_POLICY is not set
-# CONFIG_MATCHPATHCON is not set
-# CONFIG_RESTORECON is not set
-# CONFIG_RUNCON is not set
-# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
-# CONFIG_SELINUXENABLED is not set
-# CONFIG_SETENFORCE is not set
-# CONFIG_SETFILES is not set
-# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
-# CONFIG_SETSEBOOL is not set
-# CONFIG_SESTATUS is not set
-
-#
-# ipsvd utilities
-#
-# CONFIG_TCPSVD is not set
-# CONFIG_UDPSVD is not set
diff --git a/packages/nano/nano-1.2.1/.mtn2git_empty b/packages/c-nc/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/nano/nano-1.2.1/.mtn2git_empty
+++ b/packages/c-nc/.mtn2git_empty
diff --git a/packages/c-nc/c-nc_0.5.bb b/packages/c-nc/c-nc_0.5.bb
new file mode 100644
index 0000000000..b7d91621db
--- /dev/null
+++ b/packages/c-nc/c-nc_0.5.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "A Mastermind style game in GTK+"
+SECTION = "x11/games"
+LICENSE = "GPLv2"
+HOMEPAGE = "http://freshmeat.net/projects/c-nc/"
+DEPENDS = "gtk+"
+AUTHOR = "Alexandru Scvortov <scvalex@gmail.com>"
+PV = "0.5"
+
+inherit autotools
+
+SRC_URI = "http://c-nc.googlecode.com/files/c-nc-${PV}.tar.gz"
+
+do_install() {
+ install -d ${D}${bindir} ${D}${docdir}/c-nc
+ install -m 0755 ${S}/c-nc ${D}${bindir}
+ install -d ${D}${datadir}/applications/
+ install -m 0755 ${S}/c-nc.desktop ${D}${datadir}/applications/
+}
+
diff --git a/packages/nano/nano-2.0.6/.mtn2git_empty b/packages/cellwriter/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/nano/nano-2.0.6/.mtn2git_empty
+++ b/packages/cellwriter/.mtn2git_empty
diff --git a/packages/cellwriter/cellwriter_1.3.3.bb b/packages/cellwriter/cellwriter_1.3.3.bb
new file mode 100644
index 0000000000..12ec70a48f
--- /dev/null
+++ b/packages/cellwriter/cellwriter_1.3.3.bb
@@ -0,0 +1,13 @@
+DESCRIPTION = "A grid-entry natural handwriting input panel"
+SECTION = "x11/input"
+AUTHOR = "Michael Levin"
+LICENSE = "GPL"
+DEPENDS = "gtk+ libxtst"
+
+SRC_URI = "http://pub.risujin.org/cellwriter/${PN}-${PV}.tar.gz"
+
+inherit autotools
+
+EXTRA_OECONF = "--without-gnome"
+
+FILES_${PN} += "${datadir}/icons"
diff --git a/packages/ckermit/ckermit_211.bb b/packages/ckermit/ckermit_211.bb
index c90ea271ae..1317328619 100644
--- a/packages/ckermit/ckermit_211.bb
+++ b/packages/ckermit/ckermit_211.bb
@@ -49,14 +49,7 @@ PR = "r1"
# ... and probably other distro's as well.
#
-
-
-python do_unpack () {
- bb.mkdirhier(bb.data.expand('${S}', d))
- bb.build.exec_func('base_do_unpack', d, [ '${S}' ])
-}
-
-
+S = "${WORKDIR}"
export CC2 = "${CC}"
export BINDIR = "${bindir}"
diff --git a/packages/cmake/cmake-native_2.4.8.bb b/packages/cmake/cmake-native_2.4.8.bb
index fcfdda1c1a..1a56fa40e0 100644
--- a/packages/cmake/cmake-native_2.4.8.bb
+++ b/packages/cmake/cmake-native_2.4.8.bb
@@ -1,3 +1,13 @@
CMAKE_MAJOR_VERSION="2.4"
require cmake.inc
inherit native
+
+do_stage() {
+ for i in cpack ctest ccmake cmake; do
+ install -m 0755 bin/$i ${STAGING_BINDIR_NATIVE}
+ done
+}
+
+do_install() {
+ :
+}
diff --git a/packages/cmake/cmake.inc b/packages/cmake/cmake.inc
index 83475bb5eb..5190b6233f 100644
--- a/packages/cmake/cmake.inc
+++ b/packages/cmake/cmake.inc
@@ -1,4 +1,3 @@
-# cppunit OE build file
# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
diff --git a/packages/curl/curl_7.16.4.bb b/packages/curl/curl_7.16.4.bb
index 555e5bc643..ef85358f3e 100644
--- a/packages/curl/curl_7.16.4.bb
+++ b/packages/curl/curl_7.16.4.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Command line tool and library for client-side URL transfers."
LICENSE = "MIT"
DEPENDS = "zlib gnutls"
SECTION = "console/network"
-PR = "r2"
+PR = "r3"
SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
file://pkgconfig_fix.patch;patch=1"
diff --git a/packages/curl/files/pkgconfig_fix.patch b/packages/curl/files/pkgconfig_fix.patch
index a5730095d2..e02316a73a 100644
--- a/packages/curl/files/pkgconfig_fix.patch
+++ b/packages/curl/files/pkgconfig_fix.patch
@@ -1,14 +1,35 @@
Index: curl-7.16.4/libcurl.pc.in
===================================================================
--- curl-7.16.4.orig/libcurl.pc.in 2007-02-18 09:41:27.000000000 +0000
-+++ curl-7.16.4/libcurl.pc.in 2008-02-29 12:19:32.000000000 +0000
++++ curl-7.16.4/libcurl.pc.in 2008-03-18 11:42:43.000000000 +0000
@@ -33,6 +33,7 @@
URL: http://curl.haxx.se/
Description: Library to transfer files with ftp, http, etc.
Version: @VERSION@
-Libs: -L${libdir} -lcurl @LDFLAGS@ @LIBS@
-Libs.private: @LIBCURL_LIBS@ @LIBS@
-+Requires.private: gnutls
++Requires.private: @GNUTLS_REQUIRED@
+Libs: -L${libdir} -lcurl
+Libs.private: -ldl -lz
Cflags: -I${includedir}
+Index: curl-7.16.4/configure.ac
+===================================================================
+--- curl-7.16.4.orig/configure.ac 2008-03-18 11:40:30.000000000 +0000
++++ curl-7.16.4/configure.ac 2008-03-18 11:42:06.000000000 +0000
+@@ -1361,6 +1361,7 @@
+ AC_SUBST(USE_GNUTLS, [1])
+ GNUTLS_ENABLED=1
+ USE_GNUTLS="yes"
++ GNUTLS_REQUIRED="gnutls"
+ curl_ssl_msg="enabled (GnuTLS)"
+ ],
+ [
+@@ -1387,6 +1388,8 @@
+
+ fi dnl OPENSSL != 1
+
++AC_SUBST(GNUTLS_REQUIRED)
++
+ dnl ----------------------------------------------------
+ dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
+ dnl ----------------------------------------------------
diff --git a/packages/db/db-native_4.2.52.bb b/packages/db/db-native_4.2.52.bb
index 12a875ff13..567ddffb75 100644
--- a/packages/db/db-native_4.2.52.bb
+++ b/packages/db/db-native_4.2.52.bb
@@ -11,3 +11,17 @@ inherit native
require db_${PV}.bb
PACKAGES = ""
+
+do_stage() {
+ # The .h files get installed read-only, the autostage
+ # function just uses cp -pPR, so do this by hand
+ rm -rf ${STAGE_TEMP}
+ mkdir -p ${STAGE_TEMP}
+ oe_runmake DESTDIR="${STAGE_TEMP}" install_include
+ cp -pPRf ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}/.
+ rm -rf ${STAGE_TEMP}
+ oe_libinstall -so -C .libs libdb-4.2 ${STAGING_LIBDIR}
+ ln -sf libdb-4.2.so ${STAGING_LIBDIR}/libdb.so
+ ln -sf libdb-4.2.a ${STAGING_LIBDIR}/libdb.a
+}
+
diff --git a/packages/db/db_4.2.52.bb b/packages/db/db_4.2.52.bb
index a0c394f7a4..94d875e2cd 100644
--- a/packages/db/db_4.2.52.bb
+++ b/packages/db/db_4.2.52.bb
@@ -14,7 +14,7 @@ HOMEPAGE = "http://www.sleepycat.com"
LICENSE = "BSD Sleepycat"
VIRTUAL_NAME ?= "virtual/db"
CONFLICTS = "db3"
-PR = "r6"
+PR = "r7"
SRC_URI = "http://downloads.sleepycat.com/db-${PV}.tar.gz"
#SRC_URI_MD5 = "http://downloads.sleepycat.com/db-${PV}.tar.gz.md5"
diff --git a/packages/dbus/dbus-native_1.0.3.bb b/packages/dbus/dbus-native_1.0.3.bb
index 0149ab374f..195557b35b 100644
--- a/packages/dbus/dbus-native_1.0.3.bb
+++ b/packages/dbus/dbus-native_1.0.3.bb
@@ -8,7 +8,7 @@ DEPENDS = "glib-2.0-native libxml2-native expat-native"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/dbus-${PV}"
SRC_URI = "\
- http://freedesktop.org/software/dbus/releases/dbus-${PV}.tar.gz \
+ http://freedesktop.org/software/dbus/releases/dbus/dbus-${PV}.tar.gz \
file://cross.patch;patch=1 \
file://tmpdir.patch;patch=1 \
file://dbus-1.init \
diff --git a/packages/directfb/++dfb_1.0.0.bb b/packages/directfb/++dfb_1.0.0.bb
index f440e117ff..7c4aea3920 100644
--- a/packages/directfb/++dfb_1.0.0.bb
+++ b/packages/directfb/++dfb_1.0.0.bb
@@ -10,10 +10,6 @@ RV = "0.9-25"
inherit autotools pkgconfig
-do_configure_append() {
- find ${S} -type f | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
-}
-
do_stage() {
autotools_stage_all
}
diff --git a/packages/directfb/directfb-examples_1.0.0.bb b/packages/directfb/directfb-examples_1.0.0.bb
index 064a808273..7fd3f38848 100644
--- a/packages/directfb/directfb-examples_1.0.0.bb
+++ b/packages/directfb/directfb-examples_1.0.0.bb
@@ -10,11 +10,6 @@ S = "${WORKDIR}/DirectFB-examples-${PV}"
inherit autotools
-do_configure_append() {
-# find ${S} -type f | xargs sed -i 's:/usr/lib:${STAGING_LIBDIR}:'
- find ${S} -type f | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
-}
-
do_stage() {
autotools_stage_all
}
diff --git a/packages/netbase/netbase/ghi270/.mtn2git_empty b/packages/dt/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/netbase/netbase/ghi270/.mtn2git_empty
+++ b/packages/dt/.mtn2git_empty
diff --git a/packages/dt/dt_15.14.bb b/packages/dt/dt_15.14.bb
new file mode 100644
index 0000000000..5185af4f15
--- /dev/null
+++ b/packages/dt/dt_15.14.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "The Data Test Program (dt) is a generic data test program used to verify proper \
+operation of peripherals, file systems, device drivers, or any data stream supported by the \
+operating system."
+SECTION = "console/tests"
+HOMEPAGE = "http://home.comcast.net/~SCSIguy/SCSI_FAQ/RMiller_Tools/dt.html"
+LICENSE = "Public domain"
+
+SRC_URI = "http://home.comcast.net/~SCSIguy/SCSI_FAQ/RMiller_Tools/ftp/dt/dt-source.tar.gz"
+S = "${WORKDIR}/${PN}.d-WIP"
+
+do_compile() {
+ ${MAKE} -f Makefile.linux
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 dt ${D}${bindir}
+}
diff --git a/packages/e2fsprogs/e2fsprogs.inc b/packages/e2fsprogs/e2fsprogs.inc
index 7673d49e21..eb094470c4 100644
--- a/packages/e2fsprogs/e2fsprogs.inc
+++ b/packages/e2fsprogs/e2fsprogs.inc
@@ -9,7 +9,6 @@ S = "${WORKDIR}/e2fsprogs-${PV}"
inherit autotools
-EXTRA_OECONF_linux-uclibc = "--disable-nls"
-EXTRA_OECONF += " --enable-dynamic-e2fsck"
+EXTRA_OECONF = "--enable-dynamic-e2fsck --disable-nls --sbindir=${base_sbindir}"
PARALLEL_MAKE = ""
diff --git a/packages/e2fsprogs/e2fsprogs_1.38.bb b/packages/e2fsprogs/e2fsprogs_1.38.bb
index 91a391975f..a586c1ab10 100644
--- a/packages/e2fsprogs/e2fsprogs_1.38.bb
+++ b/packages/e2fsprogs/e2fsprogs_1.38.bb
@@ -1,13 +1,9 @@
require e2fsprogs.inc
-PR = "r11"
+PR = "r12"
SRC_URI += "file://no-hardlinks.patch;patch=1"
-EXTRA_OECONF += " --sbindir=${base_sbindir} \
- --disable-nls \
- "
-
do_compile_prepend () {
find ./ -print|xargs chmod u=rwX
( cd util; ${BUILD_CC} subst.c -o subst )
diff --git a/packages/espeak/espeak-data_1.35.bb b/packages/espeak/espeak-data_1.35.bb
new file mode 100644
index 0000000000..4dc9aa9882
--- /dev/null
+++ b/packages/espeak/espeak-data_1.35.bb
@@ -0,0 +1,30 @@
+require espeak.inc
+
+PR = "r0"
+
+inherit native
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${layout_datadir}"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+TARGET_ARCH = "${MACHINE_ARCH}"
+
+do_compile() {
+ # Fixing byte order of phoneme data files
+ cd "${S}/platforms/big_endian"
+ sed -i '/^ *CC *=/d' Makefile
+ sed -i 's/\(.*BYTE_ORDER\)/#undef BYTE_ORDER\n#define BYTE_ORDER BIG_ENDIAN\n\1/' espeak-phoneme-data.c
+ oe_runmake
+ ./espeak-phoneme-data "${S}/espeak-data"
+ cp -f phondata phonindex phontab "${S}/espeak-data"
+}
+
+do_install() {
+ install -d ${D}${layout_datadir}/espeak-data
+ install -m 0644 ${S}/espeak-data/phon* ${D}${layout_datadir}/espeak-data
+}
+
+do_stage() {
+ :
+}
diff --git a/packages/espeak/espeak.inc b/packages/espeak/espeak.inc
new file mode 100644
index 0000000000..c0502b6ca3
--- /dev/null
+++ b/packages/espeak/espeak.inc
@@ -0,0 +1,7 @@
+DESCRIPTION = "eSpeak is a compact open source software speech synthesizer"
+SECTION = "base"
+LICENSE = "GPL"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/espeak/espeak-${PV}-source.zip"
+
+S = "${WORKDIR}/espeak-${PV}-source"
diff --git a/packages/espeak/espeak_1.30.bb b/packages/espeak/espeak_1.30.bb
deleted file mode 100644
index a460b5b4ba..0000000000
--- a/packages/espeak/espeak_1.30.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh
-#
-# Copyright Matthias Hentges <devel@hentges.net> (c) 2008
-# License: MIT (see http://www.opensource.org/licenses/mit-license.php
-# for a copy of the license)
-#
-# Filename: espeak_1.30.bb
-# Date: 20080104 (YMD)
-
-DESCRIPTION = "eSpeak is a compact open source software speech synthesizer"
-SECTION = "base"
-LICENSE = "GPL"
-
-DEPENDS = "portaudio-v19"
-
-######################################################################################
-
-PR = "r1"
-
-SRC_URI = "http://kent.dl.sourceforge.net/sourceforge/espeak/espeak-${PV}-source.zip"
-
-S = "${WORKDIR}/${PN}-${PV}-source"
-
-FILES_${PN} += " /usr/share/espeak-data/ "
-
-do_configure() {
- # espeak supports portaudio in APIs V18 and V19
- cp ${S}/src/portaudio19.h ${S}/src/portaudio.h
-}
-
-do_compile() {
- cd src
- oe_runmake
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -d ${D}${libdir}
- install -d ${D}${includedir}
- install -d ${D}/usr/share/espeak-data
-
- install -m 0755 ${S}/src/espeak ${D}${bindir}
- oe_libinstall -so -C src libespeak ${D}${libdir}
-
- cp -prf ${S}/espeak-data/* ${D}/usr/share/espeak-data
-}
-
-do_stage() {
- install -d ${STAGING_INCDIR}/espeak
- install -m 0644 ${S}/src/speak_lib.h ${STAGING_INCDIR}/espeak/
- oe_libinstall -so -C src libespeak ${STAGING_LIBDIR}
-}
diff --git a/packages/espeak/espeak_1.35.bb b/packages/espeak/espeak_1.35.bb
new file mode 100644
index 0000000000..f7dacf54bc
--- /dev/null
+++ b/packages/espeak/espeak_1.35.bb
@@ -0,0 +1,45 @@
+require espeak.inc
+
+EXTRA_PHONEMES = '${@base_contains("SITEINFO_ENDIANESS", "be", "espeak-data (= ${PV})", "", d)}'
+RDEPENDS = "portaudio-v19 ${EXTRA_PHONEMES}"
+
+PR = "r1"
+
+CXXFLAGS += "-DUSE_PORTAUDIO"
+
+FILES_${PN} += "${datadir}/espeak-data"
+
+do_configure() {
+ # "speak" binary, a TTS engine, uses portaudio in either APIs V18 or V19, use V19
+ cp "${S}/src/portaudio19.h" "${S}/src/portaudio.h"
+}
+
+do_compile() {
+ cd src
+ oe_runmake
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${libdir}
+ install -d ${D}${includedir}
+ install -d ${D}${datadir}/espeak-data
+
+ # we do not ship "speak" binary though.
+ install -m 0755 ${S}/src/espeak ${D}${bindir}
+ install -m 0644 ${S}/src/speak_lib.h ${D}${includedir}
+ oe_libinstall -so -C src libespeak ${D}${libdir}
+
+ if [ "${SITEINFO_ENDIANESS}" = "be" ] ; then
+ # the big-endian phon* files are provided by the package espeak-data
+ rm -f ${S}/espeak-data/phon*
+ fi
+
+ cp -prf ${S}/espeak-data/* ${D}${datadir}/espeak-data
+}
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/espeak
+ install -m 0644 ${S}/src/speak_lib.h ${STAGING_INCDIR}/espeak/
+ oe_libinstall -so -C src libespeak ${STAGING_LIBDIR}
+}
diff --git a/packages/freesmartphone/gsm0710muxd_svn.bb b/packages/freesmartphone/gsm0710muxd_svn.bb
index 60ea915933..c909c401b7 100644
--- a/packages/freesmartphone/gsm0710muxd_svn.bb
+++ b/packages/freesmartphone/gsm0710muxd_svn.bb
@@ -3,11 +3,12 @@ HOMEPAGE = "http://www.freesmartphone.org"
AUTHOR = "M. Dietrich"
SECTION = "console/network"
DEPENDS = "intltool-native dbus dbus-glib"
+RDEPENDS = "dbus dbus-glib"
RCONFLICTS = "gsmd"
RREPLACES = "gsmd"
LICENSE = "GPL"
PV = "0.0+svnr${SRCREV}"
-PR = "r4"
+PR = "r5"
SRC_URI = "svn://projects.linuxtogo.org/svn/smartphones/trunk/software;module=gsm0710muxd"
S = "${WORKDIR}/gsm0710muxd"
diff --git a/packages/gcc/gcc-3.3.3.inc b/packages/gcc/gcc-3.3.3.inc
new file mode 100644
index 0000000000..f0da44b3d8
--- /dev/null
+++ b/packages/gcc/gcc-3.3.3.inc
@@ -0,0 +1,39 @@
+require gcc-common.inc
+
+SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://config.sub.patch;patch=1 \
+ file://empty6.patch;patch=1 \
+ file://pr10392-1-test.patch;patch=1 \
+ file://pr10412-1-test.patch;patch=1 \
+ file://pr10589-1-test.patch;patch=1 \
+ file://pr11162-1-test.patch;patch=1 \
+ file://pr11587-1-test.patch;patch=1 \
+ file://pr11608.patch;patch=1 \
+ file://pr11736-1-test.patch;patch=1 \
+ file://pr11864-1-test.patch;patch=1 \
+ file://pr12009.patch;patch=1 \
+ file://pr12010.patch;patch=1 \
+ file://pr13260-test.patch;patch=1 \
+ file://pr9365-1-test.patch;patch=1 \
+ file://sh-lib1funcs_sizeAndType.patch;patch=1 \
+ file://sh-pic-set_fpscr-gcc-3.3.2.patch;patch=1 \
+ file://thunk3.patch;patch=1 \
+ file://arm-10730.dpatch;patch=1;pnum=0 \
+ file://arm-12527.dpatch;patch=1;pnum=0 \
+ file://arm-14558.dpatch;patch=1;pnum=0 \
+ file://arm-common.dpatch;patch=1;pnum=0 \
+ file://arm-gotoff.dpatch;patch=1;pnum=0 \
+ file://arm-ldm.dpatch;patch=1;pnum=0 \
+ file://arm-tune.patch;patch=1;pnum=0 \
+ file://arm-xscale.patch;patch=1;pnum=0 \
+ file://arm-14302.patch;patch=1;pnum=0 \
+ file://arm-ldm-peephole.patch;patch=1;pnum=0 \
+ file://libibery-crosstool.patch;patch=1;pnum=1 \
+ file://reverse-compare.patch;patch=1 \
+ file://gcc34-15089.patch;patch=1 \
+ file://gcc-uclibc-3.3-100-conf.patch;patch=1 \
+ file://gcc-uclibc-3.3-110-conf.patch;patch=1 \
+ file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \
+ file://gcc-uclibc-3.3-200-code.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://bash3.patch;patch=1"
diff --git a/packages/gcc/gcc-3.3.4.inc b/packages/gcc/gcc-3.3.4.inc
new file mode 100644
index 0000000000..eec46d556d
--- /dev/null
+++ b/packages/gcc/gcc-3.3.4.inc
@@ -0,0 +1,18 @@
+require gcc-common.inc
+
+SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://arm-gotoff.dpatch;patch=1;pnum=0 \
+ file://arm-ldm.dpatch;patch=1;pnum=0 \
+ file://arm-tune.patch;patch=1;pnum=0 \
+ file://arm-ldm-peephole.patch;patch=1;pnum=0 \
+ file://libibery-crosstool.patch;patch=1;pnum=1 \
+ file://reverse-compare.patch;patch=1 \
+ file://gcc34-15089.patch;patch=1 \
+ file://gcc-uclibc-3.3-100-conf.patch;patch=1 \
+ file://gcc-uclibc-3.3-110-conf.patch;patch=1 \
+ file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \
+ file://gcc-uclibc-3.3-200-code.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://gcc-com.patch;patch=1 \
+ file://bash3.patch;patch=1"
+
diff --git a/packages/gcc/gcc-3.4.3.inc b/packages/gcc/gcc-3.4.3.inc
new file mode 100644
index 0000000000..6511dfbd17
--- /dev/null
+++ b/packages/gcc/gcc-3.4.3.inc
@@ -0,0 +1,18 @@
+require gcc-common.inc
+
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://gcc34-reverse-compare.patch;patch=1 \
+ file://gcc34-arm-ldm.patch;patch=1 \
+ file://gcc34-arm-ldm-peephole.patch;patch=1 \
+ file://gcc34-arm-tune.patch;patch=1 \
+ file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \
+ file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \
+ file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \
+ file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \
+ file://gcc-3.4.0-arm-bigendian.patch;patch=1 \
+ file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \
+ file://GCC3.4.0VisibilityPatch.diff;patch=1 \
+ file://15342.patch;patch=1 \
+ file://always-fixincperm.patch;patch=1 \
+ file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 "
diff --git a/packages/gcc/gcc-3.4.4.inc b/packages/gcc/gcc-3.4.4.inc
new file mode 100644
index 0000000000..2cd2ddd4a4
--- /dev/null
+++ b/packages/gcc/gcc-3.4.4.inc
@@ -0,0 +1,23 @@
+require gcc-common.inc
+
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://gcc34-reverse-compare.patch;patch=1 \
+ file://gcc34-arm-ldm.patch;patch=1 \
+ file://gcc34-arm-ldm-peephole.patch;patch=1 \
+ file://gcc34-arm-tune.patch;patch=1 \
+ file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \
+ file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \
+ file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \
+ file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \
+ file://gcc-3.4.0-arm-bigendian.patch;patch=1 \
+ file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \
+ file://GCC3.4.0VisibilityPatch.diff;patch=1 \
+ file://15342.patch;patch=1 \
+ file://always-fixincperm.patch;patch=1 \
+ file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://gcc4-mtune-compat.patch;patch=1"
+
+SRC_URI += "file://gcc34-configure.in.patch;patch=1"
+SRC_URI += "file://gcc34-thumb-support.patch;patch=1"
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
diff --git a/packages/gcc/gcc-4.0.0.inc b/packages/gcc/gcc-4.0.0.inc
new file mode 100644
index 0000000000..7b231771f1
--- /dev/null
+++ b/packages/gcc/gcc-4.0.0.inc
@@ -0,0 +1,9 @@
+require gcc-common.inc
+
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://ldflags.patch;patch=1"
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
+# Language Overrides
+FORTRAN = ",f95"
diff --git a/packages/gcc/gcc-4.0.2.inc b/packages/gcc/gcc-4.0.2.inc
new file mode 100644
index 0000000000..a0a6a6ae66
--- /dev/null
+++ b/packages/gcc/gcc-4.0.2.inc
@@ -0,0 +1,29 @@
+require gcc-common.inc
+
+DEPENDS = "mpfr gmp"
+
+SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://GCOV_PREFIX_STRIP-cross-profile_4.1.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 "
+
+# uclibc patches below
+SRC_URI_append = " file://100-uclibc-conf.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://800-arm-bigendian.patch;patch=1 \
+ file://zecke-host-cpp-ac-hack.patch;patch=1 \
+ file://gcc-4.0.2-atmel.0.99.2.patch;patch=1 \
+ "
+
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
+# Language Overrides
+FORTRAN = ""
+
+EXTRA_OECONF += "--disable-libssp"
+
diff --git a/packages/gcc/gcc-4.1.0.inc b/packages/gcc/gcc-4.1.0.inc
new file mode 100644
index 0000000000..4e6dcfd4e2
--- /dev/null
+++ b/packages/gcc/gcc-4.1.0.inc
@@ -0,0 +1,19 @@
+require gcc-common.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.0/gcc-4.1.0.tar.bz2 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://pr34130.patch;patch=1"
+
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
+EXTRA_OECONF += "--disable-libssp"
+
+# Language Overrides
+FORTRAN = ""
+
+
diff --git a/packages/gcc/gcc-4.1.1.inc b/packages/gcc/gcc-4.1.1.inc
new file mode 100644
index 0000000000..a892dc31e3
--- /dev/null
+++ b/packages/gcc/gcc-4.1.1.inc
@@ -0,0 +1,45 @@
+require gcc-common.inc
+
+DEPENDS = "mpfr gmp"
+
+SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://110-arm-eabi.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+ file://800-arm-bigendian.patch;patch=1 \
+ file://801-arm-bigendian-eabi.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://arm-thumb.patch;patch=1 \
+ file://arm-thumb-cache.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://cse.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://unbreak-armv4t.patch;patch=1 \
+ file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
+ file://gcc-4.1.1-pr13685-1.patch;patch=1 \
+ file://gcc-ignore-cache.patch;patch=1 \
+ file://gcc-4.1.1-e300cx.patch;patch=1 \
+ file://pr34130.patch;patch=1 \
+ "
+
+SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+
+#This is a dirty hack to get gcc 4.1.1 to compile for glibc AND uclibc on ppc
+#the patch that is need it to get gcc support soft-floats with glibc, makes gcc fail with uclibc
+SRC_URI_append_linux = " file://ppc-gcc-41-20060515.patch;patch=1 \
+ file://ppc-sfp-long-double-gcc411-7.patch;patch=1 "
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+EXTRA_OECONF += " --disable-libssp "
diff --git a/packages/gcc/gcc-4.1.2.inc b/packages/gcc/gcc-4.1.2.inc
new file mode 100644
index 0000000000..6e5671280a
--- /dev/null
+++ b/packages/gcc/gcc-4.1.2.inc
@@ -0,0 +1,58 @@
+require gcc-common.inc
+
+DEPENDS = "mpfr gmp"
+
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2 \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://110-arm-eabi.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+ file://800-arm-bigendian.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://arm-thumb.patch;patch=1 \
+ file://arm-thumb-cache.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://unbreak-armv4t.patch;patch=1 \
+ file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
+ file://cache-amnesia.patch;patch=1 \
+ file://gfortran.patch;patch=1 \
+ file://gcc-4.0.2-e300c2c3.patch;patch=1 \
+ file://pr34130.patch;patch=1 \
+ "
+
+SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+
+SRC_URI_avr32 = "http://www.angstrom-distribution.org/unstable/sources/gcc-4.1.2-atmel.1.1.0.tar.gz \
+# file://100-uclibc-conf.patch;patch=1 \
+# file://200-uclibc-locale.patch;patch=1 \
+# file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://cache-amnesia.patch;patch=1 \
+ "
+
+do_compile_prepend_avr32() {
+ ln -sf ${S}/libstdc++-v3/config/os/uclibc/ ${S}/libstdc++-v3/config/os/uclibc-linux
+}
+
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+EXTRA_OECONF += " --disable-libssp "
diff --git a/packages/gcc/gcc-4.2.1.inc b/packages/gcc/gcc-4.2.1.inc
new file mode 100644
index 0000000000..25b5937141
--- /dev/null
+++ b/packages/gcc/gcc-4.2.1.inc
@@ -0,0 +1,94 @@
+require gcc-common.inc
+
+DEPENDS = "mpfr gmp"
+
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://103-uclibc-conf-noupstream.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://203-uclibc-locale-no__x.patch;patch=1 \
+ file://204-uclibc-locale-wchar_fix.patch;patch=1 \
+ file://205-uclibc-locale-update.patch;patch=1 \
+ file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://305-libmudflap-susv3-legacy.patch;patch=1 \
+ file://306-libstdc++-namespace.patch;patch=1 \
+ file://307-locale_facets.patch;patch=1 \
+ file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+ file://800-arm-bigendian.patch;patch=1 \
+ file://904-flatten-switch-stmt-00.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://arm-thumb.patch;patch=1 \
+ file://arm-thumb-cache.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://unbreak-armv4t.patch;patch=1 \
+ file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
+ file://cache-amnesia.patch;patch=1 \
+ file://gfortran.patch;patch=1 \
+ file://pr34130.patch;patch=1 \
+"
+
+SRC_URI_avr32 = " http://ewi546.ewi.utwente.nl/tmp/avr32-gcc-4.2.1-atmel.1.0.3.tar.gz \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://103-uclibc-conf-noupstream.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://203-uclibc-locale-no__x.patch;patch=1 \
+ file://204-uclibc-locale-wchar_fix.patch;patch=1 \
+ file://205-uclibc-locale-update.patch;patch=1 \
+ file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://305-libmudflap-susv3-legacy.patch;patch=1 \
+ file://306-libstdc++-namespace.patch;patch=1 \
+ file://307-locale_facets.patch;patch=1 \
+ file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+ file://904-flatten-switch-stmt-00.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://cache-amnesia.patch;patch=1 \
+ file://gfortran.patch;patch=1 \
+"
+
+SRC_URI_append_ep93xx = " \
+ file://arm-crunch-saveregs.patch;patch=1 \
+ file://arm-crunch-20000320.patch;patch=1 \
+ file://arm-crunch-compare.patch;patch=1 \
+ file://arm-crunch-compare-unordered.patch;patch=1 \
+ file://arm-crunch-compare-geu.patch;patch=1 \
+ file://arm-crunch-eabi-ieee754.patch;patch=1 \
+ file://arm-crunch-eabi-ieee754-div.patch;patch=1 \
+ file://arm-crunch-64bit-disable0.patch;patch=1 \
+ file://arm-crunch-offset.patch;patch=1 \
+ file://arm-crunch-fp_consts.patch;patch=1 \
+ file://arm-crunch-neg2.patch;patch=1 \
+ file://arm-crunch-predicates3.patch;patch=1 \
+ file://arm-crunch-cfcvtds-disable.patch;patch=1 \
+ file://arm-crunch-floatsi-disable.patch;patch=1 \
+ file://arm-crunch-truncsi-disable.patch;patch=1 \
+ file://arm-crunch-cfcvt64-disable.patch;patch=1 \
+ file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
+ "
+
+PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}"
+
+SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+
+# Language Overrides
+FORTRAN = ""
+FORTRAN_linux-gnueabi = ",fortran"
+JAVA = ""
+
+EXTRA_OECONF += " --disable-libgomp --disable-libssp --disable-bootstrap "
diff --git a/packages/gcc/gcc-4.2.2.inc b/packages/gcc/gcc-4.2.2.inc
new file mode 100644
index 0000000000..e2b4c92669
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2.inc
@@ -0,0 +1,73 @@
+require gcc-common.inc
+
+DEPENDS = "mpfr gmp"
+
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://103-uclibc-conf-noupstream.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://203-uclibc-locale-no__x.patch;patch=1 \
+ file://204-uclibc-locale-wchar_fix.patch;patch=1 \
+ file://205-uclibc-locale-update.patch;patch=1 \
+ file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://305-libmudflap-susv3-legacy.patch;patch=1 \
+ file://306-libstdc++-namespace.patch;patch=1 \
+ file://307-locale_facets.patch;patch=1 \
+ file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+ file://800-arm-bigendian.patch;patch=1 \
+ file://801-arm-bigendian-eabi.patch;patch=1 \
+ file://904-flatten-switch-stmt-00.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://arm-thumb.patch;patch=1 \
+ file://arm-thumb-cache.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://unbreak-armv4t.patch;patch=1 \
+ file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
+ file://cache-amnesia.patch;patch=1 \
+ file://gfortran.patch;patch=1 \
+ file://gcc-4.0.2-e300c2c3.patch;patch=1 \
+ file://pr34130.patch;patch=1 \
+ file://fortran-static-linking.patch;patch=1 \
+ file://intermask-bigendian.patch;patch=1 \
+"
+
+SRC_URI_append_ep93xx = " \
+ file://arm-crunch-saveregs.patch;patch=1 \
+ file://arm-crunch-20000320.patch;patch=1 \
+ file://arm-crunch-compare.patch;patch=1 \
+ file://arm-crunch-compare-unordered.patch;patch=1 \
+ file://arm-crunch-compare-geu.patch;patch=1 \
+ file://arm-crunch-eabi-ieee754.patch;patch=1 \
+ file://arm-crunch-eabi-ieee754-div.patch;patch=1 \
+ file://arm-crunch-64bit-disable0.patch;patch=1 \
+ file://arm-crunch-offset.patch;patch=1 \
+ file://arm-crunch-fp_consts.patch;patch=1 \
+ file://arm-crunch-neg2.patch;patch=1 \
+ file://arm-crunch-predicates3.patch;patch=1 \
+ file://arm-crunch-cfcvtds-disable.patch;patch=1 \
+ file://arm-crunch-floatsi-disable.patch;patch=1 \
+ file://arm-crunch-truncsi-disable.patch;patch=1 \
+ file://arm-crunch-cfcvt64-disable.patch;patch=1 \
+ file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
+ "
+
+PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}"
+
+SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+
+# Language Overrides
+FORTRAN = ""
+FORTRAN_linux-gnueabi = ",fortran"
+JAVA = ""
+
+EXTRA_OECONF += " --disable-libssp --disable-bootstrap "
+
diff --git a/packages/gcc/gcc-4.3.0.inc b/packages/gcc/gcc-4.3.0.inc
new file mode 100644
index 0000000000..64d52cabbe
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0.inc
@@ -0,0 +1,53 @@
+# No uclibc, armeb and thumb patches - really needs checking
+DEFAULT_PREFERENCE = "-99"
+
+require gcc-common.inc
+
+DEPENDS = "mpfr gmp"
+
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+# file://100-uclibc-conf.patch;patch=1 \
+# file://103-uclibc-conf-noupstream.patch;patch=1 \
+# file://200-uclibc-locale.patch;patch=1 \
+# file://203-uclibc-locale-no__x.patch;patch=1 \
+# file://204-uclibc-locale-wchar_fix.patch;patch=1 \
+# file://205-uclibc-locale-update.patch;patch=1 \
+ file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+# file://302-c99-snprintf.patch;patch=1 \
+# file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://305-libmudflap-susv3-legacy.patch;patch=1 \
+# file://306-libstdc++-namespace.patch;patch=1 \
+# file://307-locale_facets.patch;patch=1 \
+# file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+# file://800-arm-bigendian.patch;patch=1 \
+# file://801-arm-bigendian-eabi.patch;patch=1 \
+ file://904-flatten-switch-stmt-00.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+# file://gcc41-configure.in.patch;patch=1 \
+# file://arm-thumb.patch;patch=1 \
+# file://arm-thumb-cache.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+# file://unbreak-armv4t.patch;patch=1 \
+ file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
+ file://cache-amnesia.patch;patch=1 \
+ file://gfortran.patch;patch=1 \
+# file://gcc-4.0.2-e300c2c3.patch;patch=1 \
+# file://pr34130.patch;patch=1 \
+# file://fortran-static-linking.patch;patch=1 \
+# file://intermask-bigendian.patch;patch=1 \
+"
+
+SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+EXTRA_OECONF += " --disable-libssp --disable-bootstrap "
+
diff --git a/packages/openmoko-projects/tangogps/.mtn2git_empty b/packages/gcc/gcc-4.3.0/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/openmoko-projects/tangogps/.mtn2git_empty
+++ b/packages/gcc/gcc-4.3.0/.mtn2git_empty
diff --git a/packages/gcc/gcc-4.3.0/100-uclibc-conf.patch b/packages/gcc/gcc-4.3.0/100-uclibc-conf.patch
new file mode 100644
index 0000000000..4243ff7b91
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/100-uclibc-conf.patch
@@ -0,0 +1,200 @@
+--- gcc/libgomp/configure
++++ gcc/libgomp/configure
+@@ -3771,7 +3771,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/gcc/config/cris/linux.h
++++ gcc/gcc/config/cris/linux.h
+@@ -74,7 +74,11 @@
+ #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+
+ #undef CRIS_SUBTARGET_VERSION
+-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
++#if UCLIBC_DEFAULT
++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
++#else
++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
++#endif
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+
+--- gcc/libstdc++-v3/configure
++++ gcc/libstdc++-v3/configure
+@@ -4276,7 +4276,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/zlib/configure
++++ gcc/zlib/configure
+@@ -3422,7 +3422,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libobjc/configure
++++ gcc/libobjc/configure
+@@ -3309,7 +3309,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libgfortran/configure
++++ gcc/libgfortran/configure
+@@ -3695,7 +3695,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libmudflap/configure
++++ gcc/libmudflap/configure
+@@ -5378,7 +5378,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/boehm-gc/configure
++++ gcc/boehm-gc/configure
+@@ -4316,7 +4316,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libffi/configure
++++ gcc/libffi/configure
+@@ -3453,7 +3453,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libssp/configure
++++ gcc/libssp/configure
+@@ -4409,7 +4409,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/contrib/regression/objs-gcc.sh
++++ gcc/contrib/regression/objs-gcc.sh
+@@ -105,6 +105,10 @@
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
+--- gcc/libjava/classpath/ltconfig
++++ gcc/libjava/classpath/ltconfig
+@@ -603,7 +603,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1251,7 +1251,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+--- gcc/libjava/classpath/configure
++++ gcc/libjava/classpath/configure
+@@ -4665,7 +4665,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libjava/configure
++++ gcc/libjava/configure
+@@ -5212,7 +5212,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libtool.m4
++++ gcc/libtool.m4
+@@ -739,7 +739,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/ltconfig
++++ gcc/ltconfig
+@@ -603,7 +603,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1251,7 +1251,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
diff --git a/packages/gcc/gcc-4.3.0/103-uclibc-conf-noupstream.patch b/packages/gcc/gcc-4.3.0/103-uclibc-conf-noupstream.patch
new file mode 100644
index 0000000000..09c9bbecfb
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/103-uclibc-conf-noupstream.patch
@@ -0,0 +1,11 @@
+--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100
++++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100
+@@ -1905,7 +1905,7 @@
+ ;;
+ sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
+ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
+- sh-*-linux* | sh[346lbe]*-*-linux* | \
++ sh*-*-linux* | sh[346lbe]*-*-linux* | \
+ sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
+ sh64-*-netbsd* | sh64l*-*-netbsd*)
+ tmake_file="${tmake_file} sh/t-sh sh/t-elf"
diff --git a/packages/gcc/gcc-4.3.0/110-arm-eabi.patch b/packages/gcc/gcc-4.3.0/110-arm-eabi.patch
new file mode 100644
index 0000000000..acebe5308f
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/110-arm-eabi.patch
@@ -0,0 +1,27 @@
+--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
+@@ -674,7 +674,7 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
+ case ${target} in
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
+ # The BPABI long long divmod functions return a 128-bit value in
+
+diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
+--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
+@@ -53,7 +53,11 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+ #undef LINUX_TARGET_INTERPRETER
++#ifdef USE_UCLIBC
++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
++#else
+ #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
++#endif
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
diff --git a/packages/gcc/gcc-4.3.0/200-uclibc-locale.patch b/packages/gcc/gcc-4.3.0/200-uclibc-locale.patch
new file mode 100644
index 0000000000..ea21388b75
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/200-uclibc-locale.patch
@@ -0,0 +1,2790 @@
+--- gcc/libstdc++-v3/acinclude.m4
++++ gcc/libstdc++-v3/acinclude.m4
+@@ -1369,7 +1369,7 @@
+ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
+ [use MODEL for target locale package],
+- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
+
+ # Deal with gettext issues. Default to not using it (=no) until we detect
+ # support for it later. Let the user turn it off via --e/d, but let that
+@@ -1385,6 +1385,9 @@
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ *-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ AC_EGREP_CPP([_GLIBCXX_ok], [
+ #include <features.h>
+@@ -1528,6 +1531,40 @@
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ AC_MSG_RESULT(uclibc)
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++ AC_SUBST(glibcxx_MOFILES)
++ AC_SUBST(glibcxx_POFILES)
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -0,0 +1,63 @@
++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
++
++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++// Written by Jakub Jelinek <jakub@redhat.com>
++
++#include <bits/c++config.h>
++#include <clocale>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning clean this up
++#endif
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++
++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
++extern "C" __typeof(strcoll_l) __strcoll_l;
++extern "C" __typeof(strftime_l) __strftime_l;
++extern "C" __typeof(strtod_l) __strtod_l;
++extern "C" __typeof(strtof_l) __strtof_l;
++extern "C" __typeof(strtold_l) __strtold_l;
++extern "C" __typeof(strxfrm_l) __strxfrm_l;
++extern "C" __typeof(newlocale) __newlocale;
++extern "C" __typeof(freelocale) __freelocale;
++extern "C" __typeof(duplocale) __duplocale;
++extern "C" __typeof(uselocale) __uselocale;
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++extern "C" __typeof(iswctype_l) __iswctype_l;
++extern "C" __typeof(towlower_l) __towlower_l;
++extern "C" __typeof(towupper_l) __towupper_l;
++extern "C" __typeof(wcscoll_l) __wcscoll_l;
++extern "C" __typeof(wcsftime_l) __wcsftime_l;
++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
++extern "C" __typeof(wctype_l) __wctype_l;
++#endif
++
++#endif // GLIBC 2.3 and later
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc
+@@ -0,0 +1,160 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <cerrno> // For errno
++#include <locale>
++#include <stdexcept>
++#include <langinfo.h>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
++#define __strtof_l(S, E, L) strtof((S), (E))
++#define __strtod_l(S, E, L) strtod((S), (E))
++#define __strtold_l(S, E, L) strtold((S), (E))
++#warning should dummy __newlocale check for C|POSIX ?
++#define __newlocale(a, b, c) NULL
++#define __freelocale(a) ((void)0)
++#define __duplocale(a) __c_locale()
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ void
++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
++ __c_locale __old)
++ {
++ __cloc = __newlocale(1 << LC_ALL, __s, __old);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ if (!__cloc)
++ {
++ // This named locale is not supported by the underlying OS.
++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
++ "name not valid"));
++ }
++#endif
++ }
++
++ void
++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
++ {
++ if (_S_get_c_locale() != __cloc)
++ __freelocale(__cloc);
++ }
++
++ __c_locale
++ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
++ { return __duplocale(__cloc); }
++} // namespace std
++
++namespace __gnu_cxx
++{
++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
++ {
++ "LC_CTYPE",
++ "LC_NUMERIC",
++ "LC_TIME",
++ "LC_COLLATE",
++ "LC_MONETARY",
++ "LC_MESSAGES",
++#if _GLIBCXX_NUM_CATEGORIES != 0
++ "LC_PAPER",
++ "LC_NAME",
++ "LC_ADDRESS",
++ "LC_TELEPHONE",
++ "LC_MEASUREMENT",
++ "LC_IDENTIFICATION"
++#endif
++ };
++}
++
++namespace std
++{
++ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
++} // namespace std
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -0,0 +1,117 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifndef _C_LOCALE_H
++#define _C_LOCALE_H 1
++
++#pragma GCC system_header
++
++#include <cstring> // get std::strlen
++#include <cstdio> // get std::snprintf or std::sprintf
++#include <clocale>
++#include <langinfo.h> // For codecvt
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this
++#endif
++#ifdef __UCLIBC_HAS_LOCALE__
++#include <iconv.h> // For codecvt using iconv, iconv_t
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#include <libintl.h> // For messages
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning what is _GLIBCXX_C_LOCALE_GNU for
++#endif
++#define _GLIBCXX_C_LOCALE_GNU 1
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix categories
++#endif
++// #define _GLIBCXX_NUM_CATEGORIES 6
++#define _GLIBCXX_NUM_CATEGORIES 0
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++namespace __gnu_cxx
++{
++ extern "C" __typeof(uselocale) __uselocale;
++}
++#endif
++
++namespace std
++{
++#ifdef __UCLIBC_HAS_XLOCALE__
++ typedef __locale_t __c_locale;
++#else
++ typedef int* __c_locale;
++#endif
++
++ // Convert numeric value of type _Tv to string and return length of
++ // string. If snprintf is available use it, otherwise fall back to
++ // the unsafe sprintf which, in general, can be dangerous and should
++ // be avoided.
++ template<typename _Tv>
++ int
++ __convert_from_v(char* __out,
++ const int __size __attribute__ ((__unused__)),
++ const char* __fmt,
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ _Tv __v, const __c_locale& __cloc, int __prec)
++ {
++ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
++#else
++ _Tv __v, const __c_locale&, int __prec)
++ {
++# ifdef __UCLIBC_HAS_LOCALE__
++ char* __old = std::setlocale(LC_ALL, NULL);
++ char* __sav = new char[std::strlen(__old) + 1];
++ std::strcpy(__sav, __old);
++ std::setlocale(LC_ALL, "C");
++# endif
++#endif
++
++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ __gnu_cxx::__uselocale(__old);
++#elif defined __UCLIBC_HAS_LOCALE__
++ std::setlocale(LC_ALL, __sav);
++ delete [] __sav;
++#endif
++ return __ret;
++ }
++}
++
++#endif
+--- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+@@ -0,0 +1,306 @@
++// std::codecvt implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++namespace std
++{
++ // Specializations.
++#ifdef _GLIBCXX_USE_WCHAR_T
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_out(state_type& __state, const intern_type* __from,
++ const intern_type* __from_end, const intern_type*& __from_next,
++ extern_type* __to, extern_type* __to_end,
++ extern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
++ // in case we fall back to wcrtomb and then continue, in a loop.
++ // NB: wcsnrtombs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
++ __from_end - __from_next);
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // wcrtomb.
++ for (; __from < __from_next; ++__from)
++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ extern_type __buf[MB_LEN_MAX];
++ __tmp_state = __state;
++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
++ if (__conv > static_cast<size_t>(__to_end - __to_next))
++ __ret = partial;
++ else
++ {
++ memcpy(__to_next, __buf, __conv);
++ __state = __tmp_state;
++ __to_next += __conv;
++ ++__from_next;
++ }
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_in(state_type& __state, const extern_type* __from,
++ const extern_type* __from_end, const extern_type*& __from_next,
++ intern_type* __to, intern_type* __to_end,
++ intern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we store a L'\0' and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
++ __from_end
++ - __from_next));
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (;; ++__to_next, __from += __conv)
++ {
++ __conv = mbrtowc(__to_next, __from, __from_end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __from_next = __from;
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ // It is unclear what to return in this case (see DR 382).
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ if (__to_next < __to_end)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from_next;
++ *__to_next++ = L'\0';
++ }
++ else
++ __ret = partial;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_encoding() const throw()
++ {
++ // XXX This implementation assumes that the encoding is
++ // stateless and is either single-byte or variable-width.
++ int __ret = 0;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ if (MB_CUR_MAX == 1)
++ __ret = 1;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_max_length() const throw()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ // XXX Probably wrong for stateful encodings.
++ int __ret = MB_CUR_MAX;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_length(state_type& __state, const extern_type* __from,
++ const extern_type* __end, size_t __max) const
++ {
++ int __ret = 0;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we advance past it and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++
++ // A dummy internal buffer is needed in order for mbsnrtocws to consider
++ // its fourth parameter (it wouldn't with NULL as first parameter).
++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
++ * __max));
++ while (__from < __end && __max)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
++ __end
++ - __from));
++ if (!__from_chunk_end)
++ __from_chunk_end = __end;
++
++ const extern_type* __tmp_from = __from;
++ size_t __conv = mbsnrtowcs(__to, &__from,
++ __from_chunk_end - __from,
++ __max, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (__from = __tmp_from;; __from += __conv)
++ {
++ __conv = mbrtowc(NULL, __from, __end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __state = __tmp_state;
++ __ret += __from - __tmp_from;
++ break;
++ }
++ if (!__from)
++ __from = __from_chunk_end;
++
++ __ret += __from - __tmp_from;
++ __max -= __conv;
++
++ if (__from < __end && __max)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from;
++ ++__ret;
++ --__max;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc
+@@ -0,0 +1,80 @@
++// std::collate implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++#endif
++
++namespace std
++{
++ // These are basically extensions to char_traits, and perhaps should
++ // be put there instead of here.
++ template<>
++ int
++ collate<char>::_M_compare(const char* __one, const char* __two) const
++ {
++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<char>::_M_transform(char* __to, const char* __from,
++ size_t __n) const
++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ int
++ collate<wchar_t>::_M_compare(const wchar_t* __one,
++ const wchar_t* __two) const
++ {
++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
++ size_t __n) const
++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+@@ -0,0 +1,300 @@
++// std::ctype implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __wctype_l(S, L) wctype((S))
++#define __towupper_l(C, L) towupper((C))
++#define __towlower_l(C, L) towlower((C))
++#define __iswctype_l(C, M, L) iswctype((C), (M))
++#endif
++
++namespace std
++{
++ // NB: The other ctype<char> specializations are in src/locale.cc and
++ // various /config/os/* files.
++ template<>
++ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
++ : ctype<char>(0, false, __refs)
++ {
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
++ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
++#endif
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ ctype<wchar_t>::__wmask_type
++ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
++ {
++ __wmask_type __ret;
++ switch (__m)
++ {
++ case space:
++ __ret = __wctype_l("space", _M_c_locale_ctype);
++ break;
++ case print:
++ __ret = __wctype_l("print", _M_c_locale_ctype);
++ break;
++ case cntrl:
++ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
++ break;
++ case upper:
++ __ret = __wctype_l("upper", _M_c_locale_ctype);
++ break;
++ case lower:
++ __ret = __wctype_l("lower", _M_c_locale_ctype);
++ break;
++ case alpha:
++ __ret = __wctype_l("alpha", _M_c_locale_ctype);
++ break;
++ case digit:
++ __ret = __wctype_l("digit", _M_c_locale_ctype);
++ break;
++ case punct:
++ __ret = __wctype_l("punct", _M_c_locale_ctype);
++ break;
++ case xdigit:
++ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
++ break;
++ case alnum:
++ __ret = __wctype_l("alnum", _M_c_locale_ctype);
++ break;
++ case graph:
++ __ret = __wctype_l("graph", _M_c_locale_ctype);
++ break;
++ default:
++ __ret = __wmask_type();
++ }
++ return __ret;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_toupper(wchar_t __c) const
++ { return __towupper_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_tolower(wchar_t __c) const
++ { return __towlower_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ bool
++ ctype<wchar_t>::
++ do_is(mask __m, wchar_t __c) const
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ bool __ret = false;
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur]
++ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ return __ret;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
++ {
++ for (; __lo < __hi; ++__vec, ++__lo)
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ mask __m = 0;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
++ __m |= _M_bit[__bitcur];
++ *__vec = __m;
++ }
++ return __hi;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi && !this->do_is(__m, *__lo))
++ ++__lo;
++ return __lo;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
++ {
++ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++ ++__lo;
++ return __lo;
++ }
++
++ wchar_t
++ ctype<wchar_t>::
++ do_widen(char __c) const
++ { return _M_widen[static_cast<unsigned char>(__c)]; }
++
++ const char*
++ ctype<wchar_t>::
++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
++ {
++ while (__lo < __hi)
++ {
++ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++ ++__lo;
++ ++__dest;
++ }
++ return __hi;
++ }
++
++ char
++ ctype<wchar_t>::
++ do_narrow(wchar_t __wc, char __dfault) const
++ {
++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
++ return _M_narrow[__wc];
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ const int __c = wctob(__wc);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
++ char* __dest) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ if (_M_narrow_ok)
++ while (__lo < __hi)
++ {
++ if (*__lo >= 0 && *__lo < 128)
++ *__dest = _M_narrow[*__lo];
++ else
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++ ++__lo;
++ ++__dest;
++ }
++ else
++ while (__lo < __hi)
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ ++__lo;
++ ++__dest;
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __hi;
++ }
++
++ void
++ ctype<wchar_t>::_M_initialize_ctype()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ wint_t __i;
++ for (__i = 0; __i < 128; ++__i)
++ {
++ const int __c = wctob(__i);
++ if (__c == EOF)
++ break;
++ else
++ _M_narrow[__i] = static_cast<char>(__c);
++ }
++ if (__i == 128)
++ _M_narrow_ok = true;
++ else
++ _M_narrow_ok = false;
++ for (size_t __j = 0;
++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
++ _M_widen[__j] = btowc(__j);
++
++ for (size_t __k = 0; __k <= 11; ++__k)
++ {
++ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ }
++#endif // _GLIBCXX_USE_WCHAR_T
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc
+@@ -0,0 +1,100 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix gettext stuff
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__dcgettext(const char *domainname,
++ const char *msgid, int category);
++#undef gettext
++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#else
++#undef gettext
++#define gettext(msgid) (msgid)
++#endif
++
++namespace std
++{
++ // Specializations.
++ template<>
++ string
++ messages<char>::do_get(catalog, int, int, const string& __dfault) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
++ __uselocale(__old);
++ return string(__msg);
++#elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ const char* __msg = gettext(__dfault.c_str());
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return string(__msg);
++#else
++ const char* __msg = gettext(__dfault.c_str());
++ return string(__msg);
++#endif
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ wstring
++ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
++ {
++# ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ __uselocale(__old);
++ return _M_convert_from_char(__msg);
++# elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return _M_convert_from_char(__msg);
++# else
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ return _M_convert_from_char(__msg);
++# endif
++ }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -0,0 +1,118 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix prototypes for *textdomain funcs
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__textdomain(const char *domainname);
++extern "C" char *__bindtextdomain(const char *domainname,
++ const char *dirname);
++#else
++#undef __textdomain
++#undef __bindtextdomain
++#define __textdomain(D) ((void)0)
++#define __bindtextdomain(D,P) ((void)0)
++#endif
++
++ // Non-virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::messages(size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
++ _M_name_messages(_S_get_c_name())
++ { }
++
++ template<typename _CharT>
++ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
++ _M_name_messages(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_messages = __tmp;
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
++ const char* __dir) const
++ {
++ __bindtextdomain(__s.c_str(), __dir);
++ return this->do_open(__s, __loc);
++ }
++
++ // Virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::~messages()
++ {
++ if (_M_name_messages != _S_get_c_name())
++ delete [] _M_name_messages;
++ _S_destroy_c_locale(_M_c_locale_messages);
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::do_open(const basic_string<char>& __s,
++ const locale&) const
++ {
++ // No error checking is done, assume the catalog exists and can
++ // be used.
++ __textdomain(__s.c_str());
++ return 0;
++ }
++
++ template<typename _CharT>
++ void
++ messages<_CharT>::do_close(catalog) const
++ { }
++
++ // messages_byname
++ template<typename _CharT>
++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
++ : messages<_CharT>(__refs)
++ {
++ if (this->_M_name_messages != locale::facet::_S_get_c_name())
++ delete [] this->_M_name_messages;
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ this->_M_name_messages = __tmp;
++
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_messages);
++ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
++ }
++ }
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -0,0 +1,692 @@
++// std::moneypunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning optimize this for uclibc
++#warning tailor for stub locale support
++#endif
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ // Construct and return valid pattern consisting of some combination of:
++ // space none symbol sign value
++ money_base::pattern
++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
++ {
++ pattern __ret;
++
++ // This insanely complicated routine attempts to construct a valid
++ // pattern for use with monyepunct. A couple of invariants:
++
++ // if (__precedes) symbol -> value
++ // else value -> symbol
++
++ // if (__space) space
++ // else none
++
++ // none == never first
++ // space never first or last
++
++ // Any elegant implementations of this are welcome.
++ switch (__posn)
++ {
++ case 0:
++ case 1:
++ // 1 The sign precedes the value and symbol.
++ __ret.field[0] = sign;
++ if (__space)
++ {
++ // Pattern starts with sign.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[3] = symbol;
++ }
++ __ret.field[2] = space;
++ }
++ else
++ {
++ // Pattern starts with sign and ends with none.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[3] = none;
++ }
++ break;
++ case 2:
++ // 2 The sign follows the value and symbol.
++ if (__space)
++ {
++ // Pattern either ends with sign.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[1] = space;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ // Pattern ends with sign then none.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[1] = symbol;
++ }
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ break;
++ case 3:
++ // 3 The sign immediately precedes the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = sign;
++ __ret.field[1] = symbol;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = sign;
++ __ret.field[3] = symbol;
++ }
++ else
++ {
++ __ret.field[1] = sign;
++ __ret.field[2] = symbol;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ case 4:
++ // 4 The sign immediately follows the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = sign;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = symbol;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ default:
++ ;
++ }
++ return __ret;
++ }
++
++ template<>
++ void
++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == true
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ void
++ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == false
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ moneypunct<char, true>::~moneypunct()
++ { delete _M_data; }
++
++ template<>
++ moneypunct<char, false>::~moneypunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ void
++ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len;
++ __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ moneypunct<wchar_t, true>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++
++ template<>
++ moneypunct<wchar_t, false>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -0,0 +1,160 @@
++// std::numpunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
++ __cloc));
++
++ // Check for NULL, which implies no grouping.
++ if (_M_data->_M_thousands_sep == '\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = "true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = "false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<char>::~numpunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<wchar_t>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] =
++ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] =
++ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
++ }
++ else
++ {
++ // Named locale.
++ // NB: In the GNU model wchar_t is always 32 bit wide.
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++
++ if (_M_data->_M_thousands_sep == L'\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = L"true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = L"false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<wchar_t>::~numpunct()
++ { delete _M_data; }
++ #endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -0,0 +1,406 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __timepunct<char>::
++ _M_put(char* __s, size_t __maxlen, const char* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = strftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = '\0';
++ }
++
++ template<>
++ void
++ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = "%m/%d/%y";
++ _M_data->_M_date_era_format = "%m/%d/%y";
++ _M_data->_M_time_format = "%H:%M:%S";
++ _M_data->_M_time_era_format = "%H:%M:%S";
++ _M_data->_M_date_time_format = "";
++ _M_data->_M_date_time_era_format = "";
++ _M_data->_M_am = "AM";
++ _M_data->_M_pm = "PM";
++ _M_data->_M_am_pm_format = "";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = "Sunday";
++ _M_data->_M_day2 = "Monday";
++ _M_data->_M_day3 = "Tuesday";
++ _M_data->_M_day4 = "Wednesday";
++ _M_data->_M_day5 = "Thursday";
++ _M_data->_M_day6 = "Friday";
++ _M_data->_M_day7 = "Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = "Sun";
++ _M_data->_M_aday2 = "Mon";
++ _M_data->_M_aday3 = "Tue";
++ _M_data->_M_aday4 = "Wed";
++ _M_data->_M_aday5 = "Thu";
++ _M_data->_M_aday6 = "Fri";
++ _M_data->_M_aday7 = "Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = "January";
++ _M_data->_M_month02 = "February";
++ _M_data->_M_month03 = "March";
++ _M_data->_M_month04 = "April";
++ _M_data->_M_month05 = "May";
++ _M_data->_M_month06 = "June";
++ _M_data->_M_month07 = "July";
++ _M_data->_M_month08 = "August";
++ _M_data->_M_month09 = "September";
++ _M_data->_M_month10 = "October";
++ _M_data->_M_month11 = "November";
++ _M_data->_M_month12 = "December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = "Jan";
++ _M_data->_M_amonth02 = "Feb";
++ _M_data->_M_amonth03 = "Mar";
++ _M_data->_M_amonth04 = "Apr";
++ _M_data->_M_amonth05 = "May";
++ _M_data->_M_amonth06 = "Jun";
++ _M_data->_M_amonth07 = "Jul";
++ _M_data->_M_amonth08 = "Aug";
++ _M_data->_M_amonth09 = "Sep";
++ _M_data->_M_amonth10 = "Oct";
++ _M_data->_M_amonth11 = "Nov";
++ _M_data->_M_amonth12 = "Dec";
++ }
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
++ __cloc);
++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ __timepunct<wchar_t>::
++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = L'\0';
++ }
++
++ template<>
++ void
++ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<wchar_t>;
++
++#warning wide time stuff
++// if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = L"%m/%d/%y";
++ _M_data->_M_date_era_format = L"%m/%d/%y";
++ _M_data->_M_time_format = L"%H:%M:%S";
++ _M_data->_M_time_era_format = L"%H:%M:%S";
++ _M_data->_M_date_time_format = L"";
++ _M_data->_M_date_time_era_format = L"";
++ _M_data->_M_am = L"AM";
++ _M_data->_M_pm = L"PM";
++ _M_data->_M_am_pm_format = L"";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = L"Sunday";
++ _M_data->_M_day2 = L"Monday";
++ _M_data->_M_day3 = L"Tuesday";
++ _M_data->_M_day4 = L"Wednesday";
++ _M_data->_M_day5 = L"Thursday";
++ _M_data->_M_day6 = L"Friday";
++ _M_data->_M_day7 = L"Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = L"Sun";
++ _M_data->_M_aday2 = L"Mon";
++ _M_data->_M_aday3 = L"Tue";
++ _M_data->_M_aday4 = L"Wed";
++ _M_data->_M_aday5 = L"Thu";
++ _M_data->_M_aday6 = L"Fri";
++ _M_data->_M_aday7 = L"Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = L"January";
++ _M_data->_M_month02 = L"February";
++ _M_data->_M_month03 = L"March";
++ _M_data->_M_month04 = L"April";
++ _M_data->_M_month05 = L"May";
++ _M_data->_M_month06 = L"June";
++ _M_data->_M_month07 = L"July";
++ _M_data->_M_month08 = L"August";
++ _M_data->_M_month09 = L"September";
++ _M_data->_M_month10 = L"October";
++ _M_data->_M_month11 = L"November";
++ _M_data->_M_month12 = L"December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = L"Jan";
++ _M_data->_M_amonth02 = L"Feb";
++ _M_data->_M_amonth03 = L"Mar";
++ _M_data->_M_amonth04 = L"Apr";
++ _M_data->_M_amonth05 = L"May";
++ _M_data->_M_amonth06 = L"Jun";
++ _M_data->_M_amonth07 = L"Jul";
++ _M_data->_M_amonth08 = L"Aug";
++ _M_data->_M_amonth09 = L"Sep";
++ _M_data->_M_amonth10 = L"Oct";
++ _M_data->_M_amonth11 = L"Nov";
++ _M_data->_M_amonth12 = L"Dec";
++ }
++#if 0
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ union { char *__s; wchar_t *__w; } __u;
++
++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
++ _M_data->_M_date_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
++ _M_data->_M_date_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
++ _M_data->_M_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
++ _M_data->_M_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
++ _M_data->_M_am = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
++ _M_data->_M_pm = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
++ _M_data->_M_am_pm_format = __u.__w;
++
++ // Day names, starting with "C"'s Sunday.
++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
++ _M_data->_M_day1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
++ _M_data->_M_day2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
++ _M_data->_M_day3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
++ _M_data->_M_day4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
++ _M_data->_M_day5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
++ _M_data->_M_day6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
++ _M_data->_M_day7 = __u.__w;
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
++ _M_data->_M_aday1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
++ _M_data->_M_aday2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
++ _M_data->_M_aday3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
++ _M_data->_M_aday4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
++ _M_data->_M_aday5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
++ _M_data->_M_aday6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
++ _M_data->_M_aday7 = __u.__w;
++
++ // Month names, starting with "C"'s January.
++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
++ _M_data->_M_month01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
++ _M_data->_M_month02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
++ _M_data->_M_month03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
++ _M_data->_M_month04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
++ _M_data->_M_month05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
++ _M_data->_M_month06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
++ _M_data->_M_month07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
++ _M_data->_M_month08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
++ _M_data->_M_month09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
++ _M_data->_M_month10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
++ _M_data->_M_month11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
++ _M_data->_M_month12 = __u.__w;
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
++ _M_data->_M_amonth01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
++ _M_data->_M_amonth02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
++ _M_data->_M_amonth03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
++ _M_data->_M_amonth04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
++ _M_data->_M_amonth05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
++ _M_data->_M_amonth06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
++ _M_data->_M_amonth07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
++ _M_data->_M_amonth08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
++ _M_data->_M_amonth09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
++ _M_data->_M_amonth10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
++ _M_data->_M_amonth11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
++ _M_data->_M_amonth12 = __u.__w;
++ }
++#endif // 0
++ }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h
++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h
+@@ -0,0 +1,68 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library 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, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_timepunct = __tmp;
++ _M_initialize_timepunct(__cloc);
++ }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::~__timepunct()
++ {
++ if (_M_name_timepunct != _S_get_c_name())
++ delete [] _M_name_timepunct;
++ delete _M_data;
++ _S_destroy_c_locale(_M_c_locale_timepunct);
++ }
+--- gcc/libstdc++-v3/configure
++++ gcc/libstdc++-v3/configure
+@@ -5764,7 +5764,7 @@
+ enableval="$enable_clocale"
+
+ case "$enableval" in
+- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
++ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
+ echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
+ { (exit 1); exit 1; }; } ;;
+@@ -5789,6 +5789,9 @@
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ linux-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -6019,6 +6022,76 @@
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ echo "$as_me:$LINENO: result: uclibc" >&5
++echo "${ECHO_T}uclibc" >&6
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++set dummy msgfmt; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$check_msgfmt"; then
++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_check_msgfmt="yes"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
++fi
++fi
++check_msgfmt=$ac_cv_prog_check_msgfmt
++if test -n "$check_msgfmt"; then
++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
++echo "${ECHO_T}$check_msgfmt" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++
++
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+--- gcc/libstdc++-v3/include/c_compatibility/wchar.h
++++ gcc/libstdc++-v3/include/c_compatibility/wchar.h
+@@ -101,7 +101,9 @@
+ using std::wmemcpy;
+ using std::wmemmove;
+ using std::wmemset;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using std::wcsftime;
++#endif
+
+ #if _GLIBCXX_USE_C99
+ using std::wcstold;
+--- gcc/libstdc++-v3/include/c_std/std_cwchar.h
++++ gcc/libstdc++-v3/include/c_std/std_cwchar.h
+@@ -182,7 +182,9 @@
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using ::wcsftime;
++#endif
+ using ::wcslen;
+ using ::wcsncat;
+ using ::wcsncmp;
diff --git a/packages/gcc/gcc-4.3.0/203-uclibc-locale-no__x.patch b/packages/gcc/gcc-4.3.0/203-uclibc-locale-no__x.patch
new file mode 100644
index 0000000000..6ba47003b3
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/203-uclibc-locale-no__x.patch
@@ -0,0 +1,213 @@
+--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100
+@@ -60,4 +60,49 @@
+ extern "C" __typeof(wctype_l) __wctype_l;
+ #endif
+
++# define __nl_langinfo_l nl_langinfo_l
++# define __strcoll_l strcoll_l
++# define __strftime_l strftime_l
++# define __strtod_l strtod_l
++# define __strtof_l strtof_l
++# define __strtold_l strtold_l
++# define __strxfrm_l strxfrm_l
++# define __newlocale newlocale
++# define __freelocale freelocale
++# define __duplocale duplocale
++# define __uselocale uselocale
++
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l iswctype_l
++# define __towlower_l towlower_l
++# define __towupper_l towupper_l
++# define __wcscoll_l wcscoll_l
++# define __wcsftime_l wcsftime_l
++# define __wcsxfrm_l wcsxfrm_l
++# define __wctype_l wctype_l
++# endif
++
++#else
++# define __nl_langinfo_l(N, L) nl_langinfo((N))
++# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++# define __strtod_l(S, E, L) strtod((S), (E))
++# define __strtof_l(S, E, L) strtof((S), (E))
++# define __strtold_l(S, E, L) strtold((S), (E))
++# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++# warning should dummy __newlocale check for C|POSIX ?
++# define __newlocale(a, b, c) NULL
++# define __freelocale(a) ((void)0)
++# define __duplocale(a) __c_locale()
++//# define __uselocale ?
++//
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l(C, M, L) iswctype((C), (M))
++# define __towlower_l(C, L) towlower((C))
++# define __towupper_l(C, L) towupper((C))
++# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
++# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++# define __wctype_l(S, L) wctype((S))
++# endif
++
+ #endif // GLIBC 2.3 and later
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100
+@@ -39,20 +39,6 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
+-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
+-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
+-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
+-#define __strtof_l(S, E, L) strtof((S), (E))
+-#define __strtod_l(S, E, L) strtod((S), (E))
+-#define __strtold_l(S, E, L) strtold((S), (E))
+-#warning should dummy __newlocale check for C|POSIX ?
+-#define __newlocale(a, b, c) NULL
+-#define __freelocale(a) ((void)0)
+-#define __duplocale(a) __c_locale()
+-#endif
+-
+ namespace std
+ {
+ template<>
+--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100
+@@ -36,13 +36,6 @@
+ #include <locale>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
+-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
+-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
+-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
+-#endif
+-
+ namespace std
+ {
+ // These are basically extensions to char_traits, and perhaps should
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100
+@@ -43,10 +43,6 @@
+ #warning tailor for stub locale support
+ #endif
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+-
+ namespace std
+ {
+ // Construct and return valid pattern consisting of some combination of:
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100
+@@ -41,9 +41,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100
+@@ -40,9 +40,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100
+@@ -38,13 +38,6 @@
+ #undef _LIBC
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __wctype_l(S, L) wctype((S))
+-#define __towupper_l(C, L) towupper((C))
+-#define __towlower_l(C, L) towlower((C))
+-#define __iswctype_l(C, M, L) iswctype((C), (M))
+-#endif
+-
+ namespace std
+ {
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100
+@@ -39,13 +39,10 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix gettext stuff
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__dcgettext(const char *domainname,
+- const char *msgid, int category);
+ #undef gettext
+-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
+ #else
+-#undef gettext
+ #define gettext(msgid) (msgid)
+ #endif
+
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100
+@@ -36,15 +36,11 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__textdomain(const char *domainname);
+-extern "C" char *__bindtextdomain(const char *domainname,
+- const char *dirname);
+-#else
+-#undef __textdomain
+-#undef __bindtextdomain
+-#define __textdomain(D) ((void)0)
+-#define __bindtextdomain(D,P) ((void)0)
++#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#undef textdomain
++#undef bindtextdomain
++#define textdomain(D) ((void)0)
++#define bindtextdomain(D,P) ((void)0)
+ #endif
+
+ // Non-virtual member functions.
+@@ -70,7 +66,7 @@
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char* __dir) const
+ {
+- __bindtextdomain(__s.c_str(), __dir);
++ bindtextdomain(__s.c_str(), __dir);
+ return this->do_open(__s, __loc);
+ }
+
+@@ -90,7 +86,7 @@
+ {
+ // No error checking is done, assume the catalog exists and can
+ // be used.
+- __textdomain(__s.c_str());
++ textdomain(__s.c_str());
+ return 0;
+ }
+
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100
+@@ -68,6 +68,7 @@
+ {
+ extern "C" __typeof(uselocale) __uselocale;
+ }
++#define __uselocale uselocale
+ #endif
+
+ namespace std
diff --git a/packages/gcc/gcc-4.3.0/204-uclibc-locale-wchar_fix.patch b/packages/gcc/gcc-4.3.0/204-uclibc-locale-wchar_fix.patch
new file mode 100644
index 0000000000..160ab35bb3
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/204-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,48 @@
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
+@@ -401,7 +401,7 @@
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+@@ -556,7 +556,7 @@
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
+@@ -127,12 +127,25 @@
+ {
+ // Named locale.
+ // NB: In the GNU model wchar_t is always 32 bit wide.
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be numeric
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# elif defined __UCLIBC_HAS_LOCALE__
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
+ union { char *__s; wchar_t __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
+ _M_data->_M_decimal_point = __u.__w;
+
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
+ _M_data->_M_thousands_sep = __u.__w;
++#endif
+
+ if (_M_data->_M_thousands_sep == L'\0')
+ _M_data->_M_grouping = "";
diff --git a/packages/gcc/gcc-4.3.0/205-uclibc-locale-update.patch b/packages/gcc/gcc-4.3.0/205-uclibc-locale-update.patch
new file mode 100644
index 0000000000..86b2844554
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/205-uclibc-locale-update.patch
@@ -0,0 +1,347 @@
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100
+@@ -46,16 +47,13 @@
+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- float __f = __strtof_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __f;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -63,16 +61,13 @@
+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- double __d = __strtod_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __d;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -80,16 +75,13 @@
+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- long double __ld = __strtold_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __ld;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ void
+@@ -110,7 +102,7 @@
+ void
+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+ {
+- if (_S_get_c_locale() != __cloc)
++ if (__cloc && _S_get_c_locale() != __cloc)
+ __freelocale(__cloc);
+ }
+
+--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ namespace std
+@@ -138,20 +143,34 @@
+ ctype<wchar_t>::
+ do_is(mask __m, wchar_t __c) const
+ {
+- // Highest bitmask in ctype_base == 10, but extra in "C"
+- // library for blank.
++ // The case of __m == ctype_base::space is particularly important,
++ // due to its use in many istream functions. Therefore we deal with
++ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
++ // is the mask corresponding to ctype_base::space. NB: an encoding
++ // change would not affect correctness!
+ bool __ret = false;
+- const size_t __bitmasksize = 11;
+- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
+- if (__m & _M_bit[__bitcur]
+- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
+- {
+- __ret = true;
+- break;
+- }
++ if (__m == _M_bit[5])
++ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
++ else
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur])
++ {
++ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ else if (__m == _M_bit[__bitcur])
++ break;
++ }
++ }
+ return __ret;
+ }
+-
++
+ const wchar_t*
+ ctype<wchar_t>::
+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100
+@@ -47,18 +47,21 @@
+ template<typename _CharT>
+ messages<_CharT>::messages(size_t __refs)
+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
+- _M_name_messages(_S_get_c_name())
++ _M_name_messages(_S_get_c_name())
+ { }
+
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
+ size_t __refs)
+- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
+- _M_name_messages(__s)
++ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_messages = __tmp;
++
++ // Last to avoid leaking memory if new throws.
++ _M_c_locale_messages = _S_clone_c_locale(__cloc);
+ }
+
+ template<typename _CharT>
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -206,7 +211,7 @@
+ }
+ break;
+ default:
+- ;
++ __ret = pattern();
+ }
+ return __ret;
+ }
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100
+@@ -37,25 +37,33 @@
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(_S_get_c_name())
++ _M_name_timepunct(_S_get_c_name())
+ { _M_initialize_timepunct(); }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(_S_get_c_name())
++ _M_name_timepunct(_S_get_c_name())
+ { _M_initialize_timepunct(); }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(__s)
++ _M_name_timepunct(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+- _M_initialize_timepunct(__cloc);
++
++ try
++ { _M_initialize_timepunct(__cloc); }
++ catch(...)
++ {
++ delete [] _M_name_timepunct;
++ __throw_exception_again;
++ }
+ }
+
+ template<typename _CharT>
+--- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200
+@@ -39,21 +39,23 @@
+ #pragma GCC system_header
+
+ #include <cstring> // get std::strlen
+-#include <cstdio> // get std::snprintf or std::sprintf
++#include <cstdio> // get std::vsnprintf or std::vsprintf
+ #include <clocale>
+ #include <langinfo.h> // For codecvt
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix this
+ #endif
+-#ifdef __UCLIBC_HAS_LOCALE__
++#ifdef _GLIBCXX_USE_ICONV
+ #include <iconv.h> // For codecvt using iconv, iconv_t
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-#include <libintl.h> // For messages
++#ifdef HAVE_LIBINTL_H
++#include <libintl.h> // For messages
+ #endif
++#include <cstdarg>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning what is _GLIBCXX_C_LOCALE_GNU for
++// psm: used in os/gnu-linux/ctype_noninline.h
+ #endif
+ #define _GLIBCXX_C_LOCALE_GNU 1
+
+@@ -62,7 +64,7 @@
+ #endif
+ // #define _GLIBCXX_NUM_CATEGORIES 6
+ #define _GLIBCXX_NUM_CATEGORIES 0
+-
++
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ namespace __gnu_cxx
+ {
+@@ -79,22 +81,24 @@
+ typedef int* __c_locale;
+ #endif
+
+- // Convert numeric value of type _Tv to string and return length of
+- // string. If snprintf is available use it, otherwise fall back to
+- // the unsafe sprintf which, in general, can be dangerous and should
++ // Convert numeric value of type double to string and return length of
++ // string. If vsnprintf is available use it, otherwise fall back to
++ // the unsafe vsprintf which, in general, can be dangerous and should
+ // be avoided.
+- template<typename _Tv>
+- int
+- __convert_from_v(char* __out,
+- const int __size __attribute__ ((__unused__)),
+- const char* __fmt,
+-#ifdef __UCLIBC_HAS_XCLOCALE__
+- _Tv __v, const __c_locale& __cloc, int __prec)
++ inline int
++ __convert_from_v(const __c_locale&
++#ifndef __UCLIBC_HAS_XCLOCALE__
++ __cloc __attribute__ ((__unused__))
++#endif
++ ,
++ char* __out,
++ const int __size,
++ const char* __fmt, ...)
+ {
++ va_list __args;
++#ifdef __UCLIBC_HAS_XCLOCALE__
+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+ #else
+- _Tv __v, const __c_locale&, int __prec)
+- {
+ # ifdef __UCLIBC_HAS_LOCALE__
+ char* __old = std::setlocale(LC_ALL, NULL);
+ char* __sav = new char[std::strlen(__old) + 1];
+@@ -103,7 +107,9 @@
+ # endif
+ #endif
+
+- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++ va_start(__args, __fmt);
++ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
++ va_end(__args);
+
+ #ifdef __UCLIBC_HAS_XCLOCALE__
+ __gnu_cxx::__uselocale(__old);
diff --git a/packages/gcc/gcc-4.3.0/300-libstdc++-pic.patch b/packages/gcc/gcc-4.3.0/300-libstdc++-pic.patch
new file mode 100644
index 0000000000..89d03a85e5
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/300-libstdc++-pic.patch
@@ -0,0 +1,46 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500
+@@ -627,7 +627,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -660,6 +660,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -745,6 +746,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/packages/gcc/gcc-4.3.0/301-missing-execinfo_h.patch b/packages/gcc/gcc-4.3.0/301-missing-execinfo_h.patch
new file mode 100644
index 0000000000..0e2092f3fb
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/packages/gcc/gcc-4.3.0/302-c99-snprintf.patch b/packages/gcc/gcc-4.3.0/302-c99-snprintf.patch
new file mode 100644
index 0000000000..dfb22d681b
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/packages/gcc/gcc-4.3.0/303-c99-complex-ugly-hack.patch b/packages/gcc/gcc-4.3.0/303-c99-complex-ugly-hack.patch
new file mode 100644
index 0000000000..2ccc80d9bb
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/packages/gcc/gcc-4.3.0/304-index_macro.patch b/packages/gcc/gcc-4.3.0/304-index_macro.patch
new file mode 100644
index 0000000000..d8e476555d
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
diff --git a/packages/gcc/gcc-4.3.0/305-libmudflap-susv3-legacy.patch b/packages/gcc/gcc-4.3.0/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 0000000000..374b1f8659
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
+Index: gcc-4.2/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
+@@ -427,7 +427,7 @@
+ {
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+- bzero (s, n);
++ memset (s, 0, n);
+ }
+
+
+@@ -437,7 +437,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
+ MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
+- bcopy (src, dest, n);
++ memmove (dest, src, n);
+ }
+
+
+@@ -447,7 +447,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
+ MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
+- return bcmp (s1, s2, n);
++ return n == 0 ? 0 : memcmp (s1, s2, n);
+ }
+
+
+@@ -456,7 +456,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
+- return index (s, c);
++ return strchr (s, c);
+ }
+
+
+@@ -465,7 +465,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
+- return rindex (s, c);
++ return strrchr (s, c);
+ }
+
+ /* XXX: stpcpy, memccpy */
diff --git a/packages/gcc/gcc-4.3.0/306-libstdc++-namespace.patch b/packages/gcc/gcc-4.3.0/306-libstdc++-namespace.patch
new file mode 100644
index 0000000000..69587ca63a
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/306-libstdc++-namespace.patch
@@ -0,0 +1,36 @@
+diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
+--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
+@@ -32,7 +32,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+@@ -115,3 +116,4 @@
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
++}
+diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
+--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
+@@ -33,7 +33,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+@@ -74,3 +75,4 @@
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
++}
diff --git a/packages/gcc/gcc-4.3.0/307-locale_facets.patch b/packages/gcc/gcc-4.3.0/307-locale_facets.patch
new file mode 100644
index 0000000000..412f8657dc
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/307-locale_facets.patch
@@ -0,0 +1,26 @@
+This patch fixes a bug into ostream::operator<<(double) due to the wrong size
+passed into the __convert_from_v method. The wrong size is then passed to
+std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
+
+Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
+
+--- gcc-4.2.1/libstdc++-v3/include/bits/locale_facets.tcc 2006-10-17 18:43:47.000000000 +0200
++++ gcc-4.2.1-st/libstdc++-v3/include/bits/locale_facets.tcc 2007-08-22 18:54:23.000000000 +0200
+@@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
+ const int __cs_size = __fixed ? __max_exp + __prec + 4
+ : __max_digits * 2 + __prec;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
++ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
+ __prec, __v);
+ #endif
+
+@@ -1777,7 +1777,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
+ // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
+ const int __cs_size = numeric_limits<long double>::max_exponent10 + 3;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+- int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf",
++ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf",
+ 0, __units);
+ #endif
+ string_type __digits(__len, char_type());
diff --git a/packages/gcc/gcc-4.3.0/402-libbackend_dep_gcov-iov.h.patch b/packages/gcc/gcc-4.3.0/402-libbackend_dep_gcov-iov.h.patch
new file mode 100644
index 0000000000..0bf115c45d
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/402-libbackend_dep_gcov-iov.h.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.2/gcc/Makefile.in
+===================================================================
+--- gcc-4.2/gcc/Makefile.in (revision 121758)
++++ gcc-4.2/gcc/Makefile.in (working copy)
+@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
+ # FIXME: writing proper dependencies for this is a *LOT* of work.
+ libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
+ insn-config.h insn-flags.h insn-codes.h insn-constants.h \
+- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
++ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ -DTARGET_NAME=\"$(target_noncanonical)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
diff --git a/packages/gcc/gcc-4.3.0/602-sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.3.0/602-sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..23fce7544d
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,20 @@
+--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
+@@ -21,5 +21,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
+@@ -35,7 +35,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/packages/gcc/gcc-4.3.0/740-sh-pr24836.patch b/packages/gcc/gcc-4.3.0/740-sh-pr24836.patch
new file mode 100644
index 0000000000..7992282cff
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/740-sh-pr24836.patch
@@ -0,0 +1,25 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
+
+--- gcc/gcc/configure.ac (revision 106699)
++++ gcc/gcc/configure.ac (working copy)
+@@ -2446,7 +2446,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+--- gcc/gcc/configure
++++ gcc/gcc/configure
+@@ -14846,7 +14846,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
diff --git a/packages/gcc/gcc-4.3.0/800-arm-bigendian.patch b/packages/gcc/gcc-4.3.0/800-arm-bigendian.patch
new file mode 100644
index 0000000000..07c6093379
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.2.0/gcc/config/arm/linux-elf.h
++++ gcc-4.2.0/gcc/config/arm/linux-elf.h
+@@ -28,19 +28,33 @@
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+@@ -61,7 +75,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #undef LINK_SPEC
+--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
++++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
+@@ -696,6 +696,11 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
++ case ${target} in
+ arm*-*-linux-*eabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
diff --git a/packages/gcc/gcc-4.3.0/801-arm-bigendian-eabi.patch b/packages/gcc/gcc-4.3.0/801-arm-bigendian-eabi.patch
new file mode 100644
index 0000000000..54490fc24f
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/801-arm-bigendian-eabi.patch
@@ -0,0 +1,14 @@
+Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100
++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
diff --git a/packages/gcc/gcc-4.3.0/904-flatten-switch-stmt-00.patch b/packages/gcc/gcc-4.3.0/904-flatten-switch-stmt-00.patch
new file mode 100644
index 0000000000..8fac37c4df
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/904-flatten-switch-stmt-00.patch
@@ -0,0 +1,153 @@
+Hi,
+
+The attached patch makes sure that we create smaller object code for
+simple switch statements. We just make sure to flatten the switch
+statement into an if-else chain, basically.
+
+This fixes a size-regression as compared to gcc-3.4, as can be seen
+below.
+
+2007-04-15 Bernhard Fischer <..>
+
+ * stmt.c (expand_case): Do not create a complex binary tree when
+ optimizing for size but rather use the simple ordered list.
+ (emit_case_nodes): do not emit jumps to the default_label when
+ optimizing for size.
+
+Not regtested so far.
+Comments?
+
+Attached is the test switch.c mentioned below.
+
+$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
+gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
+$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
+gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
+
+$ size switch-*.o
+ text data bss dec hex filename
+ 169 0 0 169 a9 switch-2.95.o
+ 115 0 0 115 73 switch-3.3.o
+ 103 0 0 103 67 switch-3.4.o
+ 124 0 0 124 7c switch-4.0.o
+ 124 0 0 124 7c switch-4.1.o
+ 124 0 0 124 7c switch-4.2.orig-HEAD.o
+ 95 0 0 95 5f switch-4.3-HEAD.o
+ 124 0 0 124 7c switch-4.3.orig-HEAD.o
+ 166 0 0 166 a6 switch-CHAIN-2.95.o
+ 111 0 0 111 6f switch-CHAIN-3.3.o
+ 95 0 0 95 5f switch-CHAIN-3.4.o
+ 95 0 0 95 5f switch-CHAIN-4.0.o
+ 95 0 0 95 5f switch-CHAIN-4.1.o
+ 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
+ 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
+ 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
+
+
+Content-Type: text/x-diff; charset=us-ascii
+Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
+
+Index: gcc-4.2.0/gcc/stmt.c
+===================================================================
+--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843)
++++ gcc-4.2.0/gcc/stmt.c (working copy)
+@@ -2517,7 +2517,11 @@ expand_case (tree exp)
+ use_cost_table
+ = (TREE_CODE (orig_type) != ENUMERAL_TYPE
+ && estimate_case_costs (case_list));
+- balance_case_nodes (&case_list, NULL);
++ /* When optimizing for size, we want a straight list to avoid
++ jumps as much as possible. This basically creates an if-else
++ chain. */
++ if (!optimize_size)
++ balance_case_nodes (&case_list, NULL);
+ emit_case_nodes (index, case_list, default_label, index_type);
+ emit_jump (default_label);
+ }
+@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt
+ {
+ if (!node_has_low_bound (node, index_type))
+ {
++ if (!optimize_size) /* don't jl to the .default_label. */
+ emit_cmp_and_jump_insns (index,
+ convert_modes
+ (mode, imode,
+
+
+Content-Type: text/x-csrc; charset=us-ascii
+Content-Disposition: attachment; filename="switch.c"
+
+int
+commutative_tree_code (int code)
+{
+#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret;
+#ifndef CHAIN
+ switch (code)
+ {
+# if 1
+ CASE(1,3)
+ CASE(3,2)
+ CASE(5,8)
+ CASE(7,1)
+ CASE(33,4)
+ CASE(44,9)
+ CASE(55,10)
+ CASE(66,-1)
+ CASE(77,99)
+ CASE(666,0)
+# else
+ case 1:
+ return 3;
+ case 3:
+ return 2;
+ case 5:
+ return 8;
+ case 7:
+ return 1;
+ case 33:
+ return 4;
+ case 44:
+ return 9;
+ case 55:
+ return 10;
+ case 66:
+ return -1;
+ case 77:
+ return 99;
+ case 666:
+ return 0;
+# endif
+ default:
+ break;
+ }
+ return 4711;
+
+#else
+ if (code == 1)
+ return 3;
+ else if (code == 3)
+ return 2;
+ else if (code == 5)
+ return 8;
+ else if (code == 7)
+ return 1;
+ else if (code == 33)
+ return 4;
+ else if (code == 44)
+ return 9;
+ else if (code == 55)
+ return 10;
+ else if (code == 66)
+ return -1;
+ else if (code == 77)
+ return 99;
+ else if (code == 666)
+ return 0;
+ else
+ return 4711;
+#endif
+}
+
+
+--AhhlLboLdkugWU4S--
+
diff --git a/packages/gcc/gcc-4.3.0/arm-nolibfloat.patch b/packages/gcc/gcc-4.3.0/arm-nolibfloat.patch
new file mode 100644
index 0000000000..c4897c0330
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+#
+# Fixes errors like
+# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
+# collect2: ld returned 1 exit status
+# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
+# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
+
+Index: gcc-4.0.2/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000
++++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000
+@@ -56,7 +56,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
diff --git a/packages/gcc/gcc-4.3.0/arm-softfloat.patch b/packages/gcc/gcc-4.3.0/arm-softfloat.patch
new file mode 100644
index 0000000000..5e1edd9208
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/arm-softfloat.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.0.2/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
++++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/packages/gcc/gcc-4.3.0/arm-thumb-cache.patch b/packages/gcc/gcc-4.3.0/arm-thumb-cache.patch
new file mode 100644
index 0000000000..fa63846c8c
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/arm-thumb-cache.patch
@@ -0,0 +1,29 @@
+--- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200
++++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200
+@@ -44,6 +44,7 @@
+
+ /* Clear the instruction cache from `beg' to `end'. This makes an
+ inline system call to SYS_cacheflush. */
++#if !defined(__thumb__)
+ #define CLEAR_INSN_CACHE(BEG, END) \
+ { \
+ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
+@@ -53,3 +54,18 @@
+ : "=r" (_beg) \
+ : "0" (_beg), "r" (_end), "r" (_flg)); \
+ }
++#else
++#define CLEAR_INSN_CACHE(BEG, END) \
++{ \
++ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
++ register unsigned long _end __asm ("a2") = (unsigned long) (END); \
++ register unsigned long _flg __asm ("a3") = 0; \
++ register unsigned long _swi __asm ("a4") = 0xf0002; \
++ __asm __volatile ("push {r7}\n" \
++ " mov r7,a4\n" \
++ " swi 0 @ sys_cacheflush\n" \
++ " pop {r7}\n" \
++ : "=r" (_beg) \
++ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \
++}
++#endif
diff --git a/packages/gcc/gcc-4.3.0/arm-thumb.patch b/packages/gcc/gcc-4.3.0/arm-thumb.patch
new file mode 100644
index 0000000000..016a7a550b
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/arm-thumb.patch
@@ -0,0 +1,64 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- gcc-4.1.1/gcc/config/arm/lib1funcs.asm~gcc
++++ gcc-4.1.1/gcc/config/arm/lib1funcs.asm
+@@ -995,10 +995,24 @@
+ .code 32
+ FUNC_START div0
+
++#if ! defined __thumb__
+ stmfd sp!, {r1, lr}
+ mov r0, #SIGFPE
+ bl SYM(raise) __PLT__
+ RETLDM r1
++#else
++ push {r1, lr}
++ mov r0, #SIGFPE
++ bl SYM(raise) __PLT__
++#if __ARM_ARCH__ > 4
++ pop {r1, pc}
++#else
++ @ on 4T that won't work
++ pop {r1}
++ pop {r3}
++ bx r3
++#endif
++#endif
+
+ FUNC_END div0
+
+@@ -1141,11 +1155,12 @@
+ code here switches to the correct mode before executing the function. */
+
+ .text
+- .align 0
++ .align 1
+ .force_thumb
+
+ .macro call_via register
+ THUMB_FUNC_START _call_via_\register
++ .hidden SYM (_call_via_\register)
+
+ bx \register
+ nop
+@@ -1242,6 +1257,7 @@
+ .code 16
+
+ THUMB_FUNC_START _interwork_call_via_\register
++ .hidden SYM (_interwork_call_via_\register)
+
+ bx pc
+ nop
+--- gcc-4.1.1/gcc/config/arm/t-linux~gcc
++++ gcc-4.1.1/gcc/config/arm/t-linux
+@@ -7,6 +7,7 @@
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _call_via_rX \
+ _fixsfsi _fixunssfsi _floatdidf _floatdisf _floatundisf _floatundidf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
diff --git a/packages/gcc/gcc-4.3.0/cache-amnesia.patch b/packages/gcc/gcc-4.3.0/cache-amnesia.patch
new file mode 100644
index 0000000000..ef7cd111c5
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/cache-amnesia.patch
@@ -0,0 +1,13 @@
+diff --git a/gcc/configure b/gcc/configure
+index 44620ab..6e1830c 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12272,7 +12272,7 @@ else
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+- ${realsrcdir}/configure \
++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ CFLAGS="${saved_CFLAGS}"
diff --git a/packages/gcc/gcc-4.3.0/fix-ICE-in-arm_unwind_emit_set.diff b/packages/gcc/gcc-4.3.0/fix-ICE-in-arm_unwind_emit_set.diff
new file mode 100644
index 0000000000..b8a147d3d9
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/fix-ICE-in-arm_unwind_emit_set.diff
@@ -0,0 +1,28 @@
+--- /tmp/arm.c 2008-03-17 14:24:39.590464969 +0100
++++ gcc-4.3.0/gcc/config/arm/arm.c 2008-03-17 14:12:21.614701982 +0100
+@@ -15959,6 +15959,9 @@
+ int regno;
+ int lo_mask = mask & 0xFF;
+ int pushed_words = 0;
++ rtx e0;
++ rtx e1;
++ unsigned reg;
+
+ gcc_assert (mask);
+
+@@ -16025,6 +16028,15 @@
+
+ return;
+ }
++ else if (GET_CODE (e1) == PLUS
++ && GET_CODE (XEXP (e1, 0)) == REG
++ && REGNO (XEXP (e1, 0)) == SP_REGNUM
++ && GET_CODE (XEXP (e1, 1)) == CONST_INT)
++ {
++ /* Set reg to offset from sp. */
++ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n",
++ REGNO (e0), (int)INTVAL(XEXP (e1, 1)));
++ }
+ else
+ {
+ if (mask & 0xFF)
diff --git a/packages/gcc/gcc-4.3.0/fortran-cross-compile-hack.patch b/packages/gcc/gcc-4.3.0/fortran-cross-compile-hack.patch
new file mode 100644
index 0000000000..b3d38ad983
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/fortran-cross-compile-hack.patch
@@ -0,0 +1,30 @@
+* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
+ used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
+ directory.
+
+diff --git a/libgfortran/configure b/libgfortran/configure
+index f7d86fb..d0966ec 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -4475,6 +4475,6 @@ exec 5>>./config.log
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ ac_ext=${FC_SRCEXT-f}
+ ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
+\ No newline at end of file
+diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
+index 4661306..9f83e55 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -140,7 +140,7 @@ AC_SUBST(enable_static)
+
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+
+ # extra LD Flags which are required for targets
diff --git a/packages/gcc/gcc-4.3.0/fortran-static-linking.patch b/packages/gcc/gcc-4.3.0/fortran-static-linking.patch
new file mode 100644
index 0000000000..3dd6321dc3
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/fortran-static-linking.patch
@@ -0,0 +1,48 @@
+f951 (fortran) links to MPFR and GMP of our staging area but when executing
+the command the libs can not be found. Use rpath like all the other apps in
+our staging bin/ directory.
+
+Patch the configure to avoid the regeneration...
+
+Index: gcc-4.2.2/configure
+===================================================================
+--- gcc-4.2.2.orig/configure 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure 2008-01-15 23:25:20.000000000 +0100
+@@ -2278,14 +2278,14 @@
+
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # Specify a location for gmp
+Index: gcc-4.2.2/configure.in
+===================================================================
+--- gcc-4.2.2.orig/configure.in 2008-01-15 23:23:41.000000000 +0100
++++ gcc-4.2.2/configure.in 2008-01-15 23:24:36.000000000 +0100
+@@ -1066,14 +1066,14 @@
+ AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
+
+ if test "x$with_mpfr" != x; then
+- gmplibs="-L$with_mpfr/lib $gmplibs"
++ gmplibs="-static -L$with_mpfr/lib $gmplibs"
+ gmpinc="-I$with_mpfr/include"
+ fi
+ if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+ fi
+ if test "x$with_mpfr_lib" != x; then
+- gmplibs="-L$with_mpfr_lib $gmplibs"
++ gmplibs="-static -L$with_mpfr_lib $gmplibs"
+ fi
+
+ # Specify a location for gmp
diff --git a/packages/gcc/gcc-4.3.0/gcc-4.0.2-e300c2c3.patch b/packages/gcc/gcc-4.3.0/gcc-4.0.2-e300c2c3.patch
new file mode 100644
index 0000000000..736ac4b6b6
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/gcc-4.0.2-e300c2c3.patch
@@ -0,0 +1,311 @@
+Adds support for Freescale Power architecture e300c2 and e300c3 cores.
+http://www.bitshrine.org/gpp/tc-fsl-x86lnx-e300c3-nptl-4.0.2-2.src.rpm
+
+Leon Woestenberg <leonw@mailcan.com>
+
+Index: gcc-4.1.2/gcc/config/rs6000/e300c2c3.md
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gcc-4.1.2/gcc/config/rs6000/e300c2c3.md 2007-10-18 15:32:51.000000000 +0200
+@@ -0,0 +1,189 @@
++;; Pipeline description for Motorola PowerPC e300c3 core.
++;; Copyright (C) 2003 Free Software Foundation, Inc.
++;;
++;; This file is part of GCC.
++
++;; GCC 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, or (at your
++;; option) any later version.
++
++;; GCC 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 GCC; see the file COPYING. If not, write to the
++;; Free Software Foundation, 59 Temple Place - Suite 330, Boston,
++;; MA 02111-1307, USA.
++
++(define_automaton "ppce300c3_most,ppce300c3_long,ppce300c3_retire")
++(define_cpu_unit "ppce300c3_decode_0,ppce300c3_decode_1" "ppce300c3_most")
++
++;; We don't simulate general issue queue (GIC). If we have SU insn
++;; and then SU1 insn, they can not be issued on the same cycle
++;; (although SU1 insn and then SU insn can be issued) because the SU
++;; insn will go to SU1 from GIC0 entry. Fortunately, the first cycle
++;; multipass insn scheduling will find the situation and issue the SU1
++;; insn and then the SU insn.
++(define_cpu_unit "ppce300c3_issue_0,ppce300c3_issue_1" "ppce300c3_most")
++
++;; We could describe completion buffers slots in combination with the
++;; retirement units and the order of completion but the result
++;; automaton would behave in the same way because we can not describe
++;; real latency time with taking in order completion into account.
++;; Actually we could define the real latency time by querying reserved
++;; automaton units but the current scheduler uses latency time before
++;; issuing insns and making any reservations.
++;;
++;; So our description is aimed to achieve a insn schedule in which the
++;; insns would not wait in the completion buffer.
++(define_cpu_unit "ppce300c3_retire_0,ppce300c3_retire_1" "ppce300c3_retire")
++
++;; Branch unit:
++(define_cpu_unit "ppce300c3_bu" "ppce300c3_most")
++
++;; IU:
++(define_cpu_unit "ppce300c3_iu0_stage0,ppce300c3_iu1_stage0" "ppce300c3_most")
++
++;; IU: This used to describe non-pipelined division.
++(define_cpu_unit "ppce300c3_mu_div" "ppce300c3_long")
++
++;; SRU:
++(define_cpu_unit "ppce300c3_sru_stage0" "ppce300c3_most")
++
++;; Here we simplified LSU unit description not describing the stages.
++(define_cpu_unit "ppce300c3_lsu" "ppce300c3_most")
++
++;; FPU:
++(define_cpu_unit "ppce300c3_fpu" "ppce300c3_most")
++
++;; The following units are used to make automata deterministic
++(define_cpu_unit "present_ppce300c3_decode_0" "ppce300c3_most")
++(define_cpu_unit "present_ppce300c3_issue_0" "ppce300c3_most")
++(define_cpu_unit "present_ppce300c3_retire_0" "ppce300c3_retire")
++(define_cpu_unit "present_ppce300c3_iu0_stage0" "ppce300c3_most")
++
++;; The following sets to make automata deterministic when option ndfa is used.
++(presence_set "present_ppce300c3_decode_0" "ppce300c3_decode_0")
++(presence_set "present_ppce300c3_issue_0" "ppce300c3_issue_0")
++(presence_set "present_ppce300c3_retire_0" "ppce300c3_retire_0")
++(presence_set "present_ppce300c3_iu0_stage0" "ppce300c3_iu0_stage0")
++
++;; Some useful abbreviations.
++(define_reservation "ppce300c3_decode"
++ "ppce300c3_decode_0|ppce300c3_decode_1+present_ppce300c3_decode_0")
++(define_reservation "ppce300c3_issue"
++ "ppce300c3_issue_0|ppce300c3_issue_1+present_ppce300c3_issue_0")
++(define_reservation "ppce300c3_retire"
++ "ppce300c3_retire_0|ppce300c3_retire_1+present_ppce300c3_retire_0")
++(define_reservation "ppce300c3_iu_stage0"
++ "ppce300c3_iu0_stage0|ppce300c3_iu1_stage0+present_ppce300c3_iu0_stage0")
++
++;; Compares can be executed either one of the IU or SRU
++(define_insn_reservation "ppce300c3_cmp" 1
++ (and (eq_attr "type" "cmp,compare,delayed_compare,fast_compare")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+(ppce300c3_iu_stage0|ppce300c3_sru_stage0) \
++ +ppce300c3_retire")
++
++;; Other one cycle IU insns
++(define_insn_reservation "ppce300c3_iu" 1
++ (and (eq_attr "type" "integer,insert_word")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_retire")
++
++;; Branch. Actually this latency time is not used by the scheduler.
++(define_insn_reservation "ppce300c3_branch" 1
++ (and (eq_attr "type" "jmpreg,branch")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_bu,ppce300c3_retire")
++
++;; Multiply is non-pipelined but can be executed in any IU
++(define_insn_reservation "ppce300c3_multiply" 2
++ (and (eq_attr "type" "imul,imul2,imul3,imul_compare")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0, \
++ ppce300c3_iu_stage0+ppce300c3_retire")
++
++;; Divide. We use the average latency time here. We omit reserving a
++;; retire unit because of the result automata will be huge.
++(define_insn_reservation "ppce300c3_divide" 20
++ (and (eq_attr "type" "idiv")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_iu_stage0+ppce300c3_mu_div,\
++ ppce300c3_mu_div*19")
++
++;; CR logical
++(define_insn_reservation "ppce300c3_cr_logical" 1
++ (and (eq_attr "type" "cr_logical,delayed_cr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mfcr
++(define_insn_reservation "ppce300c3_mfcr" 1
++ (and (eq_attr "type" "mfcr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mtcrf
++(define_insn_reservation "ppce300c3_mtcrf" 1
++ (and (eq_attr "type" "mtcr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Mtjmpr
++(define_insn_reservation "ppce300c3_mtjmpr" 1
++ (and (eq_attr "type" "mtjmpr,mfjmpr")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_sru_stage0+ppce300c3_retire")
++
++;; Float point instructions
++(define_insn_reservation "ppce300c3_fpcompare" 3
++ (and (eq_attr "type" "fpcompare")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fp" 3
++ (and (eq_attr "type" "fp")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,nothing,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_dmul" 4
++ (and (eq_attr "type" "dmul")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu,nothing,ppce300c3_retire")
++
++; Divides are not pipelined
++(define_insn_reservation "ppce300c3_sdiv" 18
++ (and (eq_attr "type" "sdiv")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*17")
++
++(define_insn_reservation "ppce300c3_ddiv" 33
++ (and (eq_attr "type" "ddiv")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_fpu,ppce300c3_fpu*32")
++
++;; Loads
++(define_insn_reservation "ppce300c3_load" 2
++ (and (eq_attr "type" "load,load_ext,load_ext_u,load_ext_ux,load_ux,load_u")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fpload" 2
++ (and (eq_attr "type" "fpload,fpload_ux,fpload_u")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++;; Stores.
++(define_insn_reservation "ppce300c3_store" 2
++ (and (eq_attr "type" "store,store_ux,store_u")
++ (ior (eq_attr "cpu" "ppce300c2") (eq_attr "cpu" "ppce300c3")))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
++
++(define_insn_reservation "ppce300c3_fpstore" 2
++ (and (eq_attr "type" "fpstore,fpstore_ux,fpstore_u")
++ (eq_attr "cpu" "ppce300c3"))
++ "ppce300c3_decode,ppce300c3_issue+ppce300c3_lsu,ppce300c3_retire")
+Index: gcc-4.1.2/gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc-4.1.2.orig/gcc/config/rs6000/rs6000.c 2006-12-16 20:24:56.000000000 +0100
++++ gcc-4.1.2/gcc/config/rs6000/rs6000.c 2007-10-18 15:34:26.000000000 +0200
+@@ -557,6 +557,21 @@
+ COSTS_N_INSNS (29), /* ddiv */
+ };
+
++/* Instruction costs on E300C2 and E300C3 cores. */
++static const
++struct processor_costs ppce300c2c3_cost = {
++ COSTS_N_INSNS (4), /* mulsi */
++ COSTS_N_INSNS (4), /* mulsi_const */
++ COSTS_N_INSNS (4), /* mulsi_const9 */
++ COSTS_N_INSNS (4), /* muldi */
++ COSTS_N_INSNS (19), /* divsi */
++ COSTS_N_INSNS (19), /* divdi */
++ COSTS_N_INSNS (3), /* fp */
++ COSTS_N_INSNS (4), /* dmul */
++ COSTS_N_INSNS (18), /* sdiv */
++ COSTS_N_INSNS (33), /* ddiv */
++};
++
+ /* Instruction costs on POWER4 and POWER5 processors. */
+ static const
+ struct processor_costs power4_cost = {
+@@ -1140,6 +1155,8 @@
+ /* 8548 has a dummy entry for now. */
+ {"8548", PROCESSOR_PPC8540,
+ POWERPC_BASE_MASK | MASK_PPC_GFXOPT | MASK_STRICT_ALIGN},
++ {"e300c2", PROCESSOR_PPCE300C2, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
++ {"e300c3", PROCESSOR_PPCE300C3, POWERPC_BASE_MASK},
+ {"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
+ {"970", PROCESSOR_POWER4,
+ POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},
+@@ -1529,6 +1546,11 @@
+ rs6000_cost = &ppc8540_cost;
+ break;
+
++ case PROCESSOR_PPCE300C2:
++ case PROCESSOR_PPCE300C3:
++ rs6000_cost = &ppce300c2c3_cost;
++ break;
++
+ case PROCESSOR_POWER4:
+ case PROCESSOR_POWER5:
+ rs6000_cost = &power4_cost;
+@@ -16647,6 +16669,8 @@
+ case CPU_PPC750:
+ case CPU_PPC7400:
+ case CPU_PPC8540:
++ case CPU_PPCE300C2:
++ case CPU_PPCE300C3:
+ return 2;
+ case CPU_RIOS2:
+ case CPU_PPC604:
+Index: gcc-4.1.2/gcc/config/rs6000/rs6000.h
+===================================================================
+--- gcc-4.1.2.orig/gcc/config/rs6000/rs6000.h 2006-11-18 01:25:49.000000000 +0100
++++ gcc-4.1.2/gcc/config/rs6000/rs6000.h 2007-10-18 15:32:51.000000000 +0200
+@@ -111,6 +111,8 @@
+ %{mcpu=970: -mpower4 -maltivec} \
+ %{mcpu=G5: -mpower4 -maltivec} \
+ %{mcpu=8540: -me500} \
++%{mcpu=e300c2: -mppc} \
++%{mcpu=e300c3: -mppc -mpmr} \
+ %{maltivec: -maltivec} \
+ -many"
+
+@@ -211,6 +213,8 @@
+ PROCESSOR_PPC7400,
+ PROCESSOR_PPC7450,
+ PROCESSOR_PPC8540,
++ PROCESSOR_PPCE300C2,
++ PROCESSOR_PPCE300C3,
+ PROCESSOR_POWER4,
+ PROCESSOR_POWER5
+ };
+Index: gcc-4.1.2/gcc/config/rs6000/rs6000.md
+===================================================================
+--- gcc-4.1.2.orig/gcc/config/rs6000/rs6000.md 2006-12-16 20:24:56.000000000 +0100
++++ gcc-4.1.2/gcc/config/rs6000/rs6000.md 2007-10-18 15:32:51.000000000 +0200
+@@ -103,7 +103,7 @@
+ ;; Processor type -- this attribute must exactly match the processor_type
+ ;; enumeration in rs6000.h.
+
+-(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,power4,power5"
++(define_attr "cpu" "rios1,rios2,rs64a,mpccore,ppc403,ppc405,ppc440,ppc601,ppc603,ppc604,ppc604e,ppc620,ppc630,ppc750,ppc7400,ppc7450,ppc8540,ppce300c2,ppce300c3,power4,power5"
+ (const (symbol_ref "rs6000_cpu_attr")))
+
+ (automata_option "ndfa")
+@@ -119,6 +119,7 @@
+ (include "7xx.md")
+ (include "7450.md")
+ (include "8540.md")
++(include "e300c2c3.md")
+ (include "power4.md")
+ (include "power5.md")
+
+Index: gcc-4.1.2/gcc/config.gcc
+===================================================================
+--- gcc-4.1.2.orig/gcc/config.gcc 2007-10-18 15:26:23.000000000 +0200
++++ gcc-4.1.2/gcc/config.gcc 2007-10-18 15:32:51.000000000 +0200
+@@ -2710,7 +2710,7 @@
+ | rios | rios1 | rios2 | rsc | rsc1 | rs64a \
+ | 401 | 403 | 405 | 405fp | 440 | 440fp | 505 \
+ | 601 | 602 | 603 | 603e | ec603e | 604 \
+- | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 \
++ | 604e | 620 | 630 | 740 | 750 | 7400 | 7450 | e300c[23] \
+ | 854[08] | 801 | 821 | 823 | 860 | 970 | G3 | G4 | G5)
+ # OK
+ ;;
diff --git a/packages/gcc/gcc-4.3.0/gcc41-configure.in.patch b/packages/gcc/gcc-4.3.0/gcc41-configure.in.patch
new file mode 100644
index 0000000000..3d33bcb978
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/gcc41-configure.in.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
++++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
+@@ -1907,7 +1907,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
++++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
+@@ -2669,7 +2669,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
diff --git a/packages/gcc/gcc-4.3.0/intermask-bigendian.patch b/packages/gcc/gcc-4.3.0/intermask-bigendian.patch
new file mode 100644
index 0000000000..fdff3d3d86
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/intermask-bigendian.patch
@@ -0,0 +1,24 @@
+--- gcc-4.2.0/gcc/config/arm/bpabi.h
++++ gcc-4.2.0/gcc/config/arm/bpabi.h
+@@ -33,9 +33,19 @@
+ #undef FPUTYPE_DEFAULT
+ #define FPUTYPE_DEFAULT FPUTYPE_VFP
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#endif
++
+ /* EABI targets should enable interworking by default. */
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT MASK_INTERWORK
++#define TARGET_DEFAULT (MASK_INTERWORK | TARGET_ENDIAN_DEFAULT)
+
+ /* The ARM BPABI functions return a boolean; they use no special
+ calling convention. */
+
diff --git a/packages/gcc/gcc-4.3.0/ldflags.patch b/packages/gcc/gcc-4.3.0/ldflags.patch
new file mode 100644
index 0000000000..9576f60778
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/ldflags.patch
@@ -0,0 +1,22 @@
+--- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100
++++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100
+@@ -334,7 +334,7 @@
+ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
+--- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100
++++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100
+@@ -337,7 +337,7 @@
+ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
diff --git a/packages/gcc/gcc-4.3.0/pr34130.patch b/packages/gcc/gcc-4.3.0/pr34130.patch
new file mode 100644
index 0000000000..415335f4b4
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/pr34130.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.1.2/gcc/fold-const.c
+===================================================================
+--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
++++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
+@@ -5339,7 +5339,10 @@
+ }
+ break;
+ }
+- /* FALLTHROUGH */
++ /* If the constant is negative, we cannot simplify this. */
++ if (tree_int_cst_sgn (c) == -1)
++ break;
++ /* FALLTHROUGH */
+ case NEGATE_EXPR:
+ if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
+ return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
diff --git a/packages/gcc/gcc-4.3.0/sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.3.0/sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..4377c2143b
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
+--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
+@@ -18,7 +18,7 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+
+
diff --git a/packages/gcc/gcc-4.3.0/sh3-installfix-fixheaders.patch b/packages/gcc/gcc-4.3.0/sh3-installfix-fixheaders.patch
new file mode 100644
index 0000000000..a06cd2e075
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/sh3-installfix-fixheaders.patch
@@ -0,0 +1,11 @@
+--- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000
++++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000
+@@ -3772,8 +3772,6 @@
+ $(INSTALL_SCRIPT) $(mkinstalldirs) \
+ $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
+ $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
+- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
+- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
+ else :; fi
+ echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
+ > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
diff --git a/packages/gcc/gcc-4.3.0/unbreak-armv4t.patch b/packages/gcc/gcc-4.3.0/unbreak-armv4t.patch
new file mode 100644
index 0000000000..b3399abfdb
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/unbreak-armv4t.patch
@@ -0,0 +1,12 @@
+diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h
+--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700
++++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700
+@@ -45,7 +45,7 @@
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+ #undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+ #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
diff --git a/packages/gcc/gcc-4.3.0/zecke-no-host-includes.patch b/packages/gcc/gcc-4.3.0/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
diff --git a/packages/gcc/gcc-4.3.0/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.3.0/zecke-xgcc-cpp.patch
new file mode 100644
index 0000000000..921cab6e18
--- /dev/null
+++ b/packages/gcc/gcc-4.3.0/zecke-xgcc-cpp.patch
@@ -0,0 +1,16 @@
+upstream: n/a
+comment: Use the preprocessor we have just compiled instead the one of
+the system. There might be incompabilities between us and them.
+
+Index: gcc-4.1.1/Makefile.in
+===================================================================
+--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200
++++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200
+@@ -194,6 +194,7 @@
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-common.inc b/packages/gcc/gcc-common.inc
new file mode 100644
index 0000000000..1097614969
--- /dev/null
+++ b/packages/gcc/gcc-common.inc
@@ -0,0 +1,35 @@
+DESCRIPTION = "The GNU cc and gcc C compilers."
+HOMEPAGE = "http://www.gnu.org/software/gcc/"
+SECTION = "devel"
+LICENSE = "GPL"
+
+inherit autotools gettext
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
+
+def get_gcc_fpu_setting(bb, d):
+ if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
+ return "--with-float=soft"
+ return ""
+
+# We really need HOST_SYS here for some packages and TARGET_SYS for others.
+# For now, libgcc is most important so we fix for that - RP.
+SHLIBSDIR = "${STAGING_DIR}/${TARGET_SYS}/shlibs"
+
+DEBIANNAME_libgcc = "libgcc1"
+
+MIRRORS_prepend () {
+${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
+${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
+${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
+${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
+}
+
+#
+# Set some default values
+#
+gcclibdir = "${libdir}/gcc"
+BINV = "${PV}"
+S = "${WORKDIR}/gcc-${PV}"
+B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
+
diff --git a/packages/gcc/gcc3-build.inc b/packages/gcc/gcc-configure-common.inc
index e56dcdcc4d..9971c08c20 100644
--- a/packages/gcc/gcc3-build.inc
+++ b/packages/gcc/gcc-configure-common.inc
@@ -1,22 +1,15 @@
-MIRRORS_prepend () {
-${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
-${GNU_MIRROR}/gcc/ http://mirrors.rcn.net/pub/sourceware/gcc/releases/
-${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
-${GNU_MIRROR}/gcc/ http://gcc.get-software.com/releases/
-}
-
-gcclibdir ?= "${libdir}/gcc"
-S = "${WORKDIR}/gcc-${PV}"
-B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
-BINV ?= "${PV}"
+#
+# Build the list of lanaguages to build.
+#
+# These can be overridden by the version specific .inc file.
-# gcj doesn't work on some architectures
+# Java (gcj doesn't work on all architectures)
JAVA ?= ",java"
JAVA_arm ?= ""
JAVA_armeb ?= ""
JAVA_mipsel ?= ""
JAVA_sh3 ?= ""
-# gcc4-build sets this to fortran
+# gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
FORTRAN ?= ",f77"
LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
@@ -32,12 +25,7 @@ EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d,
--enable-symvers=gnu \
--enable-libstdcxx-pch \
--program-prefix=${TARGET_PREFIX} \
- ${EXTRA_OECONF_PATHS} \
- ${EXTRA_OECONF_DEP}"
-
-EXTRA_OECONF_PATHS = " \
- --with-local-prefix=${prefix}/local \
- --with-gxx-include-dir=${includedir}/c++/${BINV}"
+ ${EXTRA_OECONF_PATHS}"
# Build uclibc compilers without cxa_atexit support
EXTRA_OECONF_append_linux = " --enable-__cxa_atexit"
@@ -56,8 +44,6 @@ ARCH_FLAGS_FOR_TARGET_slugos = "${TARGET_CC_ARCH}"
ARCH_FLAGS_FOR_TARGET_unslung = "${TARGET_CC_ARCH}"
EXTRA_OEMAKE += "ARCH_FLAGS_FOR_TARGET='${ARCH_FLAGS_FOR_TARGET}'"
-require gcc-fpu.inc
-
do_configure () {
# Setup these vars for cross building only
# ... because foo_FOR_TARGET apparently gets misinterpreted inside the
@@ -85,3 +71,4 @@ do_configure () {
(cd ${S} && gnu-configize) || die "failure running gnu-configize"
oe_runconf
}
+
diff --git a/packages/gcc/gcc3-build-cross.inc b/packages/gcc/gcc-configure-cross.inc
index 33429e18ef..9fc3b77fea 100644
--- a/packages/gcc/gcc3-build-cross.inc
+++ b/packages/gcc/gcc-configure-cross.inc
@@ -1,3 +1,5 @@
+require gcc-configure-common.inc
+
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
@@ -18,6 +20,9 @@ do_compile_prepend () {
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
}
+LIBGCCS_VAR = "-lgcc_s"
+LIBGCCS_VAR_avr32 = ""
+
do_stage_append () {
for d in info man share/doc share/locale ; do
rm -rf ${CROSS_DIR}/$d
@@ -44,6 +49,7 @@ do_stage_append () {
done
#fix up libsupc++ and libstdc++ la files
- sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib -lgcc_s -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libsupc++.la || true
- sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib -lgcc_s -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libstdc++.la || true
+ sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libsupc++.la || true
+ sed -i "s|dependency_libs\s*=\s*.*|dependency_libs='-L${CROSS_DIR}/${TARGET_SYS}/lib ${LIBGCCS_VAR} -lc -lm '|" ${CROSS_DIR}/${TARGET_SYS}/lib/libstdc++.la || true
}
+
diff --git a/packages/gcc/gcc4-build-sdk.inc b/packages/gcc/gcc-configure-sdk.inc
index b66c716505..f8c4de8c78 100644
--- a/packages/gcc/gcc4-build-sdk.inc
+++ b/packages/gcc/gcc-configure-sdk.inc
@@ -1,3 +1,6 @@
+require gcc-configure-common.inc
+
+# The two lines below conflict, this needs fixing - RP
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibcgnueabi", "no", "", d )}'
@@ -24,7 +27,7 @@ export WINDRES_FOR_TARGET = "${CROSS_DIR}/${TARGET_SYS}/bin/windres"
#
# We need to override this and make sure the compiler can find staging
#
-export ARCH_FLAGS_FOR_TARGET = "--sysroot=/media/build1/builds/oe/angstrom/tmp/staging/arm-angstrom-linux-gnueabi"
+export ARCH_FLAGS_FOR_TARGET = "--sysroot=${STAGING_DIR_TARGET}"
do_configure () {
export CC_FOR_BUILD="${BUILD_CC}"
diff --git a/packages/gcc/gcc-configure-target.inc b/packages/gcc/gcc-configure-target.inc
new file mode 100644
index 0000000000..04045aa541
--- /dev/null
+++ b/packages/gcc/gcc-configure-target.inc
@@ -0,0 +1,6 @@
+require gcc-configure-common.inc
+
+EXTRA_OECONF_PATHS = " \
+ --with-local-prefix=${prefix}/local \
+ --with-gxx-include-dir=${includedir}/c++/${BINV}"
+
diff --git a/packages/gcc/gcc-cross-initial.inc b/packages/gcc/gcc-cross-initial.inc
index 2165bf22ce..e0675263ea 100644
--- a/packages/gcc/gcc-cross-initial.inc
+++ b/packages/gcc/gcc-cross-initial.inc
@@ -1,9 +1,11 @@
DEPENDS = "virtual/${TARGET_PREFIX}binutils"
-DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel']]}"
+# @todo Please add comment on why this is (still?) needed?
+DEPENDS += "${@['virtual/${TARGET_PREFIX}libc-initial',''][bb.data.getVar('TARGET_ARCH', d, 1) in ['arm', 'armeb', 'mips', 'mipsel', 'powerpc']]}"
PROVIDES = "virtual/${TARGET_PREFIX}gcc-initial"
PACKAGES = ""
# This is intended to be a -very- basic config
+# sysroot is needed in case we use libc-initial
EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
--with-newlib \
--disable-shared \
@@ -13,6 +15,8 @@ EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
--enable-languages=c \
--enable-target-optspace \
--program-prefix=${TARGET_PREFIX} \
+ --with-sysroot=${STAGING_DIR_TARGET} \
+ --with-build-sysroot=${STAGING_DIR_TARGET} \
${@get_gcc_fpu_setting(bb, d)}"
do_stage_prepend () {
diff --git a/packages/gcc/gcc-cross-initial_4.3.0.bb b/packages/gcc/gcc-cross-initial_4.3.0.bb
new file mode 100644
index 0000000000..fe326d304b
--- /dev/null
+++ b/packages/gcc/gcc-cross-initial_4.3.0.bb
@@ -0,0 +1,5 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-initial.inc
+
+EXTRA_OECONF += "--disable-libmudflap --disable-libgomp \
+ --disable-libssp"
diff --git a/packages/gcc/gcc-cross-initial_csl-arm-cvs.bb b/packages/gcc/gcc-cross-initial_csl-arm-cvs.bb
deleted file mode 100644
index 1639511362..0000000000
--- a/packages/gcc/gcc-cross-initial_csl-arm-cvs.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require gcc-cross_${PV}.bb
-require gcc-cross-initial.inc
diff --git a/packages/gcc/gcc-cross-kernel-3.3.3_3.3.3.bb b/packages/gcc/gcc-cross-kernel-3.3.3_3.3.3.bb
index 7f274bee30..f5b0d8e915 100644
--- a/packages/gcc/gcc-cross-kernel-3.3.3_3.3.3.bb
+++ b/packages/gcc/gcc-cross-kernel-3.3.3_3.3.3.bb
@@ -1,17 +1,2 @@
-SECTION = "devel"
-# cut-down gcc for kernel builds
-# only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
-
require gcc-cross-initial_${PV}.bb
-
-PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
-
-do_install () {
- :
-}
-
-do_stage () {
- cd gcc
- oe_runmake install-common install-headers install-libgcc
- install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
-}
+require gcc-cross-kernel.inc
diff --git a/packages/gcc/gcc-cross-kernel-3.3.4_3.3.4.bb b/packages/gcc/gcc-cross-kernel-3.3.4_3.3.4.bb
index ba89452187..f5b0d8e915 100644
--- a/packages/gcc/gcc-cross-kernel-3.3.4_3.3.4.bb
+++ b/packages/gcc/gcc-cross-kernel-3.3.4_3.3.4.bb
@@ -1,17 +1,2 @@
-SECTION = "devel"
-# cut-down gcc for kernel builds
-# only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
-
require gcc-cross-initial_${PV}.bb
-
-PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
-
-do_install () {
- :
-}
-
-do_stage () {
- cd gcc
- oe_runmake install-libgcc install-common install-headers
- install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
-}
+require gcc-cross-kernel.inc
diff --git a/packages/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb b/packages/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb
index 03c6ce2b86..07da82eda8 100644
--- a/packages/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb
+++ b/packages/gcc/gcc-cross-kernel-3.4.4_3.4.4.bb
@@ -1,19 +1,4 @@
-SECTION = "devel"
-# cut-down gcc for kernel builds
-# only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
-
require gcc-cross-initial_${PV}.bb
-
-PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
+require gcc-cross-kernel.inc
SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1"
-
-do_install () {
- :
-}
-
-do_stage () {
- cd gcc
- oe_runmake install-common install-headers install-libgcc
- install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
-}
diff --git a/packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb b/packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
index d9c818979c..46a56fa339 100644
--- a/packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
+++ b/packages/gcc/gcc-cross-kernel-3.4.4_csl-arm-2005q3.bb
@@ -3,23 +3,8 @@
DEFAULT_PREFERENCE = "-1"
-SECTION = "devel"
-# cut-down gcc for kernel builds
-# only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
-
+require gcc-cross-kernel.inc
require gcc-cross-initial_csl-arm-2005q3.bb
-PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
-
SRC_URI += "file://gcc-3.4.4-makefile-fix.patch;patch=1"
-do_install () {
- :
-}
-
-do_stage () {
- cd gcc
- oe_runmake install-common install-headers install-libgcc
- install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
-}
-
diff --git a/packages/gcc/gcc-cross-kernel.inc b/packages/gcc/gcc-cross-kernel.inc
new file mode 100644
index 0000000000..fe6539b808
--- /dev/null
+++ b/packages/gcc/gcc-cross-kernel.inc
@@ -0,0 +1,14 @@
+# Cut-down gcc for kernel builds
+# Only installs ${TARGET_PREFIX}gcc-${PV}, not ${TARGET_PREFIX}gcc.
+
+PROVIDES = "virtual/${TARGET_PREFIX}gcc-${PV}"
+
+do_install () {
+ :
+}
+
+do_stage () {
+ cd gcc
+ oe_runmake install-common install-headers install-libgcc
+ install -m 0755 xgcc ${CROSS_DIR}/bin/${TARGET_PREFIX}gcc-${PV}
+}
diff --git a/packages/gcc/gcc-cross-sdk.inc b/packages/gcc/gcc-cross-sdk.inc
new file mode 100644
index 0000000000..fb24342939
--- /dev/null
+++ b/packages/gcc/gcc-cross-sdk.inc
@@ -0,0 +1,4 @@
+inherit sdk
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+
diff --git a/packages/gcc/gcc-cross-sdk_3.3.4.bb b/packages/gcc/gcc-cross-sdk_3.3.4.bb
index 4b2c583fcb..6ed5d4106b 100644
--- a/packages/gcc/gcc-cross-sdk_3.3.4.bb
+++ b/packages/gcc/gcc-cross-sdk_3.3.4.bb
@@ -1,16 +1,10 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-require gcc_${PV}.bb
PR = "r3"
inherit sdk
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PACKAGES = "${PN}"
-
-require gcc3-build-sdk.inc
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
require gcc-package-sdk.inc
+
+SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'
diff --git a/packages/gcc/gcc-cross-sdk_3.4.3.bb b/packages/gcc/gcc-cross-sdk_3.4.3.bb
index a8e9a67a96..481f314d85 100644
--- a/packages/gcc/gcc-cross-sdk_3.4.3.bb
+++ b/packages/gcc/gcc-cross-sdk_3.4.3.bb
@@ -1,16 +1,8 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-require gcc_${PV}.bb
PR = "r1"
-inherit sdk
-
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PACKAGES = "${PN}"
-
-require gcc3-build-sdk.inc
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
require gcc-package-sdk.inc
+
+SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'
diff --git a/packages/gcc/gcc-cross-sdk_3.4.4.bb b/packages/gcc/gcc-cross-sdk_3.4.4.bb
index 4b2c583fcb..1a7faa5b8c 100644
--- a/packages/gcc/gcc-cross-sdk_3.4.4.bb
+++ b/packages/gcc/gcc-cross-sdk_3.4.4.bb
@@ -1,16 +1,8 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-require gcc_${PV}.bb
PR = "r3"
-inherit sdk
-
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PACKAGES = "${PN}"
-
-require gcc3-build-sdk.inc
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
require gcc-package-sdk.inc
+
+SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'
diff --git a/packages/gcc/gcc-cross-sdk_4.1.0.bb b/packages/gcc/gcc-cross-sdk_4.1.0.bb
index cd9fe9ee92..5cba195f17 100644
--- a/packages/gcc/gcc-cross-sdk_4.1.0.bb
+++ b/packages/gcc/gcc-cross-sdk_4.1.0.bb
@@ -1,16 +1,8 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-require gcc_${PV}.bb
PR = "r2"
-inherit sdk
-
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PACKAGES = "${PN}"
-
-require gcc4-build-sdk.inc
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
require gcc-package-sdk.inc
+
+DEPENDS += "gmp-native mpfr-native" \ No newline at end of file
diff --git a/packages/gcc/gcc-cross-sdk_4.1.1.bb b/packages/gcc/gcc-cross-sdk_4.1.1.bb
index 1b5ad5e401..8329aac27f 100644
--- a/packages/gcc/gcc-cross-sdk_4.1.1.bb
+++ b/packages/gcc/gcc-cross-sdk_4.1.1.bb
@@ -1,16 +1,8 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
PR = "r3"
-inherit sdk
-
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PACKAGES = "${PN}"
-
-require gcc_${PV}.bb
-require gcc4-build-sdk.inc
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
require gcc-package-sdk.inc
+
+DEPENDS += "gmp-native mpfr-native" \ No newline at end of file
diff --git a/packages/gcc/gcc-cross-sdk_4.1.2.bb b/packages/gcc/gcc-cross-sdk_4.1.2.bb
index 85ff74ec33..89f698477f 100644
--- a/packages/gcc/gcc-cross-sdk_4.1.2.bb
+++ b/packages/gcc/gcc-cross-sdk_4.1.2.bb
@@ -1,13 +1,10 @@
PR = "r5"
-inherit sdk
-
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
-
-require gcc_${PV}.bb
-require gcc4-build-sdk.inc
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
require gcc-package-sdk.inc
+DEPENDS += "gmp-native mpfr-native"
+
EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
diff --git a/packages/gcc/gcc-cross-sdk_4.2.2.bb b/packages/gcc/gcc-cross-sdk_4.2.2.bb
index ba360698bd..7e3a459ea8 100644
--- a/packages/gcc/gcc-cross-sdk_4.2.2.bb
+++ b/packages/gcc/gcc-cross-sdk_4.2.2.bb
@@ -1,20 +1,13 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
PR = "r3"
inherit sdk
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
-PACKAGES = "${PN}"
-
-require gcc_${PV}.bb
-require gcc4-build-sdk.inc
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
require gcc-package-sdk.inc
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
+DEPENDS += "gmp-native mpfr-native"
EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
--disable-libgomp --disable-libmudflap \
diff --git a/packages/gcc/gcc-cross-sdk_4.3.0.bb b/packages/gcc/gcc-cross-sdk_4.3.0.bb
new file mode 100644
index 0000000000..7e3a459ea8
--- /dev/null
+++ b/packages/gcc/gcc-cross-sdk_4.3.0.bb
@@ -0,0 +1,14 @@
+PR = "r3"
+
+inherit sdk
+
+require gcc-${PV}.inc
+require gcc-cross-sdk.inc
+require gcc-configure-sdk.inc
+require gcc-package-sdk.inc
+
+DEPENDS += "gmp-native mpfr-native"
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
+ --disable-libgomp --disable-libmudflap \
+ --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
diff --git a/packages/gcc/gcc-cross.inc b/packages/gcc/gcc-cross.inc
new file mode 100644
index 0000000000..3fa6f61f0d
--- /dev/null
+++ b/packages/gcc/gcc-cross.inc
@@ -0,0 +1,12 @@
+# Path mangling needed by the cross packaging
+# Note that we use := here, and require that this is included at the correct
+# point (before inheriting cross) to ensure that libdir and includedir are
+# target paths, not CROSS_DIR paths.
+target_libdir := "${libdir}"
+target_includedir := "${includedir}"
+target_base_libdir := "${base_libdir}"
+
+inherit cross
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
diff --git a/packages/gcc/gcc-cross4.inc b/packages/gcc/gcc-cross4.inc
new file mode 100644
index 0000000000..3d3403737a
--- /dev/null
+++ b/packages/gcc/gcc-cross4.inc
@@ -0,0 +1,3 @@
+require gcc-cross.inc
+
+DEPENDS += "gmp-native mpfr-native"
diff --git a/packages/gcc/gcc-cross_3.3.3.bb b/packages/gcc/gcc-cross_3.3.3.bb
index 509fe59469..c3a4daa359 100644
--- a/packages/gcc/gcc-cross_3.3.3.bb
+++ b/packages/gcc/gcc-cross_3.3.3.bb
@@ -1,94 +1,7 @@
-SECTION = "devel"
-require gcc_${PV}.bb
-inherit cross
+PR = "r3"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
+require gcc-${PV}.inc
+require gcc-cross.inc
+require gcc-configure-cross.inc
+require gcc-package-cross.inc
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# Files for these are defined in the main gcc.oe
-PACKAGES = "libgcc libstdc++ libg2c"
-INHIBIT_PACKAGE_STRIP = "1"
-
-EXTRA_OECONF_PATHS = "--with-local-prefix=${CROSS_DIR}/${TARGET_SYS} \
- --with-gxx-include-dir=${CROSS_DIR}/${TARGET_SYS}/include/c++"
-
-export CPPFLAGS = ""
-export CXXFLAGS = ""
-export CFLAGS = ""
-export LDFLAGS = ""
-
-do_configure () {
- export CC="${BUILD_CC}"
- export AR="${TARGET_SYS}-ar"
- export RANLIB="${TARGET_SYS}-ranlib"
- export LD="${TARGET_SYS}-ld"
- export NM="${TARGET_SYS}-nm"
- rm -f ${CROSS_DIR}/lib/gcc-lib/${TARGET_SYS}/${PV}/libgcc_eh.a
- (cd ${S} && gnu-configize) || die "failure running gnu-configize"
- oe_runconf
-}
-
-do_compile_prepend () {
- export CC="${BUILD_CC}"
- export AR_FOR_TARGET="${TARGET_SYS}-ar"
- export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
- export LD_FOR_TARGET="${TARGET_SYS}-ld"
- export NM_FOR_TARGET="${TARGET_SYS}-nm"
- export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc"
-}
-
-do_stage_append () {
- for d in info man share/doc share/locale ; do
- rm -rf ${CROSS_DIR}/$d
- done
-
- # Fix a few include links so cross builds are happier
- if [ ! -e ${STAGING_INCDIR}/c++ ]; then
- mkdir -p ${STAGING_INCDIR}
- rm -f ${STAGING_INCDIR}/c++
- ln -sf ${CROSS_DIR}/${TARGET_SYS}/include/c++ \
- ${STAGING_INCDIR}/
- fi
-
- # We use libiberty from binutils
- rm -f ${CROSS_DIR}/lib/libiberty.a
-
- # We probably don't need these
- rmdir ${CROSS_DIR}/include || :
-
- # We don't really need to keep this around
- rm -rf ${CROSS_DIR}/share
-}
-
-python do_package() {
- if bb.data.getVar('DEBIAN_NAMES', d, 1):
- bb.data.setVar('PKG_libgcc', 'libgcc1', d)
- bb.build.exec_func('package_do_package', d)
-}
-
-do_install () {
- oe_runmake 'DESTDIR=${D}' install
-
- # Move libgcc_s into /lib
- mkdir -p ${D}${base_libdir}
- if [ "${BUILD_SYS}" == "${TARGET_SYS}" ]; then
- # native builds drop one pathname component
- mv -f ${D}${prefix}/lib/libgcc_s.so.* ${D}${base_libdir}
- else
- mv -f ${D}${prefix}/*/lib/libgcc_s.so.* ${D}${base_libdir}
- fi
-
- # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
- TGT_LIBDIR=`echo ${libdir} | sed -e 's,${CROSS_DIR},/usr,'`
- mkdir -p ${D}${TGT_LIBDIR}
- mv -f ${D}${prefix}/*/lib/libstdc++.so.* ${D}${TGT_LIBDIR}
- mv -f ${D}${prefix}/*/lib/libg2c.so.* ${D}${TGT_LIBDIR}
-
- # Manually run the target stripper since we won't get it run by
- # the packaging.
- ${TARGET_PREFIX}strip ${D}${TGT_LIBDIR}/libstdc++.so.*
- ${TARGET_PREFIX}strip ${D}${TGT_LIBDIR}/libg2c.so.*
- ${TARGET_PREFIX}strip ${D}${base_libdir}/libgcc_s.so.*
-}
diff --git a/packages/gcc/gcc-cross_3.3.4.bb b/packages/gcc/gcc-cross_3.3.4.bb
index 7cee36d66c..5b9c8f3cc5 100644
--- a/packages/gcc/gcc-cross_3.3.4.bb
+++ b/packages/gcc/gcc-cross_3.3.4.bb
@@ -1,13 +1,6 @@
-SECTION = "devel"
-require gcc_${PV}.bb
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
PR="r6"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-require gcc3-build-cross.inc
+require gcc-${PV}.inc
+require gcc-cross.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
diff --git a/packages/gcc/gcc-cross_3.4.3.bb b/packages/gcc/gcc-cross_3.4.3.bb
index 7ba02967f5..ccc2ceea69 100644
--- a/packages/gcc/gcc-cross_3.4.3.bb
+++ b/packages/gcc/gcc-cross_3.4.3.bb
@@ -1,16 +1,6 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
PR = "r13"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
diff --git a/packages/gcc/gcc-cross_3.4.4.bb b/packages/gcc/gcc-cross_3.4.4.bb
index 3248e8d688..4d93346d8d 100644
--- a/packages/gcc/gcc-cross_3.4.4.bb
+++ b/packages/gcc/gcc-cross_3.4.4.bb
@@ -1,16 +1,6 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
PR = "r8"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
diff --git a/packages/gcc/gcc-cross_4.0.0.bb b/packages/gcc/gcc-cross_4.0.0.bb
index 716f54b63e..40f514062f 100644
--- a/packages/gcc/gcc-cross_4.0.0.bb
+++ b/packages/gcc/gcc-cross_4.0.0.bb
@@ -1,16 +1,6 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
PR = "r4"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
diff --git a/packages/gcc/gcc-cross_4.0.2.bb b/packages/gcc/gcc-cross_4.0.2.bb
index 5b1ff0bd97..c296a03237 100644
--- a/packages/gcc/gcc-cross_4.0.2.bb
+++ b/packages/gcc/gcc-cross_4.0.2.bb
@@ -1,16 +1,6 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
PR = "r10"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
diff --git a/packages/gcc/gcc-cross_4.1.0.bb b/packages/gcc/gcc-cross_4.1.0.bb
index 6dddb45bc0..576d487b34 100644
--- a/packages/gcc/gcc-cross_4.1.0.bb
+++ b/packages/gcc/gcc-cross_4.1.0.bb
@@ -1,18 +1,8 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
PR = "r5"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
EXTRA_OECONF += "--with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
diff --git a/packages/gcc/gcc-cross_4.1.1.bb b/packages/gcc/gcc-cross_4.1.1.bb
index 4d79d2dca4..ab3fc405d0 100644
--- a/packages/gcc/gcc-cross_4.1.1.bb
+++ b/packages/gcc/gcc-cross_4.1.1.bb
@@ -1,18 +1,8 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
PR = "r18"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
diff --git a/packages/gcc/gcc-cross_4.1.2.bb b/packages/gcc/gcc-cross_4.1.2.bb
index c5b1d811bd..a344bfcba8 100644
--- a/packages/gcc/gcc-cross_4.1.2.bb
+++ b/packages/gcc/gcc-cross_4.1.2.bb
@@ -1,18 +1,8 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .bb changes something that affects its *build*
-# remember to increment this one too.
PR = "r14"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
@@ -20,3 +10,5 @@ SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
EXTRA_OECONF_append_avr32= " --disable-libmudflap "
EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${layout_includedir}"
diff --git a/packages/gcc/gcc-cross_4.2.1.bb b/packages/gcc/gcc-cross_4.2.1.bb
index 3ee8fbacc2..bb3b5ff9b1 100644
--- a/packages/gcc/gcc-cross_4.2.1.bb
+++ b/packages/gcc/gcc-cross_4.2.1.bb
@@ -1,18 +1,8 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
-PR = "r11"
+PR = "r13"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
@@ -21,3 +11,5 @@ SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
--disable-libgomp --disable-libmudflap \
--with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${layout_includedir}"
diff --git a/packages/gcc/gcc-cross_4.2.2.bb b/packages/gcc/gcc-cross_4.2.2.bb
index def16597e0..8a7a21f188 100644
--- a/packages/gcc/gcc-cross_4.2.2.bb
+++ b/packages/gcc/gcc-cross_4.2.2.bb
@@ -1,22 +1,15 @@
-require gcc_${PV}.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
PR = "r6"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
+
SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
# Do not build libssp libmudflap and libgomp
# We might need them for some beefy targets
EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
--disable-libgomp --disable-libmudflap \
--with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${layout_includedir}"
diff --git a/packages/gcc/gcc-cross_4.3.0.bb b/packages/gcc/gcc-cross_4.3.0.bb
new file mode 100644
index 0000000000..0c4c10bd7f
--- /dev/null
+++ b/packages/gcc/gcc-cross_4.3.0.bb
@@ -0,0 +1,15 @@
+PR = "r0"
+
+require gcc-${PV}.inc
+require gcc-cross4.inc
+require gcc-configure-cross.inc
+require gcc-package-cross.inc
+
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+# Do not build libssp libmudflap and libgomp
+# We might need them for some beefy targets
+EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
+ --disable-libgomp --disable-libmudflap \
+ --with-mpfr=${STAGING_DIR_NATIVE}${layout_exec_prefix}"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_DIR_TARGET}${layout_includedir}"
diff --git a/packages/gcc/gcc-cross_csl-arm-2005q3.bb b/packages/gcc/gcc-cross_csl-arm-2005q3.bb
index b779e99435..09f09faacd 100644
--- a/packages/gcc/gcc-cross_csl-arm-2005q3.bb
+++ b/packages/gcc/gcc-cross_csl-arm-2005q3.bb
@@ -1,15 +1,6 @@
-require gcc_csl-arm-2005q3.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
PR = "r2"
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
+require gcc-csl-arm-2005q3.inc
+require gcc-cross.inc
+require gcc-configure-cross.inc
require gcc-package-cross.inc
diff --git a/packages/gcc/gcc-cross_csl-arm-cvs.bb b/packages/gcc/gcc-cross_csl-arm-cvs.bb
deleted file mode 100644
index a9cb478701..0000000000
--- a/packages/gcc/gcc-cross_csl-arm-cvs.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require gcc_csl-arm-cvs.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
-PR = "r1"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
-require gcc-package-cross.inc
diff --git a/packages/gcc/gcc-cross_csl-arm.bb b/packages/gcc/gcc-cross_csl-arm.bb
deleted file mode 100644
index 5ca4b949e0..0000000000
--- a/packages/gcc/gcc-cross_csl-arm.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-require gcc_csl-arm.bb
-# path mangling, needed by the cross packaging
-require gcc-paths-cross.inc
-inherit cross
-# NOTE: split PR. If the main .oe changes something that affects its *build*
-# remember to increment this one too.
-PR = "r1"
-
-DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc"
-PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
-
-# cross build
-require gcc3-build-cross.inc
-# cross packaging
-require gcc-package-cross.inc
diff --git a/packages/gcc/gcc-csl-arm-2005q3.inc b/packages/gcc/gcc-csl-arm-2005q3.inc
new file mode 100644
index 0000000000..5d77ecbd07
--- /dev/null
+++ b/packages/gcc/gcc-csl-arm-2005q3.inc
@@ -0,0 +1,22 @@
+require gcc-common.inc
+
+BINV = "3.4.4"
+PV = "3.4.4+csl-arm-2005q3"
+PV_chinook-compat = "3.4.4cs2005q3.2"
+
+FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
+
+SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2005q3-2-arm-none-eabi.src.tar.bz2 \
+ file://gcc_optab_arm.patch;patch=1 \
+ file://gcc-3.4.4-eabi-bigendian.patch;patch=1"
+
+S = "${WORKDIR}/gcc-2005q3"
+
+do_unpack2() {
+ cd ${WORKDIR}
+ tar -xvjf ./arm-2005q3-2-arm-none-eabi/gcc-2005q3-2.tar.bz2
+}
+
+addtask unpack2 after do_unpack before do_patch
+
+
diff --git a/packages/gcc/gcc-fpu.inc b/packages/gcc/gcc-fpu.inc
deleted file mode 100644
index bb03d95567..0000000000
--- a/packages/gcc/gcc-fpu.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-
-def get_gcc_fpu_setting(bb, d):
- if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
- return "--with-float=soft"
- return ""
-
diff --git a/packages/gcc/gcc-native.inc b/packages/gcc/gcc-native.inc
index 3cf20a4589..6fa615ffc7 100644
--- a/packages/gcc/gcc-native.inc
+++ b/packages/gcc/gcc-native.inc
@@ -4,8 +4,6 @@ PROVIDES = "gcc-native-${PV}"
inherit native
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
# This is intended to be a -very- basic config
EXTRA_OECONF = "--with-local-prefix=${STAGING_DIR_TARGET}${layout_prefix} \
--with-newlib \
diff --git a/packages/gcc/gcc-native_3.4.4.bb b/packages/gcc/gcc-native_3.4.4.bb
index d70a4f5464..6f74a1ea46 100644
--- a/packages/gcc/gcc-native_3.4.4.bb
+++ b/packages/gcc/gcc-native_3.4.4.bb
@@ -1,3 +1,6 @@
-require gcc_${PV}.bb
+PR = "r7"
+
+require gcc-${PV}.inc
+require gcc-configure-target.inc
require gcc-native.inc
PROVIDES += "gcc3-native"
diff --git a/packages/gcc/gcc-package-cross.inc b/packages/gcc/gcc-package-cross.inc
index 51a45cd633..559b9fe27d 100644
--- a/packages/gcc/gcc-package-cross.inc
+++ b/packages/gcc/gcc-package-cross.inc
@@ -1,5 +1,3 @@
-# Packages emitted by our gcc-cross builds.
-#
INHIBIT_PACKAGE_STRIP ?= ""
OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
INHIBIT_PACKAGE_STRIP = "1"
@@ -28,16 +26,10 @@ FILES_libstdc++-dev = "${target_includedir}/c++/${PV} \
${target_libdir}/libsupc++.la \
${target_libdir}/libsupc++.a"
-python do_package() {
- if bb.data.getVar('DEBIAN_NAMES', d, 1):
- bb.data.setVar('PKG_libgcc', 'libgcc1', d)
- bb.build.exec_func('package_do_package', d)
-}
-
do_install () {
oe_runmake 'DESTDIR=${D}' install
- # Move libgcc_s into /lib
+ # Move libgcc_s into /lib
mkdir -p ${D}${target_base_libdir}
if [ -f ${D}${target_base_libdir}/libgcc_s.so.? ]; then
# Already in the right location
@@ -53,7 +45,7 @@ do_install () {
- # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
+ # Move libstdc++ and libg2c into libdir (resetting our prefix to /usr
mkdir -p ${D}${target_libdir}
if [ -f ${D}${prefix}/*/lib/nof/libstdc++.so ]; then
diff --git a/packages/gcc/gcc-package-sdk.inc b/packages/gcc/gcc-package-sdk.inc
index 635ab6d1f4..a36e632c9f 100644
--- a/packages/gcc/gcc-package-sdk.inc
+++ b/packages/gcc/gcc-package-sdk.inc
@@ -1,12 +1,4 @@
-#
-# Note gcc-package.inc was already included before us.
-#
-# We override PACKAGES and FILES to change the packaging
-#
-
INHIBIT_PACKAGE_STRIP ?= ""
-HAS_G2C ?= "yes"
-HAS_GFORTRAN ?= "no"
OLD_INHIBIT_PACKAGE_STRIP := "${INHIBIT_PACKAGE_STRIP}"
INHIBIT_PACKAGE_STRIP = "1"
@@ -29,6 +21,12 @@ FILES_${PN} = "\
${prefix}/${TARGET_SYS}/bin/* \
${prefix}/${TARGET_SYS}/lib/* \
"
+FILES_${PN}-doc = "\
+ ${infodir} \
+ ${mandir} \
+ ${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
+ "
+
do_install () {
oe_runmake 'DESTDIR=${D}' install
diff --git a/packages/gcc/gcc-package.inc b/packages/gcc/gcc-package-target.inc
index 2976d58d05..0e03f29958 100644
--- a/packages/gcc/gcc-package.inc
+++ b/packages/gcc/gcc-package-target.inc
@@ -1,6 +1,3 @@
-gcclibdir ?= "${libdir}/gcc"
-BINV ?= "${PV}"
-
PACKAGES = "\
libgcc ${PN} ${PN}-symlinks \
g++ g++-symlinks \
@@ -14,10 +11,6 @@ PACKAGES = "\
${PN}-doc \
"
-# We really need HOST_SYS here for some packages and TARGET_SYS for others.
-# For now, libgcc is most important so we fix for that - RP.
-SHLIBSDIR = "${STAGING_DIR}/${TARGET_SYS}/shlibs"
-
FILES_${PN} = "\
${bindir}/${TARGET_PREFIX}gcc \
${bindir}/${TARGET_PREFIX}gccbug \
@@ -101,13 +94,6 @@ FILES_${PN}-doc = "\
${gcclibdir}/${TARGET_SYS}/${BINV}/include/README \
"
-python do_package() {
- if bb.data.getVar('DEBIAN_NAMES', d, 1):
- bb.data.setVar('PKG_libgcc', 'libgcc1', d)
- bb.build.exec_func('package_do_package', d)
-}
-
-
do_install () {
autotools_do_install
diff --git a/packages/gcc/gcc-paths-cross.inc b/packages/gcc/gcc-paths-cross.inc
deleted file mode 100644
index 3c08b1805d..0000000000
--- a/packages/gcc/gcc-paths-cross.inc
+++ /dev/null
@@ -1,7 +0,0 @@
-# Note that we use := here, and require that this
-# is included at the correct point (before inheriting
-# cross) to ensure that libdir and includedir are
-# target paths, not CROSS_DIR paths.
-target_libdir := "${libdir}"
-target_includedir := "${includedir}"
-target_base_libdir := "${base_libdir}"
diff --git a/packages/gcc/gcc3-build-sdk.inc b/packages/gcc/gcc3-build-sdk.inc
deleted file mode 100644
index 5bc187b745..0000000000
--- a/packages/gcc/gcc3-build-sdk.inc
+++ /dev/null
@@ -1,29 +0,0 @@
-USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
-
-SRC_URI += 'file://sdk-libstdc++-includes.patch;patch=1'
-
-STAGING_TARGET_INCDIR = "${STAGING_DIR_TARGET}${layout_includedir}"
-STAGING_TARGET_LIBDIR = "${STAGING_DIR_TARGET}${layout_libdir}"
-
-EXTRA_OECONF += "--with-sysroot=${prefix}/${TARGET_SYS} --with-build-sysroot=${STAGING_DIR_TARGET}"
-
-do_configure () {
- (cd ${S} && gnu-configize) || die "failure running gnu-configize"
- (cd ${S}/libstdc++-v3 && autoreconf)
- oe_runconf
- mkdir -p gcc
- ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}as gcc/as
- ln -sf ${CROSS_DIR}/bin/${TARGET_PREFIX}ld gcc/ld
- ln -sf ${STAGING_TARGET_INCDIR}/* ${S}/include
- ln -sf ${STAGING_TARGET_LIBDIR}/crt*.o gcc/
-}
-
-do_compile () {
- export CC="${BUILD_CC}"
- export AR_FOR_TARGET="${TARGET_SYS}-ar"
- export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
- export LD_FOR_TARGET="${TARGET_SYS}-ld"
- export NM_FOR_TARGET="${TARGET_SYS}-nm"
- export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
- oe_runmake CFLAGS_FOR_TARGET="-I${STAGING_TARGET_INCDIR}"
-}
diff --git a/packages/gcc/gcc4-build.inc b/packages/gcc/gcc4-build.inc
deleted file mode 100644
index f745ad22ab..0000000000
--- a/packages/gcc/gcc4-build.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-FORTRAN = ",f95"
-
-include gcc3-build.inc
-
diff --git a/packages/gcc/gcc_3.3.3.bb b/packages/gcc/gcc_3.3.3.bb
index ea34debc64..cc7540af15 100644
--- a/packages/gcc/gcc_3.3.3.bb
+++ b/packages/gcc/gcc_3.3.3.bb
@@ -1,192 +1,5 @@
-SECTION = "devel"
PR = "r3"
-inherit autotools gettext
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-LICENSE = "GPL"
-
-# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually
-# packaged in the respective cross packages.
-PACKAGES = "${PN} ${PN}-symlinks \
- ${PN}-c++ ${PN}-c++-symlinks \
- ${PN}-f77 ${PN}-f77-symlinks \
- libstdc++-dev libg2c-dev \
- ${PN}-doc"
-
-FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
- ${bindir}/${TARGET_PREFIX}cpp \
- ${bindir}/${TARGET_PREFIX}gcov \
- ${bindir}/${TARGET_PREFIX}gccbug \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1 \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/collect2 \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/crt* \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/specs \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/lib* \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include"
-
-FILES_${PN}-symlinks = "${bindir}/cc \
- ${bindir}/gcc \
- ${bindir}/cpp \
- ${bindir}/gcov \
- ${bindir}/gccbug"
-
-FILES_${PN}-c++ = "${bindir}/${TARGET_PREFIX}g++ \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1plus"
-
-FILES_${PN}-c++-symlinks = "${bindir}/c++ \
- ${bindir}/g++"
-
-FILES_libgcc = "/lib/libgcc_s.so.*"
-
-# Called from within gcc-cross, so libdir is set wrong
-#FILES_libstdc++ = "${libdir}/libstdc++.so.*"
-FILES_libstdc++ = "${libdir}/libstdc++.so.*"
-
-FILES_libstdc++-dev = "${includedir}/c++/${PV} \
- ${libdir}/libstdc++.so \
- ${libdir}/libstdc++.la \
- ${libdir}/libstdc++.a \
- ${libdir}/libsupc++.la \
- ${libdir}/libsupc++.a"
-
-FILES_${PN}-doc = "${infodir} \
- ${mandir} \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include/README"
-
-SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://config.sub.patch;patch=1 \
- file://empty6.patch;patch=1 \
- file://pr10392-1-test.patch;patch=1 \
- file://pr10412-1-test.patch;patch=1 \
- file://pr10589-1-test.patch;patch=1 \
- file://pr11162-1-test.patch;patch=1 \
- file://pr11587-1-test.patch;patch=1 \
- file://pr11608.patch;patch=1 \
- file://pr11736-1-test.patch;patch=1 \
- file://pr11864-1-test.patch;patch=1 \
- file://pr12009.patch;patch=1 \
- file://pr12010.patch;patch=1 \
- file://pr13260-test.patch;patch=1 \
- file://pr9365-1-test.patch;patch=1 \
- file://sh-lib1funcs_sizeAndType.patch;patch=1 \
- file://sh-pic-set_fpscr-gcc-3.3.2.patch;patch=1 \
- file://thunk3.patch;patch=1 \
- file://arm-10730.dpatch;patch=1;pnum=0 \
- file://arm-12527.dpatch;patch=1;pnum=0 \
- file://arm-14558.dpatch;patch=1;pnum=0 \
- file://arm-common.dpatch;patch=1;pnum=0 \
- file://arm-gotoff.dpatch;patch=1;pnum=0 \
- file://arm-ldm.dpatch;patch=1;pnum=0 \
- file://arm-tune.patch;patch=1;pnum=0 \
- file://arm-xscale.patch;patch=1;pnum=0 \
- file://arm-14302.patch;patch=1;pnum=0 \
- file://arm-ldm-peephole.patch;patch=1;pnum=0 \
- file://libibery-crosstool.patch;patch=1;pnum=1 \
- file://reverse-compare.patch;patch=1 \
- file://gcc34-15089.patch;patch=1 \
- file://gcc-uclibc-3.3-100-conf.patch;patch=1 \
- file://gcc-uclibc-3.3-110-conf.patch;patch=1 \
- file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \
- file://gcc-uclibc-3.3-200-code.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://bash3.patch;patch=1"
-
-MIRRORS_prepend () {
-${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
-}
-
-S = "${WORKDIR}/gcc-${PV}"
-B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
-
-EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
- --with-gnu-ld \
- --enable-shared \
- --enable-multilib \
- --enable-target-optspace \
- --enable-languages=c,c++,f77 \
- --enable-threads=posix \
- --enable-c99 \
- --enable-long-long \
- --enable-symvers=gnu \
- --program-prefix=${TARGET_PREFIX} \
- ${EXTRA_OECONF_PATHS} \
- ${EXTRA_OECONF_DEP}"
-
-EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
- --with-gxx-include-dir=${includedir}/c++/${PV}"
-
-EXTRA_OECONF_DEP = ""
-EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
-EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
-EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
-
-require gcc-fpu.inc
-
-python __anonymous () {
- import bb, re
- if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
- bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
- elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
- bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
-}
-
-do_configure () {
- # Setup these vars for cross building only
- if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
- export CC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
- export GCC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
- export CXX_FOR_TARGET="${CCACHE} ${HOST_PREFIX}g++"
- export AS_FOR_TARGET="${HOST_PREFIX}as"
- export LD_FOR_TARGET="${HOST_PREFIX}ld"
- export NM_FOR_TARGET="${HOST_PREFIX}nm"
- export AR_FOR_TARGET="${HOST_PREFIX}ar"
- export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
- fi
- (cd ${S} && gnu-configize) || die "failure running gnu-configize"
- oe_runconf
-}
-
-do_install () {
- autotools_do_install
-
- # Cleanup some of the gcc-lib stuff
- rm -rf ${D}${libdir}/gcc-lib/${TARGET_SYS}/${PV}/install-tools
-
- # Move libgcc_s into /lib
- mkdir -p ${D}${base_libdir}
- mv -f ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
- rm -f ${D}${libdir}/libgcc_s.so
- ln -sf `echo ${libdir}/gcc-lib/${TARGET_SYS}/${PV} | tr -s / |
- sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.? \
- ${D}${libdir}/gcc-lib/${TARGET_SYS}/${PV}/libgcc_s.so
-
- # Cleanup manpages..
- rm -rf ${D}${mandir}/man7
- mv ${D}${mandir}/man1/cpp.1 \
- ${D}${mandir}/man1/${TARGET_SYS}-cpp.1
- mv ${D}${mandir}/man1/gcov.1 \
- ${D}${mandir}/man1/${TARGET_SYS}-gcov.1
-
- # We use libiberty from binutils
- rm -f ${D}${libdir}/libiberty.a
-
- cd ${D}${bindir}
-
- # We care about g++ not c++
- rm -f *c++
-
- # We don't care about the gcc-<version> ones for this
- rm -f *gcc-?.?*
-
- # These sometimes show up, they are strange, we remove them
- rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
-
- # Symlinks so we can use these trivially on the target
- ln -sf ${TARGET_SYS}-g77 g77
- ln -sf ${TARGET_SYS}-g++ g++
- ln -sf ${TARGET_SYS}-gcc gcc
- ln -sf g77 f77
- ln -sf g++ c++
- ln -sf gcc cc
-}
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_3.3.4.bb b/packages/gcc/gcc_3.3.4.bb
index 294e57d7df..cc7540af15 100644
--- a/packages/gcc/gcc_3.3.4.bb
+++ b/packages/gcc/gcc_3.3.4.bb
@@ -1,171 +1,5 @@
-SECTION = "devel"
PR = "r3"
-inherit autotools gettext
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-LICENSE = "GPL"
-
-# libgcc libstdc++ libg2c are listed in our FILES_*, but are actually
-# packaged in the respective cross packages.
-PACKAGES = "${PN} ${PN}-symlinks \
- ${PN}-c++ ${PN}-c++-symlinks \
- ${PN}-f77 ${PN}-f77-symlinks \
- libstdc++-dev libg2c-dev \
- ${PN}-doc"
-
-FILES_${PN} = "${bindir}/${TARGET_PREFIX}gcc \
- ${bindir}/${TARGET_PREFIX}cpp \
- ${bindir}/${TARGET_PREFIX}gcov \
- ${bindir}/${TARGET_PREFIX}gccbug \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1 \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/collect2 \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/crt* \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/specs \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/lib* \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include"
-
-FILES_${PN}-symlinks = "${bindir}/cc \
- ${bindir}/gcc \
- ${bindir}/cpp \
- ${bindir}/gcov \
- ${bindir}/gccbug"
-
-FILES_${PN}-c++ = "${bindir}/${TARGET_PREFIX}g++ \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/cc1plus"
-
-FILES_${PN}-c++-symlinks = "${bindir}/c++ \
- ${bindir}/g++"
-
-FILES_libgcc = "/lib/libgcc_s.so.*"
-
-# Called from within gcc-cross, so libdir is set wrong
-#FILES_libstdc++ = "${libdir}/libstdc++.so.*"
-FILES_libstdc++ = "${libdir}/libstdc++.so.*"
-
-FILES_libstdc++-dev = "${includedir}/c++/${PV} \
- ${libdir}/libstdc++.so \
- ${libdir}/libstdc++.la \
- ${libdir}/libstdc++.a \
- ${libdir}/libsupc++.la \
- ${libdir}/libsupc++.a"
-
-FILES_${PN}-doc = "${infodir} \
- ${mandir} \
- ${libdir}/gcc-lib/${TARGET_SYS}/${PV}/include/README"
-
-SRC_URI = "${GNU_MIRROR}/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://arm-gotoff.dpatch;patch=1;pnum=0 \
- file://arm-ldm.dpatch;patch=1;pnum=0 \
- file://arm-tune.patch;patch=1;pnum=0 \
- file://arm-ldm-peephole.patch;patch=1;pnum=0 \
- file://libibery-crosstool.patch;patch=1;pnum=1 \
- file://reverse-compare.patch;patch=1 \
- file://gcc34-15089.patch;patch=1 \
- file://gcc-uclibc-3.3-100-conf.patch;patch=1 \
- file://gcc-uclibc-3.3-110-conf.patch;patch=1 \
- file://gcc-uclibc-3.3-120-softfloat.patch;patch=1 \
- file://gcc-uclibc-3.3-200-code.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://gcc-com.patch;patch=1 \
- file://bash3.patch;patch=1"
-
-PREMIRRORS_prepend () {
-${GNU_MIRROR}/gcc/releases/ ftp://gcc.gnu.org/pub/gcc/releases/
-${GNU_MIRROR}/gcc/releases/ http://gcc.get-software.com/releases/
-}
-
-S = "${WORKDIR}/gcc-${PV}"
-B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
-
-EXTRA_OECONF = "${@['--enable-clocale=generic', ''][bb.data.getVar('USE_NLS', d, 1) != 'no']} \
- --with-gnu-ld \
- --enable-shared \
- --enable-multilib \
- --enable-target-optspace \
- --enable-languages=c,c++,f77 \
- --enable-threads=posix \
- --enable-c99 \
- --enable-long-long \
- --enable-symvers=gnu \
- --program-prefix=${TARGET_PREFIX} \
- ${EXTRA_OECONF_PATHS} \
- ${EXTRA_OECONF_DEP}"
-
-EXTRA_OECONF_PATHS = "--with-local-prefix=${prefix}/local \
- --with-gxx-include-dir=${includedir}/c++/${PV}"
-
-EXTRA_OECONF_DEP = ""
-EXTRA_OECONF_uclibc = "--disable-__cxa_atexit"
-EXTRA_OECONF_glibc = "--enable-__cxa_atexit"
-EXTRA_OECONF += "${@get_gcc_fpu_setting(bb, d)}"
-
-require gcc-fpu.inc
-
-python __anonymous () {
- import bb, re
- if (re.match('linux-uclibc$', bb.data.getVar('TARGET_OS', d, 1)) != None):
- bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_uclibc}', d)
- elif (re.match('linux$', bb.data.getVar('TARGET_OS', d, 1)) != None):
- bb.data.setVar('EXTRA_OECONF_DEP', '${EXTRA_OECONF_glibc}', d)
-}
-
-do_configure () {
- # Setup these vars for cross building only
- if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then
- export CC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
- export GCC_FOR_TARGET="${CCACHE} ${HOST_PREFIX}gcc"
- export CXX_FOR_TARGET="${CCACHE} ${HOST_PREFIX}g++"
- export AS_FOR_TARGET="${HOST_PREFIX}as"
- export LD_FOR_TARGET="${HOST_PREFIX}ld"
- export NM_FOR_TARGET="${HOST_PREFIX}nm"
- export AR_FOR_TARGET="${HOST_PREFIX}ar"
- export RANLIB_FOR_TARGET="${HOST_PREFIX}ranlib"
- fi
- (cd ${S} && gnu-configize) || die "failure running gnu-configize"
- oe_runconf
-}
-
-do_install () {
- autotools_do_install
-
- # Cleanup some of the gcc-lib stuff
- rm -rf ${D}${libdir}/gcc-lib/${TARGET_SYS}/${PV}/install-tools
-
- # Move libgcc_s into /lib
- mkdir -p ${D}${base_libdir}
- mv -f ${D}${libdir}/libgcc_s.so.* ${D}${base_libdir}
- rm -f ${D}${libdir}/libgcc_s.so
- ln -sf `echo ${libdir}/gcc-lib/${TARGET_SYS}/${PV} | tr -s / |
- sed -e 's,^/,,' -e 's,[^/]*,..,g'`/lib/libgcc_s.so.? \
- ${D}${libdir}/gcc-lib/${TARGET_SYS}/${PV}/libgcc_s.so
-
- # Cleanup manpages..
- rm -rf ${D}${mandir}/man7
- mv ${D}${mandir}/man1/cpp.1 \
- ${D}${mandir}/man1/${TARGET_SYS}-cpp.1
- mv ${D}${mandir}/man1/gcov.1 \
- ${D}${mandir}/man1/${TARGET_SYS}-gcov.1
-
- # We use libiberty from binutils
- rm -f ${D}${libdir}/libiberty.a
-
- cd ${D}${bindir}
-
- # We care about g++ not c++
- rm -f *c++
-
- # We don't care about the gcc-<version> ones for this
- rm -f *gcc-?.?*
-
- # These sometimes show up, they are strange, we remove them
- rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-*
-
- # Symlinks so we can use these trivially on the target
- ln -sf ${TARGET_SYS}-g77 g77
- ln -sf ${TARGET_SYS}-g++ g++
- ln -sf ${TARGET_SYS}-gcc gcc
- ln -sf g77 f77
- ln -sf g++ c++
- ln -sf gcc cc
-}
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_3.4.3.bb b/packages/gcc/gcc_3.4.3.bb
index c4d6df955d..73e908ae24 100644
--- a/packages/gcc/gcc_3.4.3.bb
+++ b/packages/gcc/gcc_3.4.3.bb
@@ -1,28 +1,5 @@
PR = "r12"
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://gcc34-reverse-compare.patch;patch=1 \
- file://gcc34-arm-ldm.patch;patch=1 \
- file://gcc34-arm-ldm-peephole.patch;patch=1 \
- file://gcc34-arm-tune.patch;patch=1 \
- file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \
- file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \
- file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \
- file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \
- file://gcc-3.4.0-arm-bigendian.patch;patch=1 \
- file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \
- file://GCC3.4.0VisibilityPatch.diff;patch=1 \
- file://15342.patch;patch=1 \
- file://always-fixincperm.patch;patch=1 \
- file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 "
-
-require gcc3-build.inc
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_3.4.4.bb b/packages/gcc/gcc_3.4.4.bb
index 4694d3ac5e..5e2598079b 100644
--- a/packages/gcc/gcc_3.4.4.bb
+++ b/packages/gcc/gcc_3.4.4.bb
@@ -1,33 +1,5 @@
PR = "r7"
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://gcc34-reverse-compare.patch;patch=1 \
- file://gcc34-arm-ldm.patch;patch=1 \
- file://gcc34-arm-ldm-peephole.patch;patch=1 \
- file://gcc34-arm-tune.patch;patch=1 \
- file://gcc-3.4.1-uclibc-100-conf.patch;patch=1 \
- file://gcc-3.4.1-uclibc-200-locale.patch;patch=1 \
- file://gcc-3.4.0-arm-lib1asm.patch;patch=1 \
- file://gcc-3.4.0-arm-nolibfloat.patch;patch=1 \
- file://gcc-3.4.0-arm-bigendian.patch;patch=1 \
- file://gcc-3.4.0-arm-bigendian-uclibc.patch;patch=1 \
- file://GCC3.4.0VisibilityPatch.diff;patch=1 \
- file://15342.patch;patch=1 \
- file://always-fixincperm.patch;patch=1 \
- file://GCOV_PREFIX_STRIP-cross-profile_3.4.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://gcc4-mtune-compat.patch;patch=1"
-
-SRC_URI += "file://gcc34-configure.in.patch;patch=1"
-SRC_URI += "file://gcc34-thumb-support.patch;patch=1"
-SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
-
-require gcc3-build.inc
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_4.0.0.bb b/packages/gcc/gcc_4.0.0.bb
index 9f75bf1f54..cc7540af15 100644
--- a/packages/gcc/gcc_4.0.0.bb
+++ b/packages/gcc/gcc_4.0.0.bb
@@ -1,16 +1,5 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
PR = "r3"
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://ldflags.patch;patch=1"
-SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
-
-require gcc4-build.inc
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_4.0.2.bb b/packages/gcc/gcc_4.0.2.bb
index 2945592659..5e2598079b 100644
--- a/packages/gcc/gcc_4.0.2.bb
+++ b/packages/gcc/gcc_4.0.2.bb
@@ -1,37 +1,5 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-DEPENDS = "mpfr gmp"
PR = "r7"
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://arm-nolibfloat.patch;patch=1 \
- file://arm-softfloat.patch;patch=1 \
- file://ldflags.patch;patch=1 \
- file://GCOV_PREFIX_STRIP-cross-profile_4.1.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 "
-
-# uclibc patches below
-SRC_URI_append = " file://100-uclibc-conf.patch;patch=1 \
- file://200-uclibc-locale.patch;patch=1 \
- file://301-missing-execinfo_h.patch;patch=1 \
- file://302-c99-snprintf.patch;patch=1 \
- file://303-c99-complex-ugly-hack.patch;patch=1 \
- file://800-arm-bigendian.patch;patch=1 \
- file://zecke-host-cpp-ac-hack.patch;patch=1 \
- file://gcc-4.0.2-atmel.0.99.2.patch;patch=1 \
- "
-
-SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
-
-
-require gcc4-build.inc
-
-EXTRA_OECONF += "--disable-libssp"
-
-FORTRAN = ""
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_4.1.0.bb b/packages/gcc/gcc_4.1.0.bb
index 6a5f607729..cc7540af15 100644
--- a/packages/gcc/gcc_4.1.0.bb
+++ b/packages/gcc/gcc_4.1.0.bb
@@ -1,27 +1,5 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
PR = "r3"
-DEFAULT_PREFERENCE = "-1"
-
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.0/gcc-4.1.0.tar.bz2 \
- file://arm-nolibfloat.patch;patch=1 \
- file://arm-softfloat.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://ldflags.patch;patch=1 \
- file://pr34130.patch;patch=1"
-
-SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
-
-require gcc4-build.inc
-EXTRA_OECONF += "--disable-libssp"
-
-FORTRAN = ""
-
-
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_4.1.1.bb b/packages/gcc/gcc_4.1.1.bb
index 4b538219b3..8ae871074c 100644
--- a/packages/gcc/gcc_4.1.1.bb
+++ b/packages/gcc/gcc_4.1.1.bb
@@ -1,61 +1,5 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
PR = "r18"
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "http://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.1/gcc-4.1.1.tar.bz2 \
- file://100-uclibc-conf.patch;patch=1 \
- file://110-arm-eabi.patch;patch=1 \
- file://200-uclibc-locale.patch;patch=1 \
- file://300-libstdc++-pic.patch;patch=1 \
- file://301-missing-execinfo_h.patch;patch=1 \
- file://302-c99-snprintf.patch;patch=1 \
- file://303-c99-complex-ugly-hack.patch;patch=1 \
- file://304-index_macro.patch;patch=1 \
- file://602-sdk-libstdc++-includes.patch;patch=1 \
- file://740-sh-pr24836.patch;patch=1 \
- file://800-arm-bigendian.patch;patch=1 \
- file://801-arm-bigendian-eabi.patch;patch=1 \
- file://arm-nolibfloat.patch;patch=1 \
- file://arm-softfloat.patch;patch=1 \
- file://gcc41-configure.in.patch;patch=1 \
- file://arm-thumb.patch;patch=1 \
- file://arm-thumb-cache.patch;patch=1 \
- file://ldflags.patch;patch=1 \
- file://cse.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://unbreak-armv4t.patch;patch=1 \
- file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
- file://gcc-4.1.1-pr13685-1.patch;patch=1 \
- file://gcc-ignore-cache.patch;patch=1 \
- file://gcc-4.1.1-e300cx.patch;patch=1 \
- file://pr34130.patch;patch=1 \
- "
-
-SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
-
-#This is a dirty hack to get gcc 4.1.1 to compile for glibc AND uclibc on ppc
-#the patch that is need it to get gcc support soft-floats with glibc, makes gcc fail with uclibc
-SRC_URI_append_linux = " file://ppc-gcc-41-20060515.patch;patch=1 \
- file://ppc-sfp-long-double-gcc411-7.patch;patch=1 "
-
-
-#Set the fortran bits
-# 'fortran' or '', not 'f77' like gcc3 had
-FORTRAN = ""
-
-#Set the java bits
-JAVA_arm = ""
-JAVA = ""
-
-LANGUAGES = "c,c++${FORTRAN}${JAVA}"
-require gcc3-build.inc
-
-
-EXTRA_OECONF += " --disable-libssp "
-
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_4.1.2.bb b/packages/gcc/gcc_4.1.2.bb
index fc75e942bb..c51eb23b05 100644
--- a/packages/gcc/gcc_4.1.2.bb
+++ b/packages/gcc/gcc_4.1.2.bb
@@ -1,76 +1,7 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-# NOTE: split PR. If the main .bb changes something that affects its *build*
-# remember to increment the -cross .bb PR too.
PR = "r11"
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2 \
- file://100-uclibc-conf.patch;patch=1 \
- file://110-arm-eabi.patch;patch=1 \
- file://200-uclibc-locale.patch;patch=1 \
- file://300-libstdc++-pic.patch;patch=1 \
- file://301-missing-execinfo_h.patch;patch=1 \
- file://302-c99-snprintf.patch;patch=1 \
- file://303-c99-complex-ugly-hack.patch;patch=1 \
- file://304-index_macro.patch;patch=1 \
- file://602-sdk-libstdc++-includes.patch;patch=1 \
- file://740-sh-pr24836.patch;patch=1 \
- file://800-arm-bigendian.patch;patch=1 \
- file://arm-nolibfloat.patch;patch=1 \
- file://arm-softfloat.patch;patch=1 \
- file://gcc41-configure.in.patch;patch=1 \
- file://arm-thumb.patch;patch=1 \
- file://arm-thumb-cache.patch;patch=1 \
- file://ldflags.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://unbreak-armv4t.patch;patch=1 \
- file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
- file://cache-amnesia.patch;patch=1 \
- file://gfortran.patch;patch=1 \
- file://gcc-4.0.2-e300c2c3.patch;patch=1 \
- file://pr34130.patch;patch=1 \
- "
-
-SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
-
-SRC_URI_avr32 = "http://www.angstrom-distribution.org/unstable/sources/gcc-4.1.2-atmel.1.1.0.tar.gz \
-# file://100-uclibc-conf.patch;patch=1 \
-# file://200-uclibc-locale.patch;patch=1 \
-# file://300-libstdc++-pic.patch;patch=1 \
- file://301-missing-execinfo_h.patch;patch=1 \
- file://302-c99-snprintf.patch;patch=1 \
- file://303-c99-complex-ugly-hack.patch;patch=1 \
- file://304-index_macro.patch;patch=1 \
- file://602-sdk-libstdc++-includes.patch;patch=1 \
- file://gcc41-configure.in.patch;patch=1 \
- file://ldflags.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://cache-amnesia.patch;patch=1 \
- "
-
-do_compile_prepend_avr32() {
- ln -sf ${S}/libstdc++-v3/config/os/uclibc/ ${S}/libstdc++-v3/config/os/uclibc-linux
-}
-
-#Set the fortran bits
-# ',fortran' or '', not 'f77' like gcc3 had
-FORTRAN = ""
-
-#Set the java bits
-JAVA = ""
-JAVA_arm = ""
-
-
-LANGUAGES = "c,c++${FORTRAN}${JAVA}"
-require gcc3-build.inc
-ARCH_FLAGS_FOR_TARGET=-isystem${STAGING_INCDIR}
-
-
-EXTRA_OECONF += " --disable-libssp "
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/packages/gcc/gcc_4.2.1.bb b/packages/gcc/gcc_4.2.1.bb
index dac620397b..6da15d22b2 100644
--- a/packages/gcc/gcc_4.2.1.bb
+++ b/packages/gcc/gcc_4.2.1.bb
@@ -1,110 +1,7 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-PR = "r8"
+PR = "r9"
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://100-uclibc-conf.patch;patch=1 \
- file://103-uclibc-conf-noupstream.patch;patch=1 \
- file://200-uclibc-locale.patch;patch=1 \
- file://203-uclibc-locale-no__x.patch;patch=1 \
- file://204-uclibc-locale-wchar_fix.patch;patch=1 \
- file://205-uclibc-locale-update.patch;patch=1 \
- file://300-libstdc++-pic.patch;patch=1 \
- file://301-missing-execinfo_h.patch;patch=1 \
- file://302-c99-snprintf.patch;patch=1 \
- file://303-c99-complex-ugly-hack.patch;patch=1 \
- file://304-index_macro.patch;patch=1 \
- file://305-libmudflap-susv3-legacy.patch;patch=1 \
- file://306-libstdc++-namespace.patch;patch=1 \
- file://307-locale_facets.patch;patch=1 \
- file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
- file://602-sdk-libstdc++-includes.patch;patch=1 \
- file://740-sh-pr24836.patch;patch=1 \
- file://800-arm-bigendian.patch;patch=1 \
- file://904-flatten-switch-stmt-00.patch;patch=1 \
- file://arm-nolibfloat.patch;patch=1 \
- file://arm-softfloat.patch;patch=1 \
- file://gcc41-configure.in.patch;patch=1 \
- file://arm-thumb.patch;patch=1 \
- file://arm-thumb-cache.patch;patch=1 \
- file://ldflags.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://unbreak-armv4t.patch;patch=1 \
- file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
- file://cache-amnesia.patch;patch=1 \
- file://gfortran.patch;patch=1 \
- file://pr34130.patch;patch=1 \
-"
-
-SRC_URI_avr32 = " http://ewi546.ewi.utwente.nl/tmp/avr32-gcc-4.2.1-atmel.1.0.1.tar.gz \
- file://100-uclibc-conf.patch;patch=1 \
- file://103-uclibc-conf-noupstream.patch;patch=1 \
- file://200-uclibc-locale.patch;patch=1 \
- file://203-uclibc-locale-no__x.patch;patch=1 \
- file://204-uclibc-locale-wchar_fix.patch;patch=1 \
- file://205-uclibc-locale-update.patch;patch=1 \
- file://300-libstdc++-pic.patch;patch=1 \
- file://301-missing-execinfo_h.patch;patch=1 \
- file://302-c99-snprintf.patch;patch=1 \
- file://303-c99-complex-ugly-hack.patch;patch=1 \
- file://304-index_macro.patch;patch=1 \
- file://305-libmudflap-susv3-legacy.patch;patch=1 \
- file://306-libstdc++-namespace.patch;patch=1 \
- file://307-locale_facets.patch;patch=1 \
- file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
- file://602-sdk-libstdc++-includes.patch;patch=1 \
- file://740-sh-pr24836.patch;patch=1 \
- file://904-flatten-switch-stmt-00.patch;patch=1 \
- file://gcc41-configure.in.patch;patch=1 \
- file://ldflags.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://cache-amnesia.patch;patch=1 \
- file://gfortran.patch;patch=1 \
-"
-
-SRC_URI_append_ep93xx = " \
- file://arm-crunch-saveregs.patch;patch=1 \
- file://arm-crunch-20000320.patch;patch=1 \
- file://arm-crunch-compare.patch;patch=1 \
- file://arm-crunch-compare-unordered.patch;patch=1 \
- file://arm-crunch-compare-geu.patch;patch=1 \
- file://arm-crunch-eabi-ieee754.patch;patch=1 \
- file://arm-crunch-eabi-ieee754-div.patch;patch=1 \
- file://arm-crunch-64bit-disable0.patch;patch=1 \
- file://arm-crunch-offset.patch;patch=1 \
- file://arm-crunch-fp_consts.patch;patch=1 \
- file://arm-crunch-neg2.patch;patch=1 \
- file://arm-crunch-predicates3.patch;patch=1 \
- file://arm-crunch-cfcvtds-disable.patch;patch=1 \
- file://arm-crunch-floatsi-disable.patch;patch=1 \
- file://arm-crunch-truncsi-disable.patch;patch=1 \
- file://arm-crunch-cfcvt64-disable.patch;patch=1 \
- file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
- "
-
-PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}"
-
-SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
-
-#Set the fortran bits
-# 'i,fortran' or '', not 'f77' like gcc3 had
-FORTRAN = ""
-FORTRAN_linux-gnueabi = ",fortran"
-
-#Set the java bits
-JAVA = ""
-JAVA_arm = ""
-
-LANGUAGES = "c,c++${FORTRAN}${JAVA}"
-require gcc3-build.inc
-ARCH_FLAGS_FOR_TARGET=-isystem${STAGING_INCDIR}
-
-
-EXTRA_OECONF += " --disable-libgomp --disable-libssp --disable-bootstrap "
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
diff --git a/packages/gcc/gcc_4.2.2.bb b/packages/gcc/gcc_4.2.2.bb
index 0a0e9cdd16..7238aed4d7 100644
--- a/packages/gcc/gcc_4.2.2.bb
+++ b/packages/gcc/gcc_4.2.2.bb
@@ -1,96 +1,10 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
PR = "r6"
-inherit autotools gettext
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
-require gcc-package.inc
+SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
-SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
- file://100-uclibc-conf.patch;patch=1 \
- file://103-uclibc-conf-noupstream.patch;patch=1 \
- file://200-uclibc-locale.patch;patch=1 \
- file://203-uclibc-locale-no__x.patch;patch=1 \
- file://204-uclibc-locale-wchar_fix.patch;patch=1 \
- file://205-uclibc-locale-update.patch;patch=1 \
- file://300-libstdc++-pic.patch;patch=1 \
- file://301-missing-execinfo_h.patch;patch=1 \
- file://302-c99-snprintf.patch;patch=1 \
- file://303-c99-complex-ugly-hack.patch;patch=1 \
- file://304-index_macro.patch;patch=1 \
- file://305-libmudflap-susv3-legacy.patch;patch=1 \
- file://306-libstdc++-namespace.patch;patch=1 \
- file://307-locale_facets.patch;patch=1 \
- file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
- file://602-sdk-libstdc++-includes.patch;patch=1 \
- file://740-sh-pr24836.patch;patch=1 \
- file://800-arm-bigendian.patch;patch=1 \
- file://801-arm-bigendian-eabi.patch;patch=1 \
- file://904-flatten-switch-stmt-00.patch;patch=1 \
- file://arm-nolibfloat.patch;patch=1 \
- file://arm-softfloat.patch;patch=1 \
- file://gcc41-configure.in.patch;patch=1 \
- file://arm-thumb.patch;patch=1 \
- file://arm-thumb-cache.patch;patch=1 \
- file://ldflags.patch;patch=1 \
- file://zecke-xgcc-cpp.patch;patch=1 \
- file://unbreak-armv4t.patch;patch=1 \
- file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
- file://cache-amnesia.patch;patch=1 \
- file://gfortran.patch;patch=1 \
- file://gcc-4.0.2-e300c2c3.patch;patch=1 \
- file://pr34130.patch;patch=1 \
- file://fortran-static-linking.patch;patch=1 \
- file://intermask-bigendian.patch;patch=1 \
-"
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
-SRC_URI_append_ep93xx = " \
- file://arm-crunch-saveregs.patch;patch=1 \
- file://arm-crunch-20000320.patch;patch=1 \
- file://arm-crunch-compare.patch;patch=1 \
- file://arm-crunch-compare-unordered.patch;patch=1 \
- file://arm-crunch-compare-geu.patch;patch=1 \
- file://arm-crunch-eabi-ieee754.patch;patch=1 \
- file://arm-crunch-eabi-ieee754-div.patch;patch=1 \
- file://arm-crunch-64bit-disable0.patch;patch=1 \
- file://arm-crunch-offset.patch;patch=1 \
- file://arm-crunch-fp_consts.patch;patch=1 \
- file://arm-crunch-neg2.patch;patch=1 \
- file://arm-crunch-predicates3.patch;patch=1 \
- file://arm-crunch-cfcvtds-disable.patch;patch=1 \
- file://arm-crunch-floatsi-disable.patch;patch=1 \
- file://arm-crunch-truncsi-disable.patch;patch=1 \
- file://arm-crunch-cfcvt64-disable.patch;patch=1 \
- file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
- "
-
-PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}"
-
-SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
-
-#Set the fortran bits
-# 'i,fortran' or '', not 'f77' like gcc3 had
-FORTRAN = ""
-FORTRAN_linux-gnueabi = ",fortran"
-
-DEPENDS += " gmp mpfr "
-
-#Set the java bits
-JAVA = ""
-JAVA_arm = ""
-
-LANGUAGES = "c,c++${FORTRAN}${JAVA}"
-require gcc3-build.inc
-ARCH_FLAGS_FOR_TARGET=-isystem${STAGING_INCDIR}
-
-
-EXTRA_OECONF += " --disable-libssp --disable-bootstrap "
-
-# We know some one is including us, but we only want to apply this fortran hack for the real gcc
-python __anonymous () {
- import bb
- if bb.data.getVar('PN', d, True) == "gcc":
- bb.data.setVar('SRC_URI_append', ' file://fortran-cross-compile-hack.patch;patch=1', d)
-}
diff --git a/packages/gcc/gcc_4.3.0.bb b/packages/gcc/gcc_4.3.0.bb
new file mode 100644
index 0000000000..f191a18f3a
--- /dev/null
+++ b/packages/gcc/gcc_4.3.0.bb
@@ -0,0 +1,10 @@
+PR = "r0"
+
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
+
+SRC_URI_append = "file://fortran-cross-compile-hack.patch;patch=1"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
diff --git a/packages/gcc/gcc_csl-arm-2005q3.bb b/packages/gcc/gcc_csl-arm-2005q3.bb
index b90f6907bb..cc7540af15 100644
--- a/packages/gcc/gcc_csl-arm-2005q3.bb
+++ b/packages/gcc/gcc_csl-arm-2005q3.bb
@@ -1,29 +1,5 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-BINV = "3.4.4"
-PV = "3.4.4+csl-arm-2005q3"
-PV_chinook-compat = "3.4.4cs2005q3.2"
PR = "r3"
-FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
-
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "http://www.codesourcery.com/public/gnu_toolchain/arm-none-eabi/arm-2005q3-2-arm-none-eabi.src.tar.bz2 \
- file://gcc_optab_arm.patch;patch=1 \
- file://gcc-3.4.4-eabi-bigendian.patch;patch=1"
-
-do_unpack2() {
- cd ${WORKDIR}
- tar -xvjf ./arm-2005q3-2-arm-none-eabi/gcc-2005q3-2.tar.bz2
-}
-
-addtask unpack2 after do_unpack before do_patch
-
-require gcc3-build.inc
-
-S = "${WORKDIR}/gcc-2005q3"
+require gcc-${PV}.inc
+require gcc-configure-target.inc
+require gcc-package-target.inc
diff --git a/packages/gcc/gcc_csl-arm-cvs.bb b/packages/gcc/gcc_csl-arm-cvs.bb
deleted file mode 100644
index d8e5fee2bb..0000000000
--- a/packages/gcc/gcc_csl-arm-cvs.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require gcc_csl-arm.bb
-
-PV = "3.4.4+csl-arm-${SRCDATE}"
-BINV = "3.4.4"
-
-SRC_URI += "file://15342.patch;patch=1 file://gcc-3.4.0-arm-lib1asm.patch;patch=1 file://no-libfloat.patch;patch=1"
-
-PR = "r1"
-
-DEFAULT_PREFERENCE = "-1"
diff --git a/packages/gcc/gcc_csl-arm.bb b/packages/gcc/gcc_csl-arm.bb
deleted file mode 100644
index 2599498fda..0000000000
--- a/packages/gcc/gcc_csl-arm.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "The GNU cc and gcc C compilers."
-HOMEPAGE = "http://www.gnu.org/software/gcc/"
-SECTION = "devel"
-LICENSE = "GPL"
-BINV = "3.4.4"
-PV = "3.4.4+csl-arm-${SRCDATE}"
-PR = "r1"
-
-FILESDIR = "${FILE_DIRNAME}/gcc-csl-arm"
-DEFAULT_PREFERENCE = "-1"
-
-inherit autotools gettext
-
-require gcc-package.inc
-
-SRC_URI = "cvs://anonymous@cvs.savannah.gnu.org/cvsroot/gcc;method=pserver;tag=csl-arm-branch;module=gcc;date=${SRCDATE} \
- file://gcc34-arm-tune.patch;patch=1"
-
-require gcc3-build.inc
-
-S = "${WORKDIR}/gcc"
-
diff --git a/packages/gettext/gettext_0.14.1.bb b/packages/gettext/gettext_0.14.1.bb
index 2184b8c863..d5afbaf520 100644
--- a/packages/gettext/gettext_0.14.1.bb
+++ b/packages/gettext/gettext_0.14.1.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "The GNU internationalization library."
HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
SECTION = "libs"
LICENSE = "GPL"
-PR = "r7"
+PR = "r8"
PROVIDES = "virtual/libintl"
SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
@@ -43,10 +43,5 @@ FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
do_stage () {
- autotools_stage_includes
- oe_libinstall -so -C gettext-tools/lib libgettextlib ${STAGING_LIBDIR}/
- oe_libinstall -so -C gettext-tools/src libgettextpo ${STAGING_LIBDIR}/
- oe_libinstall -so -C gettext-tools/src libgettextsrc ${STAGING_LIBDIR}/
- oe_libinstall -so -C gettext-tools/intl libintl ${STAGING_LIBDIR}/
- oe_libinstall -so -C gettext-runtime/lib libasprintf ${STAGING_LIBDIR}/
+ autotools_stage_all
}
diff --git a/packages/sqlite/sqlite3-3.3.17/.mtn2git_empty b/packages/glib-2.0/glib-2.0-2.16.1/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/sqlite/sqlite3-3.3.17/.mtn2git_empty
+++ b/packages/glib-2.0/glib-2.0-2.16.1/.mtn2git_empty
diff --git a/packages/glib-2.0/glib-2.0-2.16.1/configure-libtool.patch b/packages/glib-2.0/glib-2.0-2.16.1/configure-libtool.patch
new file mode 100644
index 0000000000..a52327c8c9
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0-2.16.1/configure-libtool.patch
@@ -0,0 +1,29 @@
+--- glib-2.12.10/configure.in.orig 2006-06-05 13:34:08.000000000 +0100
++++ glib-2.12.10/configure.in 2006-06-05 13:34:36.000000000 +0100
+@@ -1174,7 +1174,7 @@
+ G_MODULE_LDFLAGS=
+ else
+ export SED
+- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ fi
+ dnl G_MODULE_IMPL= don't reset, so cmd-line can override
+ G_MODULE_NEED_USCORE=0
+@@ -1265,7 +1265,7 @@
+ LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
+ dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
+ echo "void glib_plugin_test(void) { }" > plugin.c
+- ${SHELL} ./libtool --mode=compile ${CC} -shared \
++ ${SHELL} ./$host_alias-libtool --mode=compile ${CC} -shared \
+ -export-dynamic -o plugin.o plugin.c 2>&1 >/dev/null
+ AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
+ glib_cv_rtldglobal_broken,[
+@@ -1339,7 +1339,7 @@
+
+ AC_MSG_CHECKING(for the suffix of shared libraries)
+ export SED
+-shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
++shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
+ eval $shrext_cmds
+ module=yes eval std_shrext=$shrext_cmds
+ # chop the initial dot
diff --git a/packages/glib-2.0/glib-2.0_2.16.1.bb b/packages/glib-2.0/glib-2.0_2.16.1.bb
new file mode 100644
index 0000000000..08ff056c80
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0_2.16.1.bb
@@ -0,0 +1,6 @@
+require glib.inc
+
+SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glib/2.16/glib-${PV}.tar.bz2 \
+ file://glibconfig-sysdefs.h \
+ file://configure-libtool.patch;patch=1 \
+ "
diff --git a/packages/glibc/eglibc-initial_svn.bb b/packages/glibc/eglibc-initial_svn.bb
index 298c775152..cbe4878529 100644
--- a/packages/glibc/eglibc-initial_svn.bb
+++ b/packages/glibc/eglibc-initial_svn.bb
@@ -14,7 +14,7 @@ do_configure () {
find ${S} -name "configure" | xargs touch
CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
--without-cvs --disable-sanity-checks \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
--enable-hacker-mode
if grep -q GLIBC_2.3 ${S}/ChangeLog; then
# glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
diff --git a/packages/glibc/eglibc_svn.bb b/packages/glibc/eglibc_svn.bb
index a03c63b2fb..46846f5ee0 100644
--- a/packages/glibc/eglibc_svn.bb
+++ b/packages/glibc/eglibc_svn.bb
@@ -3,7 +3,7 @@ require glibc.inc
DEFAULT_PREFERENCE = "-1"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/eglibc-svn"
PV = "2.7+svnr${SRCREV}"
-PR = "r2"
+PR = "r3"
SRC_URI = "svn://svn.eglibc.org;module=trunk \
file://etc/ld.so.conf \
file://generate-supported.mk"
@@ -69,47 +69,22 @@ do_configure () {
}
rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
- yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
- rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+ rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
-do_compile () {
- # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
- unset LDFLAGS
+do_compile () {
+ # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+ unset LDFLAGS
base_do_compile
(
- cd ${S}/sunrpc/rpcsvc
- for r in ${rpcsvc}; do
- h=`echo $r|sed -e's,\.x$,.h,'`
- rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
- done
- )
-}
-
-do_stage() {
- # FIXME: this removes files from staging
- # make sure there isn't a conflicting libc in staging
- # this should be solved differently
- rm -f ${STAGING_LIBDIR}/libc.so.6
- oe_runmake 'install_root=${STAGING_DIR_HOST}' \
- 'includedir=${layout_includedir}' 'libdir=${layout_libdir}' 'slibdir=${layout_base_libdir}' \
- '${STAGING_LIBDIR}/libc.so.6' \
- install-headers install-lib
-
- install -d ${STAGING_INCDIR}/gnu \
- ${STAGING_INCDIR}/bits \
- ${STAGING_INCDIR}/rpcsvc
- install -m 0644 ${S}/include/gnu/stubs.h ${STAGING_INCDIR}/gnu/
- install -m 0644 ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
- install -m 0644 misc/syscall-list.h ${STAGING_INCDIR}/bits/syscall.h
- for r in ${rpcsvc}; do
- h=`echo $r|sed -e's,\.x$,.h,'`
- install -m 0644 ${S}/sunrpc/rpcsvc/$h ${STAGING_INCDIR}/rpcsvc/
- done
- for i in libc.a libc_pic.a libc_nonshared.a; do
- install -m 0644 ${B}/$i ${STAGING_LIBDIR}/ || die "failed to install $i"
- done
- echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${STAGING_LIBDIR}/libpthread.so
- echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${STAGING_LIBDIR}/libc.so
+ cd ${S}/sunrpc/rpcsvc
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
+ done
+ )
}
+require glibc-stage.inc
+
require eglibc-package.bbclass
diff --git a/packages/glibc/glibc-initial.inc b/packages/glibc/glibc-initial.inc
index e30e86b5e8..0e5db2e729 100644
--- a/packages/glibc/glibc-initial.inc
+++ b/packages/glibc/glibc-initial.inc
@@ -38,6 +38,10 @@ do_stage () {
mkdir -p ${STAGING_INCDIR}/gnu
touch ${STAGING_INCDIR}/gnu/stubs.h
cp ${S}/include/features.h ${STAGING_INCDIR}/features.h
+
+ if [ -e ${B}/bits/stdio_lim.h ]; then
+ cp ${B}/bits/stdio_lim.h ${STAGING_INCDIR}/bits/
+ fi
}
do_install () {
diff --git a/packages/glibc/glibc-initial_2.5.bb b/packages/glibc/glibc-initial_2.5.bb
index 1e41d218d2..44f5775fd7 100644
--- a/packages/glibc/glibc-initial_2.5.bb
+++ b/packages/glibc/glibc-initial_2.5.bb
@@ -7,7 +7,7 @@ do_configure () {
unset CFLAGS
CC="${BUILD_CC}" CPP="${BUILD_CPP}" LD="${BUILD_LD}" ${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
--without-cvs --disable-sanity-checks \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
--enable-hacker-mode
if grep -q GLIBC_2.5 ${S}/ChangeLog; then
# glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c, which fails without a real cross-compiler.
diff --git a/packages/glibc/glibc_2.2.5.bb b/packages/glibc/glibc_2.2.5.bb
index 2a3bfd26df..b3a779c6ef 100644
--- a/packages/glibc/glibc_2.2.5.bb
+++ b/packages/glibc/glibc_2.2.5.bb
@@ -113,7 +113,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
${GLIBC_EXTRA_OECONF}"
EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
diff --git a/packages/glibc/glibc_2.3.2+cvs20040726.bb b/packages/glibc/glibc_2.3.2+cvs20040726.bb
index c44bf7dd15..21568e24b3 100644
--- a/packages/glibc/glibc_2.3.2+cvs20040726.bb
+++ b/packages/glibc/glibc_2.3.2+cvs20040726.bb
@@ -35,7 +35,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
${GLIBC_EXTRA_OECONF}"
do_configure () {
diff --git a/packages/glibc/glibc_2.3.2.bb b/packages/glibc/glibc_2.3.2.bb
index 9290c9b831..e782ecfa82 100644
--- a/packages/glibc/glibc_2.3.2.bb
+++ b/packages/glibc/glibc_2.3.2.bb
@@ -110,7 +110,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
${GLIBC_EXTRA_OECONF}"
EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
diff --git a/packages/glibc/glibc_2.3.3+cvs20041128.bb b/packages/glibc/glibc_2.3.3+cvs20041128.bb
index 829ef8f64e..0af357a883 100644
--- a/packages/glibc/glibc_2.3.3+cvs20041128.bb
+++ b/packages/glibc/glibc_2.3.3+cvs20041128.bb
@@ -54,7 +54,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
--without-selinux \
${GLIBC_EXTRA_OECONF}"
diff --git a/packages/glibc/glibc_2.3.3+cvs20050221.bb b/packages/glibc/glibc_2.3.3+cvs20050221.bb
index b94025881e..f6a7d43812 100644
--- a/packages/glibc/glibc_2.3.3+cvs20050221.bb
+++ b/packages/glibc/glibc_2.3.3+cvs20050221.bb
@@ -39,7 +39,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
--without-selinux \
${GLIBC_EXTRA_OECONF}"
diff --git a/packages/glibc/glibc_2.3.3+cvs20050420.bb b/packages/glibc/glibc_2.3.3+cvs20050420.bb
index 0a3759b6d2..2894ce835a 100644
--- a/packages/glibc/glibc_2.3.3+cvs20050420.bb
+++ b/packages/glibc/glibc_2.3.3+cvs20050420.bb
@@ -40,7 +40,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
--without-selinux \
${GLIBC_EXTRA_OECONF}"
diff --git a/packages/glibc/glibc_2.3.3.bb b/packages/glibc/glibc_2.3.3.bb
index 46fc230d29..7f2d67e87a 100644
--- a/packages/glibc/glibc_2.3.3.bb
+++ b/packages/glibc/glibc_2.3.3.bb
@@ -55,7 +55,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
${GLIBC_EXTRA_OECONF}"
EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
diff --git a/packages/glibc/glibc_2.3.5+cvs20050627.bb b/packages/glibc/glibc_2.3.5+cvs20050627.bb
index 62cfd21cb9..c916b2ba05 100644
--- a/packages/glibc/glibc_2.3.5+cvs20050627.bb
+++ b/packages/glibc/glibc_2.3.5+cvs20050627.bb
@@ -70,7 +70,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR \
--without-selinux \
${GLIBC_EXTRA_OECONF}"
diff --git a/packages/glibc/glibc_cvs.bb b/packages/glibc/glibc_cvs.bb
index 9dbea14876..63fbba93e7 100644
--- a/packages/glibc/glibc_cvs.bb
+++ b/packages/glibc/glibc_cvs.bb
@@ -56,7 +56,7 @@ EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
--without-cvs --disable-profile --disable-debug --without-gd \
--enable-clocale=gnu \
--enable-add-ons=${GLIBC_ADDONS} \
- --with-headers=${CROSS_DIR}/${TARGET_SYS}/include \
+ --with-headers=${STAGING_INCDIR} \
--without-selinux \
${GLIBC_EXTRA_OECONF}"
diff --git a/packages/sqlite/sqlite3-3.4.1/.mtn2git_empty b/packages/gnome/gnome-vfs-2.22.0/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/sqlite/sqlite3-3.4.1/.mtn2git_empty
+++ b/packages/gnome/gnome-vfs-2.22.0/.mtn2git_empty
diff --git a/packages/gnome/gnome-vfs-2.22.0/gconftool-lossage.patch b/packages/gnome/gnome-vfs-2.22.0/gconftool-lossage.patch
new file mode 100644
index 0000000000..3dbc130ddc
--- /dev/null
+++ b/packages/gnome/gnome-vfs-2.22.0/gconftool-lossage.patch
@@ -0,0 +1,11 @@
+--- gnome-vfs-2.6.0/configure.in~ 2004-03-22 12:36:23.000000000 +0000
++++ gnome-vfs-2.6.0/configure.in 2004-06-07 16:04:34.000000000 +0100
+@@ -154,7 +154,7 @@
+ AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+
+ if test x"$GCONFTOOL" = xno; then
+- AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
++ AC_MSG_WARN([gconftool-2 executable not found in your path - should be installed with GConf])
+ fi
+
+ AM_GCONF_SOURCE_2
diff --git a/packages/gnome/gnome-vfs-2.22.0/gnome-vfs-no-kerberos.patch b/packages/gnome/gnome-vfs-2.22.0/gnome-vfs-no-kerberos.patch
new file mode 100644
index 0000000000..e25ecdd66f
--- /dev/null
+++ b/packages/gnome/gnome-vfs-2.22.0/gnome-vfs-no-kerberos.patch
@@ -0,0 +1,51 @@
+removes kerberos completely to avoid conflicts with installed kerberos
+--- configure.in.orig 2007-01-05 19:42:26.418541610 +0200
++++ configure.in 2007-01-05 19:42:56.604261797 +0200
+@@ -436,47 +436,6 @@
+ ])
+ AM_CONDITIONAL(HAVE_CDDA, test $have_cdda = yes)
+ AC_SUBST(CDDA_LIBS)
+-
+-dnl GSSAPI
+-dnl Check for Kerberos installation
+-have_gssapi=no
+-AC_PATH_PROG([KRB5_CONFIG], krb5-config, none, $PATH:/usr/kerberos/bin)
+-
+-if test "x$KRB5_CONFIG" != "xnone"; then
+- GSSAPI_LIBS="`${KRB5_CONFIG} --libs gssapi`"
+- GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`"
+-
+- saved_CPPFLAGS="$CPPFLAGS"
+- saved_LIBS="$LIBS"
+- LIBS="$LIBS $GSSAPI_LIBS"
+- CPPFLAGS="$CPPFLAGS $GSSAPI_CFLAGS"
+- # MIT and Heimdal put gssapi.h in different places
+- AC_CHECK_HEADERS(gssapi/gssapi.h gssapi.h, [
+- AC_CHECK_FUNCS(gss_init_sec_context, [
+- AC_MSG_NOTICE([GSSAPI authentication support enabled])
+- AC_DEFINE(HAVE_GSSAPI, 1, [Define if GSSAPI support is enabled])
+- AC_CHECK_HEADERS(gssapi/gssapi_generic.h)
+- have_gssapi=yes
+-
+- # MIT Kerberos lacks GSS_C_NT_HOSTBASED_SERVICE
+- AC_CHECK_DECL([GSS_C_NT_HOSTBASED_SERVICE],,
+- [AC_DEFINE([GSS_C_NT_HOSTBASED_SERVICE], gss_nt_service_name,
+- [Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise])
+- ], [
+- #ifdef HAVE_GSSAPI_GSSAPI_H
+- #include <gssapi/gssapi.h>
+- #else
+- #include <gssapi.h>
+- #endif
+- ])
+- ])
+- break
+- ])
+- LIBS="$saved_LIBS"
+- CPPFLAGS="$saved_CPPFLAGS"
+-fi
+-AC_SUBST(GSSAPI_LIBS)
+-AC_SUBST(GSSAPI_CFLAGS)
+
+ dnl ******************************
+ dnl http-method (neon checks)
diff --git a/packages/gnome/gnome-vfs_2.22.0.bb b/packages/gnome/gnome-vfs_2.22.0.bb
new file mode 100644
index 0000000000..5631a9c960
--- /dev/null
+++ b/packages/gnome/gnome-vfs_2.22.0.bb
@@ -0,0 +1,42 @@
+LICENSE = "GPL"
+DEPENDS = "libxml2 gconf gnutls avahi dbus bzip2 gnome-mime-data zlib"
+RRECOMMENDS = "gnome-vfs-plugin-file shared-mime-info"
+# Some legacy packages will require gnome-mime-data to be installed, but use of
+# it is deprecated.
+PR = "r0"
+
+inherit gnome
+
+SRC_URI += "file://gconftool-lossage.patch;patch=1;pnum=1 \
+ file://gnome-vfs-no-kerberos.patch;patch=1;pnum=0"
+
+# This is to provide compatibility with the gnome-vfs DBus fork
+PROVIDES = "gnome-vfs-plugin-dbus"
+RREPLACES = "gnome-vfs-dbus"
+
+EXTRA_OECONF = " \
+ --disable-openssl \
+ --enable-gnutls \
+ --enable-avahi \
+ --with-samba-includes=${STAGING_INCDIR} \
+ "
+
+FILES_${PN} += " ${libdir}/vfs ${datadir}/dbus-1/services"
+FILES_${PN}-dbg += " ${libdir}/gnome-vfs-2.0/modules/.debug"
+FILES_${PN}-dev += " ${libdir}/gnome-vfs-2.0/include"
+FILES_${PN}-doc += " ${datadir}/gtk-doc"
+
+do_stage () {
+autotools_stage_all
+}
+
+PACKAGES_DYNAMIC = "gnome-vfs-plugin-*"
+
+python populate_packages_prepend () {
+ print bb.data.getVar('FILES_gnome-vfs', d, 1)
+
+ plugindir = bb.data.expand('${libdir}/gnome-vfs-2.0/modules/', d)
+ do_split_packages(d, plugindir, '^lib(.*)\.so$', 'gnome-vfs-plugin-%s', 'GNOME VFS plugin for %s')
+}
+
+
diff --git a/packages/gnome/libbonobo_2.14.0.bb b/packages/gnome/libbonobo.inc
index 7b4cbb08e7..9f3642b80b 100644
--- a/packages/gnome/libbonobo_2.14.0.bb
+++ b/packages/gnome/libbonobo.inc
@@ -1,14 +1,14 @@
+DESCRIPTION = "Bonobo CORBA interfaces library"
LICENSE = "GPL"
-PR = "r1"
SECTION = "x11/gnome/libs"
-DESCRIPTION = "Bonobo CORBA interfaces library"
+DEPENDS = "glib-2.0 orbit2 intltool-native libxml2"
inherit gnome
-SRC_URI += "file://configure-gthread.patch;patch=1 \
- file://gtk-doc.m4 \
- file://gtk-doc.make"
-DEPENDS = "glib-2.0 orbit2 intltool-native libxml2"
+SRC_URI += "file://gtk-doc.m4 \
+ file://gtk-doc.make \
+ "
+
ORBIT_IDL_SRC = "${STAGING_BINDIR_NATIVE}/orbit-idl-2"
FILES_${PN} += "${libdir}/orbit-2.0/*.so ${libdir}/bonobo/monikers/*.so"
diff --git a/packages/gnome/libbonobo_2.10.0.bb b/packages/gnome/libbonobo_2.10.0.bb
index 91e81f98ba..c48e7d0753 100644
--- a/packages/gnome/libbonobo_2.10.0.bb
+++ b/packages/gnome/libbonobo_2.10.0.bb
@@ -1,59 +1,3 @@
-LICENSE = "GPL"
-PR = "r1"
-SECTION = "x11/gnome/libs"
-DESCRIPTION = "Bonobo CORBA interfaces library"
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libbonobo/2.10/libbonobo-${PV}.tar.bz2 \
- file://gtk-doc.m4 \
- file://gtk-doc.make"
-DEPENDS = "glib-2.0 orbit2 intltool-native libxml2"
-ORBIT_IDL_SRC = "${STAGING_BINDIR_NATIVE}/orbit-idl-2"
+require libbonobo.inc
-FILES_${PN} += "${libdir}/orbit-2.0/*.so ${libdir}/bonobo/monikers/*.so"
-FILES_${PN}-dev += "${libdir}/orbit-2.0/* ${libdir}/bonobo/monikers/* \
- ${libdir}/bonobo-2.0/samples"
-
-inherit autotools pkgconfig
-
-PARALLEL_MAKE = ""
-
-do_configure_prepend() {
- install -d m4
- install ${WORKDIR}/gtk-doc.m4 m4/
- install ${WORKDIR}/gtk-doc.make ./
-}
-
-ACTIVATION_HEADERS = "Bonobo_Unknown.h Bonobo_GenericFactory.h Bonobo_Activation_types.h \
- bonobo-activation.h bonobo-activation-async.h bonobo-activation-activate.h \
- bonobo-activation-init.h bonobo-activation-shlib.h bonobo-activation-register.h \
- bonobo-activation-server-info.h bonobo-activation-version.h"
-
-BONOBO_HEADERS = "Bonobo.h bonobo-arg.h bonobo-context.h bonobo-event-source.h bonobo-exception.h \
- bonobo-generic-factory.h bonobo-item-container.h bonobo-item-handler.h \
- bonobo-listener.h bonobo-main.h bonobo-macros.h bonobo-moniker-extender.h \
- bonobo-moniker-simple.h bonobo-moniker-util.h bonobo-moniker.h bonobo-object.h \
- bonobo-foreign-object.h bonobo-persist-file.h bonobo-persist-stream.h \
- bonobo-persist.h bonobo-persist-client.h bonobo-property-bag.h \
- bonobo-property-bag-client.h bonobo-shlib-factory.h bonobo-storage.h \
- bonobo-stream.h bonobo-stream-client.h bonobo-stream-memory.h \
- bonobo-storage-memory.h bonobo-xobject.h bonobo-i18n.h bonobo-types.h \
- bonobo-app-client.h bonobo-application.h"
-
-do_compile() {
- oe_runmake ORBIT_IDL="${ORBIT_IDL_SRC}"
-}
-
-do_stage() {
- install -d ${STAGING_INCDIR}/bonobo-activation-2.0/bonobo-activation
- for i in ${ACTIVATION_HEADERS}; do install -m 0644 bonobo-activation/$i ${STAGING_INCDIR}/bonobo-activation-2.0/bonobo-activation/; done
- install -d ${STAGING_INCDIR}/libbonobo-2.0/bonobo
- for i in ${BONOBO_HEADERS}; do install -m 0644 bonobo/$i ${STAGING_INCDIR}/libbonobo-2.0/bonobo/; done
- install -m 0644 libbonobo.h ${STAGING_INCDIR}/libbonobo-2.0/
- install -d ${STAGING_DATADIR}/idl/bonobo-activation-2.0/
- install idl/*.idl ${STAGING_DATADIR}/idl/bonobo-activation-2.0/
- oe_libinstall -so -C bonobo libbonobo-2 ${STAGING_LIBDIR}
- oe_libinstall -so -C bonobo-activation libbonobo-activation ${STAGING_LIBDIR}
-}
-
-do_install() {
- oe_runmake ORBIT_IDL="${ORBIT_IDL_SRC}" DESTDIR="${D}" install
-}
+PR = "r2"
diff --git a/packages/gnome/libbonobo_2.22.0.bb b/packages/gnome/libbonobo_2.22.0.bb
new file mode 100644
index 0000000000..feecaf590a
--- /dev/null
+++ b/packages/gnome/libbonobo_2.22.0.bb
@@ -0,0 +1,6 @@
+require libbonobo.inc
+
+PR = "r0"
+
+SRC_URI += "file://configure-gthread.patch;patch=1"
+
diff --git a/packages/gnome/libbonobo_2.6.0.bb b/packages/gnome/libbonobo_2.6.0.bb
index d08b6bafd1..c071f38afe 100644
--- a/packages/gnome/libbonobo_2.6.0.bb
+++ b/packages/gnome/libbonobo_2.6.0.bb
@@ -1,52 +1,3 @@
-LICENSE = "GPL"
-SECTION = "x11/gnome"
-DESCRIPTION = "Bonobo CORBA interfaces library"
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libbonobo/2.6/libbonobo-${PV}.tar.bz2 \
- file://gtk-doc.m4 \
- file://gtk-doc.make"
-DEPENDS = "glib-2.0 orbit2 intltool-native libxml2"
-ORBIT_IDL_SRC = "${STAGING_BINDIR_NATIVE}/orbit-idl-2"
+require libbonobo.inc
-inherit autotools pkgconfig
-
-do_configure_prepend() {
- install -d m4
- install ${WORKDIR}/gtk-doc.m4 m4/
- install ${WORKDIR}/gtk-doc.make ./
-}
-
-ACTIVATION_HEADERS = "Bonobo_Unknown.h Bonobo_GenericFactory.h Bonobo_Activation_types.h \
- bonobo-activation.h bonobo-activation-async.h bonobo-activation-activate.h \
- bonobo-activation-init.h bonobo-activation-shlib.h bonobo-activation-register.h \
- bonobo-activation-server-info.h bonobo-activation-version.h"
-
-BONOBO_HEADERS = "Bonobo.h bonobo-arg.h bonobo-context.h bonobo-event-source.h bonobo-exception.h \
- bonobo-generic-factory.h bonobo-item-container.h bonobo-item-handler.h \
- bonobo-listener.h bonobo-main.h bonobo-macros.h bonobo-moniker-extender.h \
- bonobo-moniker-simple.h bonobo-moniker-util.h bonobo-moniker.h bonobo-object.h \
- bonobo-foreign-object.h bonobo-persist-file.h bonobo-persist-stream.h \
- bonobo-persist.h bonobo-persist-client.h bonobo-property-bag.h \
- bonobo-property-bag-client.h bonobo-shlib-factory.h bonobo-storage.h \
- bonobo-stream.h bonobo-stream-client.h bonobo-stream-memory.h \
- bonobo-storage-memory.h bonobo-xobject.h bonobo-i18n.h bonobo-types.h \
- bonobo-app-client.h bonobo-application.h"
-
-do_compile() {
- oe_runmake ORBIT_IDL="${ORBIT_IDL_SRC}"
-}
-
-do_stage() {
- install -d ${STAGING_INCDIR}/bonobo-activation-2.0/bonobo-activation
- for i in ${ACTIVATION_HEADERS}; do install -m 0644 bonobo-activation/$i ${STAGING_INCDIR}/bonobo-activation-2.0/bonobo-activation/; done
- install -d ${STAGING_INCDIR}/libbonobo-2.0/bonobo
- for i in ${BONOBO_HEADERS}; do install -m 0644 bonobo/$i ${STAGING_INCDIR}/libbonobo-2.0/bonobo/; done
- install -m 0644 libbonobo.h ${STAGING_INCDIR}/libbonobo-2.0/
- install -d ${STAGING_DATADIR}/idl/bonobo-activation-2.0/
- install idl/*.idl ${STAGING_DATADIR}/idl/bonobo-activation-2.0/
- oe_libinstall -so -C bonobo libbonobo-2 ${STAGING_LIBDIR}
- oe_libinstall -so -C bonobo-activation libbonobo-activation ${STAGING_LIBDIR}
-}
-
-do_install() {
- oe_runmake ORBIT_IDL="${ORBIT_IDL_SRC}" DESTDIR="${D}" install
-}
+PR = "r1"
diff --git a/packages/gnome/libbonobo_2.6.2.bb b/packages/gnome/libbonobo_2.6.2.bb
index 2eee5fd6d8..c48e7d0753 100644
--- a/packages/gnome/libbonobo_2.6.2.bb
+++ b/packages/gnome/libbonobo_2.6.2.bb
@@ -1,59 +1,3 @@
-LICENSE = "GPL"
-PR = "r1"
-SECTION = "x11/gnome/libs"
-DESCRIPTION = "Bonobo CORBA interfaces library"
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libbonobo/2.6/libbonobo-${PV}.tar.bz2 \
- file://gtk-doc.m4 \
- file://gtk-doc.make"
-DEPENDS = "glib-2.0 orbit2 intltool-native libxml2"
-ORBIT_IDL_SRC = "${STAGING_BINDIR_NATIVE}/orbit-idl-2"
+require libbonobo.inc
-FILES_${PN} += "${libdir}/orbit-2.0/*.so ${libdir}/bonobo/monikers/*.so"
-FILES_${PN}-dev += "${libdir}/orbit-2.0/* ${libdir}/bonobo/monikers/* \
- ${libdir}/bonobo-2.0/samples"
-
-inherit autotools pkgconfig
-
-PARALLEL_MAKE = ""
-
-do_configure_prepend() {
- install -d m4
- install ${WORKDIR}/gtk-doc.m4 m4/
- install ${WORKDIR}/gtk-doc.make ./
-}
-
-ACTIVATION_HEADERS = "Bonobo_Unknown.h Bonobo_GenericFactory.h Bonobo_Activation_types.h \
- bonobo-activation.h bonobo-activation-async.h bonobo-activation-activate.h \
- bonobo-activation-init.h bonobo-activation-shlib.h bonobo-activation-register.h \
- bonobo-activation-server-info.h bonobo-activation-version.h"
-
-BONOBO_HEADERS = "Bonobo.h bonobo-arg.h bonobo-context.h bonobo-event-source.h bonobo-exception.h \
- bonobo-generic-factory.h bonobo-item-container.h bonobo-item-handler.h \
- bonobo-listener.h bonobo-main.h bonobo-macros.h bonobo-moniker-extender.h \
- bonobo-moniker-simple.h bonobo-moniker-util.h bonobo-moniker.h bonobo-object.h \
- bonobo-foreign-object.h bonobo-persist-file.h bonobo-persist-stream.h \
- bonobo-persist.h bonobo-persist-client.h bonobo-property-bag.h \
- bonobo-property-bag-client.h bonobo-shlib-factory.h bonobo-storage.h \
- bonobo-stream.h bonobo-stream-client.h bonobo-stream-memory.h \
- bonobo-storage-memory.h bonobo-xobject.h bonobo-i18n.h bonobo-types.h \
- bonobo-app-client.h bonobo-application.h"
-
-do_compile() {
- oe_runmake ORBIT_IDL="${ORBIT_IDL_SRC}"
-}
-
-do_stage() {
- install -d ${STAGING_INCDIR}/bonobo-activation-2.0/bonobo-activation
- for i in ${ACTIVATION_HEADERS}; do install -m 0644 bonobo-activation/$i ${STAGING_INCDIR}/bonobo-activation-2.0/bonobo-activation/; done
- install -d ${STAGING_INCDIR}/libbonobo-2.0/bonobo
- for i in ${BONOBO_HEADERS}; do install -m 0644 bonobo/$i ${STAGING_INCDIR}/libbonobo-2.0/bonobo/; done
- install -m 0644 libbonobo.h ${STAGING_INCDIR}/libbonobo-2.0/
- install -d ${STAGING_DATADIR}/idl/bonobo-activation-2.0/
- install idl/*.idl ${STAGING_DATADIR}/idl/bonobo-activation-2.0/
- oe_libinstall -so -C bonobo libbonobo-2 ${STAGING_LIBDIR}
- oe_libinstall -so -C bonobo-activation libbonobo-activation ${STAGING_LIBDIR}
-}
-
-do_install() {
- oe_runmake ORBIT_IDL="${ORBIT_IDL_SRC}" DESTDIR="${D}" install
-}
+PR = "r2"
diff --git a/packages/gnome/orbit2-native_2.14.0.bb b/packages/gnome/orbit2-native_2.14.12.bb
index 2d52ab7eee..009974ade3 100644
--- a/packages/gnome/orbit2-native_2.14.0.bb
+++ b/packages/gnome/orbit2-native_2.14.12.bb
@@ -1,4 +1,5 @@
DESCRIPTION = "CORBA ORB"
+PR = "r0"
LICENSE = "LGPL GPL"
SECTION = "x11/gnome/libs"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/ORBit2/2.14/ORBit2-${PV}.tar.bz2 \
diff --git a/packages/gnome/orbit2_2.14.0.bb b/packages/gnome/orbit2_2.14.12.bb
index 5ce381f0ad..1ac0136e10 100644
--- a/packages/gnome/orbit2_2.14.0.bb
+++ b/packages/gnome/orbit2_2.14.12.bb
@@ -1,5 +1,5 @@
LICENSE = "GPL"
-PR = "r2"
+PR = "r0"
DESCRIPTION = "CORBA ORB"
SECTION = "x11/gnome/libs"
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/ORBit2/2.14/ORBit2-${PV}.tar.bz2 \
@@ -10,9 +10,13 @@ DEPENDS = "libidl popt orbit2-native gtk-doc"
PARALLEL_MAKE = ""
FILES_${PN} += "${libdir}/orbit-2.0/*.so"
+FILES_${PN}-dev += "${libdir}/orbit-2.0/*.a ${libdir}/orbit-2.0/*.la"
+FILES_${PN}-dbg += "${libdir}/orbit-2.0/.debug"
S = "${WORKDIR}/ORBit2-${PV}"
+LEAD_SONAME = "libORBit-2.so"
+
inherit autotools pkgconfig
EXTRA_OECONF = "--disable-gtk-doc"
@@ -25,8 +29,13 @@ do_configure_prepend() {
}
do_compile_append () {
- sed 's:^orbit_idl=.*/:orbit_idl=${STAGING_BINDIR_NATIVE}/:' < ORBit-2.0.pc > ORBit-2.0.pc.new
- mv ORBit-2.0.pc.new ORBit-2.0.pc
+ cp ORBit-2.0.pc ORBit-2.0.pc.old
+ sed 's:^orbit_idl=.*/:orbit_idl=${STAGING_BINDIR_NATIVE}/:' < ORBit-2.0.pc > ORBit-2.0.pc.new
+ mv ORBit-2.0.pc.new ORBit-2.0.pc
+}
+
+do_install_append () {
+ mv ORBit-2.0.pc.old ORBit-2.0.pc
}
do_stage() {
diff --git a/packages/gnutls/gnutls.inc b/packages/gnutls/gnutls.inc
index 781267093c..6400e80b11 100644
--- a/packages/gnutls/gnutls.inc
+++ b/packages/gnutls/gnutls.inc
@@ -7,10 +7,10 @@ SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2"
inherit autotools binconfig pkgconfig
-EXTRA_OECONF="--with-included-opencdk --with-included-libtasn1"
+EXTRA_OECONF = "--with-included-opencdk --with-included-libtasn1"
# fix wrong dependency
-do_configure_append() {
+do_configure_prepend() {
sed -i s,gcrypt,libgcrypt, lib/gnutls.pc.in
}
diff --git a/packages/gnutls/gnutls_1.4.5.bb b/packages/gnutls/gnutls_1.4.5.bb
index 4c247717ae..749064af65 100644
--- a/packages/gnutls/gnutls_1.4.5.bb
+++ b/packages/gnutls/gnutls_1.4.5.bb
@@ -1,3 +1,3 @@
require gnutls.inc
-PR = "r2"
+PR = "r3"
diff --git a/packages/gnutls/gnutls_1.6.3.bb b/packages/gnutls/gnutls_1.6.3.bb
index cc35d8b7a3..ce10a4b6cf 100644
--- a/packages/gnutls/gnutls_1.6.3.bb
+++ b/packages/gnutls/gnutls_1.6.3.bb
@@ -6,4 +6,4 @@ SRC_URI += "\
file://configure_madness.patch;patch=1 \
"
-PR = "r5"
+PR = "r6"
diff --git a/packages/gpe-su/gpe-su.inc b/packages/gpe-su/gpe-su.inc
new file mode 100644
index 0000000000..3daa0b9e0a
--- /dev/null
+++ b/packages/gpe-su/gpe-su.inc
@@ -0,0 +1,8 @@
+DESCRIPTION = "GPE Graphical root-shell frontend"
+SECTION = "gpe"
+LICENSE = "GPL"
+DEPENDS = "libgpewidget virtual/libintl"
+
+SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
+
+inherit gpe pkgconfig
diff --git a/packages/gpe-su/gpe-su_0.11.bb b/packages/gpe-su/gpe-su_0.11.bb
index 33ee5968af..c13aa877e3 100644
--- a/packages/gpe-su/gpe-su_0.11.bb
+++ b/packages/gpe-su/gpe-su_0.11.bb
@@ -1,12 +1,3 @@
-LICENSE = "GPL"
+require gpe-su.inc
-inherit gpe pkgconfig
-
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Graphical root-shell frontend"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
-
-#FILES_${PN} += " ${datadir}/gpe/pixmaps"
+PR = "r1"
diff --git a/packages/gpe-su/gpe-su_0.14.bb b/packages/gpe-su/gpe-su_0.14.bb
index c8e500b3a9..c13aa877e3 100644
--- a/packages/gpe-su/gpe-su_0.14.bb
+++ b/packages/gpe-su/gpe-su_0.14.bb
@@ -1,10 +1,3 @@
-LICENSE = "GPL"
+require gpe-su.inc
-inherit gpe pkgconfig
-
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Graphical root-shell frontend"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
+PR = "r1"
diff --git a/packages/gpe-su/gpe-su_0.15.bb b/packages/gpe-su/gpe-su_0.15.bb
index c8e500b3a9..c13aa877e3 100644
--- a/packages/gpe-su/gpe-su_0.15.bb
+++ b/packages/gpe-su/gpe-su_0.15.bb
@@ -1,10 +1,3 @@
-LICENSE = "GPL"
+require gpe-su.inc
-inherit gpe pkgconfig
-
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Graphical root-shell frontend"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
+PR = "r1"
diff --git a/packages/gpe-su/gpe-su_0.18.bb b/packages/gpe-su/gpe-su_0.18.bb
index c8e500b3a9..c13aa877e3 100644
--- a/packages/gpe-su/gpe-su_0.18.bb
+++ b/packages/gpe-su/gpe-su_0.18.bb
@@ -1,10 +1,3 @@
-LICENSE = "GPL"
+require gpe-su.inc
-inherit gpe pkgconfig
-
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Graphical root-shell frontend"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
+PR = "r1"
diff --git a/packages/gpe-su/gpe-su_0.19.bb b/packages/gpe-su/gpe-su_0.19.bb
index c8e500b3a9..c13aa877e3 100644
--- a/packages/gpe-su/gpe-su_0.19.bb
+++ b/packages/gpe-su/gpe-su_0.19.bb
@@ -1,10 +1,3 @@
-LICENSE = "GPL"
+require gpe-su.inc
-inherit gpe pkgconfig
-
-DEPENDS = "libgpewidget"
-SECTION = "gpe"
-
-DESCRIPTION = "GPE Graphical root-shell frontend"
-
-SRC_URI = "${GPE_MIRROR}/${PN}-${PV}.tar.gz"
+PR = "r1"
diff --git a/packages/gpe-su/gpe-su_svn.bb b/packages/gpe-su/gpe-su_svn.bb
index 113fc4abd4..73d36855e9 100644
--- a/packages/gpe-su/gpe-su_svn.bb
+++ b/packages/gpe-su/gpe-su_svn.bb
@@ -1,9 +1,6 @@
-DESCRIPTION = "GPE Graphical root-shell frontend"
-SECTION = "gpe"
-LICENSE = "GPL"
-DEPENDS = "libgpewidget"
+require gpe-su.inc
-inherit pkgconfig
+PR = "r1"
SRC_URI = "${GPE_SVN} \
file://svn-build.patch;patch=1"
diff --git a/packages/gpsdrive/files/gpsdrive.desktop b/packages/gpsdrive/files/gpsdrive.desktop
index 32050e27ba..13d0b4fcce 100644
--- a/packages/gpsdrive/files/gpsdrive.desktop
+++ b/packages/gpsdrive/files/gpsdrive.desktop
@@ -2,8 +2,8 @@
Name=GPSDrive
Comment=GPS map software
Exec=gpsdrive -p -1
-Terminal=0
+Terminal=false
Type=Application
-Icon=gpsicon.png
-Categories=Application;Other
-StartupNotify=False
+Icon=gpsicon
+Categories=Graphics;Network;Geography;
+StartupNotify=false
diff --git a/packages/gpsdrive/gpsdrive-pda_2.10pre2.bb b/packages/gpsdrive/gpsdrive-pda_2.10pre2.bb
index 6350053768..e79240e392 100644
--- a/packages/gpsdrive/gpsdrive-pda_2.10pre2.bb
+++ b/packages/gpsdrive/gpsdrive-pda_2.10pre2.bb
@@ -1,34 +1,29 @@
-inherit autotools pkgconfig
+require gpsdrive.inc
+
+PR = "r2"
-PR = "r1"
DESCRIPTION = "GPS navigation/map display software, PDA-optimized version"
HOMEPAGE = "http://www.gedanken.demon.co.uk/gpsdrive-ipaq/"
-DEPENDS = "virtual/libc gtk+ libpcre gpsd"
-RDEPENDS_${PN} = "gdk-pixbuf-loader-gif gpsd"
-SECTION = "x11"
-PRIORITY = "optional"
-LICENSE = "GPL"
-
-inherit pkgconfig
SRC_URI = "http://www.gedanken.demon.co.uk/gpsdrive-ipaq/gpsdrive-2.10pre2-ipaq-r4.tar.gz \
+ file://gpsdrive.desktop \
file://makefile.patch;patch=1 "
S = "${WORKDIR}/gpsdrive-2.10pre2-ipaq"
-FILES_${PN} = "${bindir}/gpsdrive ${datadir}/gpsdrive ${datadir}/pixmaps ${datadir}/applications"
-FILES_${PN} += "${datadir}/${PN}"
-
-do_compile () {
+do_compile() {
oe_runmake "CC=${CC}" "LD=${CC}" "STRIP=${STRIP}" all
}
-do_install () {
+do_install() {
mkdir -p ${D}${datadir}
cp -a ipkg-data/usr/share/* ${D}${datadir}/
cp -a README.iPAQ.txt ${D}${datadir}/gpsdrive
cp -a COPYING ${D}${datadir}/gpsdrive
cp -a original-docs ${D}${datadir}/gpsdrive
+
mkdir -p ${D}${bindir}
install -m 0755 gpsdrive ${D}${bindir}/
}
+
+FILES_${PN} += "${datadir}/gpsdrive"
diff --git a/packages/gpsdrive/gpsdrive.inc b/packages/gpsdrive/gpsdrive.inc
new file mode 100644
index 0000000000..562990d278
--- /dev/null
+++ b/packages/gpsdrive/gpsdrive.inc
@@ -0,0 +1,25 @@
+DESCRIPTION = "GPS navigation/map display software"
+HOMEPAGE = "http://www.gpsdrive.de/"
+AUTHOR = ""Fritz Ganter gpsdrive@warbase.selwerd.nl"
+SECTION = "x11/applications"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "virtual/libc gtk+ libpcre gpsd"
+RDEPENDS_${PN} = "gdk-pixbuf-loader-gif gpsd"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-garmin"
+
+CFLAGS += "-D_GNU_SOURCE"
+
+do_install_append() {
+ mkdir -p ${D}${datadir}/applications
+ install -m 0644 ${WORKDIR}/*.desktop ${D}${datadir}/applications/gpsdrive.desktop
+
+ # gpsd is provided by RDEPENDS
+ if test -e ${D}${bindir}/gpsd
+ then
+ rm ${D}${bindir}/gpsd
+ fi
+}
diff --git a/packages/gpsdrive/gpsdrive_2.10pre2.bb b/packages/gpsdrive/gpsdrive_2.10pre2.bb
index f44c5925d2..4d6abf9a85 100644
--- a/packages/gpsdrive/gpsdrive_2.10pre2.bb
+++ b/packages/gpsdrive/gpsdrive_2.10pre2.bb
@@ -1,27 +1,6 @@
-inherit autotools pkgconfig
+require gpsdrive.inc
-PR = "r1"
-PACKAGES += "gpsdrive-add"
-DESCRIPTION = "GPS navigation/map display software"
-DEPENDS = "virtual/libc gtk+ libpcre gpsd"
-RDEPENDS_${PN} = "gdk-pixbuf-loader-gif gpsd"
-SECTION = "x11"
-PRIORITY = "optional"
-LICENSE = "GPL"
+PR = "r2"
SRC_URI = "http://www.gpsdrive.de/packages/${PN}-${PV}.tar.gz \
file://gpsdrive.desktop"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-FILES_${PN} = "${bindir}/gpsdrive ${bindir}/wpcvt ${bindir}/wpget ${datadir}/pixmaps ${datadir}/applications"
-FILES_${PN} += "${datadir}/${PN}"
-
-FILES_gpsdrive-add = "${libdir}"
-
-EXTRA_OECONF = "--disable-garmin"
-
-do_install_append () {
- mkdir -p ${D}${datadir}/applications
- install -m 0644 ${WORKDIR}/gpsdrive.desktop ${D}${datadir}/applications/gpsdrive.desktop
-}
diff --git a/packages/gpsdrive/gpsdrive_2.10pre3.bb b/packages/gpsdrive/gpsdrive_2.10pre3.bb
deleted file mode 100644
index 6a97344260..0000000000
--- a/packages/gpsdrive/gpsdrive_2.10pre3.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-inherit autotools pkgconfig
-
-PR = "r1"
-DEFAULT_PREFERENCE="-1"
-
-PACKAGES += "gpsdrive-add"
-DESCRIPTION = "GPS navigation/map display software"
-DEPENDS = "virtual/libc gtk+ libpcre gpsd"
-RDEPENDS_${PN} = "gdk-pixbuf-loader-gif gpsd"
-SECTION = "x11"
-PRIORITY = "optional"
-LICENSE = "GPL"
-
-SRC_URI = "http://www.gpsdrive.de/packages/${PN}-${PV}.tar.gz \
- file://gpsdrive.desktop"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-FILES_${PN} = "${bindir}/gpsdrive ${bindir}/wpcvt ${bindir}/wpget ${datadir}/pixmaps ${datadir}/applications"
-FILES_${PN} += "${datadir}/${PN}"
-
-FILES_gpsdrive-add = "${libdir}"
-
-EXTRA_OECONF = "--disable-garmin"
-
-do_install_append () {
- mkdir -p ${D}${datadir}/applications
- install -m 0644 ${WORKDIR}/gpsdrive.desktop ${D}${datadir}/applications/gpsdrive.desktop
-}
diff --git a/packages/gpsdrive/gpsdrive_2.10pre4.bb b/packages/gpsdrive/gpsdrive_2.10pre4.bb
index 071a5691e3..102a917c1f 100644
--- a/packages/gpsdrive/gpsdrive_2.10pre4.bb
+++ b/packages/gpsdrive/gpsdrive_2.10pre4.bb
@@ -1,10 +1,9 @@
-DESCRIPTION = "GPS navigation/map display software"
-SECTION = "x11"
-PRIORITY = "optional"
-LICENSE = "GPL"
-DEPENDS = "virtual/libc gtk+ libpcre gpsd libwww-perl-native mysql"
-RDEPENDS_${PN} = "gdk-pixbuf-loader-gif gpsd libwww-perl"
-PR = "r1"
+require gpsdrive.inc
+
+DEPENDS += "libwww-perl-native libart-lgpl libxml2 cairo mysql"
+RDEPENDS_${PN} += "libwww-perl"
+
+PR = "r2"
SRC_URI = "http://www.gpsdrive.de/packages/${PN}-${PV}.tar.gz \
file://gpsdrive_2.10pre4.desktop \
@@ -12,10 +11,6 @@ SRC_URI = "http://www.gpsdrive.de/packages/${PN}-${PV}.tar.gz \
file://gpsdrive-ifdef-mapnik.patch;patch=1 \
file://gpsdrive-2.10pre4-openstreetmap-download.patch;patch=1"
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-garmin"
-
do_install_append () {
mkdir -p ${D}${datadir}/applications
install -m 0644 ${WORKDIR}/gpsdrive_2.10pre4.desktop ${D}${datadir}/applications/gpsdrive.desktop
@@ -36,7 +31,3 @@ FILES_${PN}-map-icons-classic = "${datadir}/map-icons/classic.small"
FILES_${PN}-map-icons-other = "${datadir}/map-icons/classic.big ${datadir}/map-icons/japan ${datadir}/map-icons/nickw ${datadir}/map-icons/square.big ${datadir}/map-icons/square.small ${datadir}/map-icons/svg"
FILES_${PN}-maps = "${datadir}/${PN}/maps ${datadir}/${PN}/map_koord.txt"
FILES_${PN}-doc = "${datadir}/man ${datadir}/${PN}/Documentation"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-DEFAULT_PREFERENCE = "1"
diff --git a/packages/gpsdrive/gpsdrive_cvs.bb b/packages/gpsdrive/gpsdrive_cvs.bb
deleted file mode 100644
index 6cb78065ea..0000000000
--- a/packages/gpsdrive/gpsdrive_cvs.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-inherit autotools pkgconfig
-
-PR = "r1"
-#Remove the dash below when 2.10pre3 changes in PV
-PV = "2.10pre3+cvs-${SRCDATE}"
-DEFAULT_PREFERENCE="-1"
-
-PACKAGES += "gpsdrive-add"
-DESCRIPTION = "GPS navigation/map display software"
-DEPENDS = "virtual/libc libart-lgpl gtk+ libpcre gpsd"
-RDEPENDS_${PN} = "gdk-pixbuf-loader-gif gpsd"
-SECTION = "x11"
-PRIORITY = "optional"
-LICENSE = "GPL"
-
-SRC_URI = "cvs://anonymous@cvs.gpsdrive.cc/cvsroot;module=gpsdrive \
- file://gpsdrive.desktop"
-
-S = "${WORKDIR}/gpsdrive"
-CFLAGS += "-D_GNU_SOURCE"
-
-FILES_${PN} = "${bindir}/gpsdrive ${bindir}/wpcvt ${bindir}/wpget ${datadir}/pixmaps ${datadir}/applications"
-FILES_${PN} += "${datadir}/${PN}"
-
-FILES_gpsdrive-add = "${libdir}"
-
-EXTRA_OECONF = "--disable-garmin"
-
-do_install_append () {
- mkdir -p ${D}${datadir}/applications
- install -m 0644 ${WORKDIR}/gpsdrive.desktop ${D}${datadir}/applications/gpsdrive.desktop
-}
diff --git a/packages/gstreamer/gst-plugins-bad_0.10.3.bb b/packages/gstreamer/gst-plugins-bad_0.10.3.bb
deleted file mode 100644
index 3e487314be..0000000000
--- a/packages/gstreamer/gst-plugins-bad_0.10.3.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require gst-plugins.inc
-
-DEPENDS += "gst-plugins-base directfb"
-SRC_URI += "file://cross-compile.patch;patch=1"
-PR = "r6"
diff --git a/packages/gstreamer/gst-plugins-bad_0.10.5.bb b/packages/gstreamer/gst-plugins-bad_0.10.6.bb
index ce61d10010..2a998589ac 100644
--- a/packages/gstreamer/gst-plugins-bad_0.10.5.bb
+++ b/packages/gstreamer/gst-plugins-bad_0.10.6.bb
@@ -8,5 +8,3 @@ do_compile_prepend() {
# work around missing files in upstream tarball (upstream bug #454078)
install -m 0644 ${WORKDIR}/vorbis*.h ${S}/ext/ivorbis/
}
-
-PR = "r1"
diff --git a/packages/gstreamer/gst-plugins-base_0.10.12.bb b/packages/gstreamer/gst-plugins-base_0.10.12.bb
deleted file mode 100644
index 33b189a0ff..0000000000
--- a/packages/gstreamer/gst-plugins-base_0.10.12.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require gst-plugins.inc
-
-PROVIDES += "gst-plugins"
-
-# gst-plugins-base only builds the alsa plugin
-# if alsa has been built and is present. You will
-# not get an error if this is not present, just
-# a missing alsa plugin
-DEPENDS += "alsa-lib"
-
-PR = "r2"
-
diff --git a/packages/gstreamer/gst-plugins-base_0.10.14.bb b/packages/gstreamer/gst-plugins-base_0.10.14.bb
deleted file mode 100644
index 33b189a0ff..0000000000
--- a/packages/gstreamer/gst-plugins-base_0.10.14.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require gst-plugins.inc
-
-PROVIDES += "gst-plugins"
-
-# gst-plugins-base only builds the alsa plugin
-# if alsa has been built and is present. You will
-# not get an error if this is not present, just
-# a missing alsa plugin
-DEPENDS += "alsa-lib"
-
-PR = "r2"
-
diff --git a/packages/gstreamer/gst-plugins-good_0.10.6.bb b/packages/gstreamer/gst-plugins-good_0.10.6.bb
deleted file mode 100644
index e009145ead..0000000000
--- a/packages/gstreamer/gst-plugins-good_0.10.6.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require gst-plugins.inc
-
-EXTRA_OECONF += "--with-check=no"
-DEPENDS += "gst-plugins-base"
-PR = "r3"
diff --git a/packages/gstreamer/gst-plugins-good_0.10.5.bb b/packages/gstreamer/gst-plugins-good_0.10.7.bb
index e009145ead..e84c4801f1 100644
--- a/packages/gstreamer/gst-plugins-good_0.10.5.bb
+++ b/packages/gstreamer/gst-plugins-good_0.10.7.bb
@@ -2,4 +2,3 @@ require gst-plugins.inc
EXTRA_OECONF += "--with-check=no"
DEPENDS += "gst-plugins-base"
-PR = "r3"
diff --git a/packages/gstreamer/gst-plugins-ugly_0.10.6.bb b/packages/gstreamer/gst-plugins-ugly_0.10.6.bb
deleted file mode 100644
index c88a4db990..0000000000
--- a/packages/gstreamer/gst-plugins-ugly_0.10.6.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require gst-plugins.inc
-
-DEPENDS += "gst-plugins-base mpeg2dec libsidplay"
-PR = "r3"
-
-SRC_URI += "file://cross-compile.patch;patch=1 \
- file://gstmad_16bit.patch;patch=1 \
- file://gstsid_autofoo_HACK.patch;patch=1"
-
diff --git a/packages/gstreamer/gst-plugins-ugly_0.10.7.bb b/packages/gstreamer/gst-plugins-ugly_0.10.7.bb
new file mode 100644
index 0000000000..fd008b065a
--- /dev/null
+++ b/packages/gstreamer/gst-plugins-ugly_0.10.7.bb
@@ -0,0 +1,10 @@
+require gst-plugins.inc
+PR = "r0"
+
+DEPENDS += "gst-plugins-base mpeg2dec libsidplay"
+
+SRC_URI += "\
+# file://cross-compile.patch;patch=1 \
+ file://gstmad_16bit.patch;patch=1 \
+ file://gstsid_autofoo_HACK.patch;patch=1 \
+"
diff --git a/packages/gstreamer/gst-plugins.inc b/packages/gstreamer/gst-plugins.inc
index 8e8fd0f1ca..66546d5f2b 100644
--- a/packages/gstreamer/gst-plugins.inc
+++ b/packages/gstreamer/gst-plugins.inc
@@ -24,3 +24,6 @@ python populate_packages_prepend () {
}
ALLOW_EMPTY = "1"
+
+FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug"
+
diff --git a/packages/gstreamer/gstreamer/po-makefile-fix.patch b/packages/gstreamer/gstreamer/po-makefile-fix.patch
new file mode 100644
index 0000000000..774c21c189
--- /dev/null
+++ b/packages/gstreamer/gstreamer/po-makefile-fix.patch
@@ -0,0 +1,13 @@
+Index: gstreamer-0.10.17/po/Makefile.in.in
+===================================================================
+--- gstreamer-0.10.17.orig/po/Makefile.in.in 2008-01-25 23:21:31.000000000 +0800
++++ gstreamer-0.10.17/po/Makefile.in.in 2008-03-20 19:10:54.000000000 +0800
+@@ -30,7 +30,7 @@
+ INSTALL = @INSTALL@
+ INSTALL_DATA = @INSTALL_DATA@
+ MKINSTALLDIRS = @MKINSTALLDIRS@
+-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
++mkinstalldirs = $(MKINSTALLDIRS)
+
+ GMSGFMT = @GMSGFMT@
+ MSGFMT = @MSGFMT@
diff --git a/packages/gstreamer/gstreamer_0.10.12.bb b/packages/gstreamer/gstreamer_0.10.12.bb
deleted file mode 100644
index 49d7f37053..0000000000
--- a/packages/gstreamer/gstreamer_0.10.12.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require gstreamer.inc
-
-PR = "r1" \ No newline at end of file
diff --git a/packages/gstreamer/gstreamer_0.10.14.bb b/packages/gstreamer/gstreamer_0.10.14.bb
deleted file mode 100644
index 9e9ae62cb1..0000000000
--- a/packages/gstreamer/gstreamer_0.10.14.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require gstreamer.inc
-
-PR = "r0"
diff --git a/packages/gstreamer/gstreamer_0.10.17.bb b/packages/gstreamer/gstreamer_0.10.17.bb
index 9e9ae62cb1..b2e5daf671 100644
--- a/packages/gstreamer/gstreamer_0.10.17.bb
+++ b/packages/gstreamer/gstreamer_0.10.17.bb
@@ -1,3 +1,6 @@
require gstreamer.inc
-PR = "r0"
+PR = "r1"
+
+SRC_URI += "file://po-makefile-fix.patch;patch=1"
+
diff --git a/packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb b/packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb
index 2896079e8e..702e460138 100644
--- a/packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb
+++ b/packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb
@@ -24,6 +24,7 @@ do_compile() {
do_stage() {
cd gdk-pixbuf && oe_runmake install
+ find ${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
}
do_install() {
diff --git a/packages/gtk+/gtk+.inc b/packages/gtk+/gtk+.inc
index 1a8236aa34..2505c344bb 100644
--- a/packages/gtk+/gtk+.inc
+++ b/packages/gtk+/gtk+.inc
@@ -8,6 +8,8 @@ DEPENDS = "glib-2.0 tiff pango atk jpeg libpng libxext libxcursor gtk-doc libgcr
inherit autotools pkgconfig
+LEAD_SONAME = "libgtk-x11-2.0.so"
+
FILES_${PN} = "${bindir}/gdk-pixbuf-query-loaders \
${bindir}/gtk-update-icon-cache \
${bindir}/gtk-query-immodules-2.0 \
@@ -21,6 +23,7 @@ FILES_${PN}-dev += " \
${libdir}/gtk-2.0/${LIBV}/loaders/*.la \
${libdir}/gtk-2.0/${LIBV}/immodules/*.la \
${libdir}/gtk-2.0/${LIBV}/engines/*.la \
+ ${libdir}/gtk-2.0/${LIBV}/printbackends/*.la \
${bindir}/gdk-pixbuf-csource \
${bindir}/gtk-builder-convert"
diff --git a/packages/gtk+/gtk+_2.12.0.bb b/packages/gtk+/gtk+_2.12.0.bb
index 57ba24e796..61d6a81aa3 100644
--- a/packages/gtk+/gtk+_2.12.0.bb
+++ b/packages/gtk+/gtk+_2.12.0.bb
@@ -1,6 +1,6 @@
require gtk+.inc
-PR = "r1"
+PR = "r2"
DEPENDS += "cairo"
diff --git a/packages/gtk+/gtk+_2.12.3.bb b/packages/gtk+/gtk+_2.12.3.bb
index 689071d776..3d3bd0c8cf 100644
--- a/packages/gtk+/gtk+_2.12.3.bb
+++ b/packages/gtk+/gtk+_2.12.3.bb
@@ -1,6 +1,6 @@
require gtk+.inc
-PR = "r0"
+PR = "r1"
DEPENDS += "cairo"
diff --git a/packages/images/liveramdisk-image.bb b/packages/images/liveramdisk-image.bb
index b3c288ec31..5d2362353b 100644
--- a/packages/images/liveramdisk-image.bb
+++ b/packages/images/liveramdisk-image.bb
@@ -12,6 +12,11 @@ export IMAGE_BASENAME = "liveramdisk"
export IMAGE_LINGUAS = ""
# Install only ${IMAGE_INSTALL}, not even deps
-PACKAGE_INSTALL_NO_DEPS = "1"
+#PACKAGE_INSTALL_NO_DEPS = "1"
+
+# Remove any kernel-image that the kernel-module-* packages may have pulled in.
+PACKAGE_REMOVE = "kernel-image-* update-modules module-init-tools-depmod uclibc update-rc.d"
+ROOTFS_POSTPROCESS_COMMAND += "ipkg-cl ${IPKG_ARGS} -force-depends \
+ remove ${PACKAGE_REMOVE};"
inherit image
diff --git a/packages/images/openmoko-image.bb b/packages/images/openmoko-image.bb
index 9dd849608d..6600d8436c 100644
--- a/packages/images/openmoko-image.bb
+++ b/packages/images/openmoko-image.bb
@@ -16,3 +16,6 @@ IMAGE_INSTALL += "\
DEPENDS += "\
task-openmoko \
"
+
+inherit image
+
diff --git a/packages/images/opie-image-16mb.bb b/packages/images/opie-image-16mb.bb
index 42bf611880..3abab2e726 100644
--- a/packages/images/opie-image-16mb.bb
+++ b/packages/images/opie-image-16mb.bb
@@ -1,6 +1,6 @@
IMAGE_LINGUAS = ""
-DEPENDS = "${MACHINE_TASK_PROVIDER} task-opie-16mb"
+DEPENDS = "task-boot task-opie-16mb"
IMAGE_INSTALL = "task-boot \
ipkg ipkg-collateral \
@@ -14,6 +14,6 @@ IMAGE_INSTALL = "task-boot \
task-opie-irda"
# create /etc/timestamp from build date
-IMAGE_PREPROCESS_COMMAND = "merge_feeds; create_etc_timestamp"
+IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp"
inherit image
diff --git a/packages/images/opie-image.bb b/packages/images/opie-image.bb
index 04c1f260e8..54e38c498f 100644
--- a/packages/images/opie-image.bb
+++ b/packages/images/opie-image.bb
@@ -1,8 +1,8 @@
IMAGE_LINGUAS = ""
-DEPENDS = "${MACHINE_TASK_PROVIDER} task-opie"
+DEPENDS = "task-base task-opie"
-IMAGE_INSTALL = "${MACHINE_TASK_PROVIDER} task-opie-base task-opie-base-applets \
+IMAGE_INSTALL = "task-base-extended task-opie-base task-opie-base-applets \
task-opie-base-inputmethods task-opie-base-apps \
task-opie-base-settings task-opie-base-decorations \
task-opie-base-styles task-opie-base-pim \
diff --git a/packages/initrdscripts/files/01-bootldr-buster.sh b/packages/initrdscripts/files/01-bootldr-buster.sh
new file mode 100644
index 0000000000..c3b79b5328
--- /dev/null
+++ b/packages/initrdscripts/files/01-bootldr-buster.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+cmdl=`cat /proc/cmdline`
+#cmdl="console=ttySA0,115200 console=ttySB0,115200"
+if expr "$cmdl" : '.*mtdparts=ipaq' > /dev/null; then
+ echo "!!!!!!!!"
+ echo "Detected Compaq bootldr or derivative"
+ echo "Kernel command line is assumed to be bogus and ignored"
+ echo "!!!!!!!!"
+ CMDLINE="console=ttyS0,115200 console=tty0"
+ sleep 3
+fi
+
+# The main trouble is the bogus console=ttySA0 passed by bootldr
+# It appears that kernel doesn't have protection against only invalid
+# consoles being passed on the command line, which means that the
+# kernel is deaf and dumb when booted by bootldr
+
+INVALID_CONSOLE=0
+VALID_CONSOLE=0
+
+for arg in $cmdl; do
+ optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
+ case $arg in
+ console=*)
+ if expr "$optarg" : 'ttySA[0-9]\+' > /dev/null; then
+ INVALID_CONSOLE=1
+ elif expr "$optarg" : 'ttyS\?[0-9]\+' > /dev/null; then
+ VALID_CONSOLE=1
+ fi
+ ;;
+ esac
+done
+
+if [ $INVALID_CONSOLE -eq 1 -a $VALID_CONSOLE -eq 0 ]; then
+ echo "!!!!!!!!"
+ echo "No valid system console is detected"
+ echo "Explicitly using /dev/tty0 for input/output"
+ echo "!!!!!!!!"
+ CONSOLE="/dev/tty0"
+fi
diff --git a/packages/initrdscripts/files/30-bootmenu.sh b/packages/initrdscripts/files/30-bootmenu.sh
index 3f3b8c7079..c77bd662af 100644
--- a/packages/initrdscripts/files/30-bootmenu.sh
+++ b/packages/initrdscripts/files/30-bootmenu.sh
@@ -29,14 +29,14 @@ add_menu_item()
}
show_menu() {
- echo -e -n "${E}3;0H"
+ echo -e -n "${E}3;0H" >$CONSOLE
cnt=0
echo -e $list | \
while read l; do
if [ $cnt == $num ]; then
- echo -e -n "${E}1m"
+ echo -e -n "${E}1m" >$CONSOLE
fi
- echo -e "$cnt: $l${E}0m"
+ echo -e "$cnt: $l${E}0m" >$CONSOLE
cnt=$((cnt + 1))
done
}
@@ -82,7 +82,8 @@ while read maj min nblk dev; do
get_partition_type
if [ "$fstype" != "ext2" -a "$fstype" != "ext3" -a "$fstype" != "vfat" -a "$fstype" != "jffs2" ]; then
-# continue
+ # Comment following line to show all available block devices regardless of FS (for debug purposes)
+ continue
true
fi
@@ -101,14 +102,14 @@ total=`echo -e $list | wc -l`
num=0
# Draw UI
-stty -echo
-echo -e -n "${E}2J"
-echo -e -n "${E}0;0H"
-echo "Select boot image:"
+stty -F $CONSOLE -echo
+echo -e -n "${E}2J" >$CONSOLE
+echo -e -n "${E}0;0H" >$CONSOLE
+echo "Select boot image:" >$CONSOLE
# Main loop
show_menu
-while read -n1 i; do
+while read -s -n1 i; do
case "$i" in
"A")
num=$((num - 1))
@@ -131,7 +132,7 @@ while read -n1 i; do
esac
show_menu
# echo "*$esc$i"
-done
+done < $CONSOLE
stty echo
@@ -162,8 +163,8 @@ else
CMDLINE="$CMDLINE root=$ROOT_DEVICE"
fi
-echo ROOT_DEVICE=$ROOT_DEVICE
-echo CMDLINE=$CMDLINE
+echo ROOT_DEVICE=$ROOT_DEVICE >$CONSOLE
+echo CMDLINE=$CMDLINE >$CONSOLE
##############################
fi
diff --git a/packages/initrdscripts/files/87-kexecboot.sh b/packages/initrdscripts/files/87-kexecboot.sh
index 9232934f98..2a51b4d9c8 100644
--- a/packages/initrdscripts/files/87-kexecboot.sh
+++ b/packages/initrdscripts/files/87-kexecboot.sh
@@ -3,15 +3,15 @@
if [ -n "$BOOT_ROOT" -a -f "$BOOT_ROOT/boot/zImage" ]; then
if ! expr "$CMDLINE" : '.*nokexec'; then
- echo "Kernel found in rootfs:"
- ls -l "$BOOT_ROOT/boot/zImage"
+ echo "Kernel found in rootfs:" >$CONSOLE
+ ls -l "$BOOT_ROOT/boot/zImage" >$CONSOLE
initramfs=""
if [ -f "$BOOT_ROOT/boot/initramfs.bin" ]; then
echo "Initramfs found in rootfs:"
ls -l "$BOOT_ROOT/boot/initramfs.bin"
initramfs="--initrd=$BOOT_ROOT/boot/initramfs.bin"
fi
- echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec"
+ echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec" >$CONSOLE
sleep 10
/usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec"
sleep 10000
diff --git a/packages/initrdscripts/files/init.sh b/packages/initrdscripts/files/init.sh
index 8b9fe12429..60d2e5da8b 100644
--- a/packages/initrdscripts/files/init.sh
+++ b/packages/initrdscripts/files/init.sh
@@ -25,7 +25,7 @@ dev_setup()
}
read_args() {
- CMDLINE=`cat /proc/cmdline`
+ [ -z "$CMDLINE" ] && CMDLINE=`cat /proc/cmdline`
for arg in $CMDLINE; do
optarg=`expr "x$arg" : 'x[^=]*=\(.*\)'`
case $arg in
@@ -40,7 +40,8 @@ read_args() {
}
load_modules() {
- for module in $MODULE_DIR/*; do
+ for module in $MODULE_DIR/$1; do
+ # Cannot redir to $CONSOLE here easily - may not be set yet
echo "initramfs: Loading $module module"
source $module
done
@@ -52,24 +53,34 @@ boot_root() {
}
fatal() {
- echo $1
- echo
+ echo $1 >$CONSOLE
+ echo >$CONSOLE
exec sh
}
echo "Starting initramfs boot..."
early_setup
+load_modules '0*'
+
+[ -z "$CONSOLE" ] && CONSOLE="/dev/console"
+
read_args
+if [ -z "$rootdelay" ]; then
+ echo "rootdelay parameter was not passed on kernel command line - assuming 2s delay"
+ echo "If you would like to avoid this delay, pass explicit rootdelay=0"
+ rootdelay="2"
+fi
if [ -n "$rootdelay" ]; then
- echo "Waiting $rootdelay seconds for devices to settle..."
+ echo "Waiting $rootdelay seconds for devices to settle..." >$CONSOLE
sleep $rootdelay
fi
dev_setup
-load_modules
+load_modules '[1-9]*'
+
[ -n "$BOOT_ROOT" ] && boot_root
fatal "No valid root device was specified. Please add root=/dev/something to the kernel command-line and try again."
diff --git a/packages/initrdscripts/initramfs-jffs2/jffs2boot.sh b/packages/initrdscripts/initramfs-jffs2/jffs2boot.sh
index 18f4d93273..f81fc5226f 100644
--- a/packages/initrdscripts/initramfs-jffs2/jffs2boot.sh
+++ b/packages/initrdscripts/initramfs-jffs2/jffs2boot.sh
@@ -4,6 +4,7 @@ echo "Starting initrd boot..."
mkdir /proc
mount -t proc proc /proc
+modprobe -q mtdblock
modprobe mtdram total_size=25088 erase_size=256
sleep 1
diff --git a/packages/initrdscripts/initramfs-jffs2_0.1.bb b/packages/initrdscripts/initramfs-jffs2_0.1.bb
index f938b9d3b1..812e612126 100644
--- a/packages/initrdscripts/initramfs-jffs2_0.1.bb
+++ b/packages/initrdscripts/initramfs-jffs2_0.1.bb
@@ -1,5 +1,6 @@
SRC_URI = "file://jffs2boot.sh"
-PR = "r2"
+PR = "r3"
+RRECOMMENDS = "kernel-module-mtdblock kernel-module-mtdram"
do_install() {
install -m 0755 ${WORKDIR}/jffs2boot.sh ${D}/init
diff --git a/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb b/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb
new file mode 100644
index 0000000000..8c4c2f7e93
--- /dev/null
+++ b/packages/initrdscripts/initramfs-module-bootldr-buster_1.0.bb
@@ -0,0 +1,12 @@
+SRC_URI = "file://01-bootldr-buster.sh"
+PR = "r2"
+DESCRIPTION = "An initramfs module for ignoring bogus kernel commandline from Compaq bootldr"
+RDEPENDS = "initramfs-uniboot"
+
+do_install() {
+ install -d ${D}/initrd.d
+ install -m 0755 ${WORKDIR}/01-bootldr-buster.sh ${D}/initrd.d/
+}
+
+PACKAGE_ARCH = "all"
+FILES_${PN} += " /initrd.d/* "
diff --git a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
index 02d696aa2e..5893420742 100644
--- a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
+++ b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
@@ -1,7 +1,7 @@
SRC_URI = "file://30-bootmenu.sh"
-PR = "r12"
+PR = "r17"
DESCRIPTION = "An initramfs module with UI for selection of boot device."
-RDEPENDS = "klibc-utils-fstype-static initramfs-uniboot initramfs-module-block initramfs-module-loop initramfs-module-nfs"
+RDEPENDS = "klibc-utils-static-fstype initramfs-uniboot initramfs-module-block initramfs-module-loop initramfs-module-nfs"
# For VFAT mounting.
RRECOMMENDS = "kernel-module-nls-cp437 kernel-module-nls-iso8859-1"
diff --git a/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb b/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb
index 35100a94e6..face73038a 100644
--- a/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb
+++ b/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://87-kexecboot.sh"
-PR = "r0.4"
+PR = "r1"
DESCRIPTION = "An initramfs module for kexecing kernel from rootfs."
RDEPENDS = "initramfs-uniboot kexec-static"
diff --git a/packages/initrdscripts/initramfs-uniboot_1.0.bb b/packages/initrdscripts/initramfs-uniboot_1.0.bb
index e0f726582e..403db0b562 100644
--- a/packages/initrdscripts/initramfs-uniboot_1.0.bb
+++ b/packages/initrdscripts/initramfs-uniboot_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://init.sh"
-PR = "r4"
+PR = "r8"
DESCRIPTON = "A modular initramfs init script system."
RRECOMMENDS = "kernel-module-mtdblock"
diff --git a/packages/iptables/files/iptables-use-s6_addr32.patch b/packages/iptables/files/iptables-use-s6_addr32.patch
new file mode 100644
index 0000000000..d3d215ba58
--- /dev/null
+++ b/packages/iptables/files/iptables-use-s6_addr32.patch
@@ -0,0 +1,32 @@
+This patch fixes a compile error which is demonstrated with glibc/eglibc cvs
+the union ip6_u has been renamed inside glibc header in.h here
+http://sourceware.org/cgi-bin/cvsweb.cgi/libc/inet/netinet/in.h.diff?r1=1.55&r2=1.56&cvsroot=glibc
+We should be really using
+the defines that are provided in inet/netinet/in.h to access the members instead.
+
+Index: iptables-1.3.8/ip6tables.c
+===================================================================
+--- iptables-1.3.8.orig/ip6tables.c
++++ iptables-1.3.8/ip6tables.c
+@@ -730,7 +730,7 @@ parse_hostnetworkmask(const char *name,
+ for (i = 0, j = 0; i < n; i++) {
+ int k;
+ for (k = 0; k < 4; k++)
+- addrp[j].in6_u.u6_addr32[k] &= maskp->in6_u.u6_addr32[k];
++ addrp[j].s6_addr32[k] &= maskp->s6_addr32[k];
+ j++;
+ for (k = 0; k < j - 1; k++) {
+ if (IN6_ARE_ADDR_EQUAL(&addrp[k], &addrp[j - 1])) {
+Index: iptables-1.3.8/libiptc/libip6tc.c
+===================================================================
+--- iptables-1.3.8.orig/libiptc/libip6tc.c
++++ iptables-1.3.8/libiptc/libip6tc.c
+@@ -113,7 +113,7 @@ typedef unsigned int socklen_t;
+ #include "libiptc.c"
+
+ #define BIT6(a, l) \
+- ((ntohl(a->in6_u.u6_addr32[(l) / 32]) >> (31 - ((l) & 31))) & 1)
++ ((ntohl(a->s6_addr32[(l) / 32]) >> (31 - ((l) & 31))) & 1)
+
+ int
+ ipv6_prefix_length(const struct in6_addr *a)
diff --git a/packages/iptables/iptables_1.3.8.bb b/packages/iptables/iptables_1.3.8.bb
index 3b63c478ba..8dfb6c7842 100644
--- a/packages/iptables/iptables_1.3.8.bb
+++ b/packages/iptables/iptables_1.3.8.bb
@@ -3,9 +3,10 @@ HOMEPAGE = "http://www.netfilter.org/"
SECTION = "console/utils"
LICENSE = "GPL"
RRECOMMENDS = "kernel-module-ip-tables kernel-module-iptable-filter"
-PR = "r1"
+PR = "r2"
SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
file://getsockopt-failed.patch;patch=1 \
+ file://iptables-use-s6_addr32.patch;patch=1 \
"
S = "${WORKDIR}/iptables-${PV}"
diff --git a/packages/ixp4xx/ixp4xx-npe_2.3.2.bb b/packages/ixp4xx/ixp4xx-npe_2.3.2.bb
index b5b1665735..a53b9d703b 100644
--- a/packages/ixp4xx/ixp4xx-npe_2.3.2.bb
+++ b/packages/ixp4xx/ixp4xx-npe_2.3.2.bb
@@ -29,7 +29,7 @@ do_install() {
install ${S}/NPE-C ${D}/${base_libdir}/firmware/
}
-do_populate_staging() {
+do_stage() {
install -d ${STAGING_FIRMWARE_DIR}
install ${S}/NPE-B ${STAGING_FIRMWARE_DIR}/
install ${S}/NPE-C ${STAGING_FIRMWARE_DIR}/
diff --git a/packages/ixp4xx/ixp4xx-npe_2.4.bb b/packages/ixp4xx/ixp4xx-npe_2.4.bb
index 1d999e3d4b..121838684f 100644
--- a/packages/ixp4xx/ixp4xx-npe_2.4.bb
+++ b/packages/ixp4xx/ixp4xx-npe_2.4.bb
@@ -33,7 +33,7 @@ do_install() {
install -m 0644 ${WORKDIR}/Intel ${D}${datadir}/common-licenses/
}
-do_populate_staging() {
+do_stage() {
install -d ${STAGING_FIRMWARE_DIR}
install ${S}/NPE-B ${STAGING_FIRMWARE_DIR}/
install ${S}/NPE-C ${STAGING_FIRMWARE_DIR}/
diff --git a/packages/keymaps/files/poodle/keymap-2.6.map b/packages/keymaps/files/poodle/keymap-2.6.map
index a39b886f5d..525551837d 100644
--- a/packages/keymaps/files/poodle/keymap-2.6.map
+++ b/packages/keymaps/files/poodle/keymap-2.6.map
@@ -1,13 +1,13 @@
keymaps 0-2,4,8,12
# Default Shift AltGr Control Alt Ctrl+Alt
-keycode 29 = SControl # Calendar
-keycode 60 = SAlt # Address
-keycode 63 = space #Select
+keycode 29 = Control # Calendar
+keycode 60 = Alt # Address
+keycode 63 = space # Select
keycode 68 = F13 # Mail
-keycode 87 = F33 #OK
+keycode 87 = F33 # OK
keycode 88 = F11 # Menu
-keycode 102 = F12 # Home
+keycode 99 = F12 # Home
keycode 103 = Up Up Prior
keycode 105 = Left Left Decr_Console
keycode 106 = Right Right Incr_Console
@@ -18,13 +18,13 @@ keycode 14 = BackSpace BackSpace Delete
keycode 15 = Tab backslash Caps_Lock
keycode 28 = Return Return greater
keycode 40 = apostrophe quotedbl tilde
-keycode 42 = SShift
+keycode 42 = Shift
keycode 51 = comma semicolon parenright
keycode 52 = period colon less
keycode 53 = slash question Num_Lock
-keycode 54 = SShift
+keycode 54 = Shift
keycode 57 = space bar bar
-keycode 67 = SAltGr
+keycode 67 = AltGr
keycode 16 = +q +Q one Control_q Meta_q
keycode 17 = +w +W two Control_w Meta_w
diff --git a/packages/keymaps/files/tosa/keymap-2.6.map b/packages/keymaps/files/tosa/keymap-2.6.map
index b85d5616e5..f83e4bfe39 100644
--- a/packages/keymaps/files/tosa/keymap-2.6.map
+++ b/packages/keymaps/files/tosa/keymap-2.6.map
@@ -1,117 +1,297 @@
# Default kernel keymap. This uses 7 modifier combinations.
keymaps 0-2,4-5,8,12
-# Change the above line into
-# keymaps 0-2,4-6,8,12
-# in case you want the entries
-# altgr control keycode 83 = Boot
-# altgr control keycode 111 = Boot
-# below.
#
-keycode 1 =
-keycode 14 = BackSpace
- altgr keycode 14 = Delete
-keycode 15 = Tab
- altgr keycode 65 = Caps_Lock
-keycode 16 = q
- altgr keycode 16 = one
+keycode 1 = Escape Escape
+# alt keycode 1 = Meta_Escape
+#keycode 2 = one exclam
+# alt keycode 2 = Meta_one
+#keycode 3 = two at at
+# control keycode 3 = nul
+# shift control keycode 3 = nul
+# alt keycode 3 = Meta_two
+#keycode 4 = three numbersign
+# control keycode 4 = Escape
+# alt keycode 4 = Meta_three
+#keycode 5 = four dollar dollar
+# control keycode 5 = Control_backslash
+# alt keycode 5 = Meta_four
+#keycode 6 = five percent
+# control keycode 6 = Control_bracketright
+# alt keycode 6 = Meta_five
+#keycode 7 = six asciicircum
+# control keycode 7 = Control_asciicircum
+# alt keycode 7 = Meta_six
+#keycode 8 = seven ampersand braceleft
+# control keycode 8 = Control_underscore
+# alt keycode 8 = Meta_seven
+#keycode 9 = eight asterisk bracketleft
+# control keycode 9 = Delete
+# alt keycode 9 = Meta_eight
+#keycode 10 = nine parenleft bracketright
+# alt keycode 10 = Meta_nine
+#keycode 11 = zero parenright braceright
+# alt keycode 11 = Meta_zero
+#keycode 12 = minus underscore backslash
+# control keycode 12 = Control_underscore
+# shift control keycode 12 = Control_underscore
+# alt keycode 12 = Meta_minus
+#keycode 13 = equal plus
+# alt keycode 13 = Meta_equal
+keycode 14 = BackSpace BackSpace
+ altgr keycode 14 = Delete
+#keycode 14 = Delete Delete
+# control keycode 14 = BackSpace
+# alt keycode 14 = Meta_Delete
+keycode 15 = Tab Tab
+ altgr keycode 15 = Caps_Lock
+keycode 16 = q
+ altgr keycode 16 = one
keycode 17 = w
- altgr keycode 17 = two
+ altgr keycode 17 = two
keycode 18 = e
- altgr keycode 18 = three
-keycode 19 = r
- altgr keycode 19 = four
+ altgr keycode 18 = three
+# altgr keycode 18 = Hex_E
+keycode 19 = r
+ altgr keycode 19 = four
keycode 20 = t
- altgr keycode 20 = five
+ altgr keycode 20 = five
keycode 21 = y
- altgr keycode 21 = six
-keycode 22 = u
- altgr keycode 22 = seven
-keycode 23 = i
- altgr keycode 23 = eight
+ altgr keycode 21 = six
+keycode 22 = u
+ altgr keycode 22 = seven
+keycode 23 = i
+ altgr keycode 23 = eight
keycode 24 = o
- altgr keycode 24 = nine
+ altgr keycode 24 = nine
keycode 25 = p
- altgr keycode 25 = zero
-keycode 26 =
-keycode 27 =
+ altgr keycode 25 = zero
+#keycode 26 = bracketleft braceleft
+# control keycode 26 = Escape
+# alt keycode 26 = Meta_bracketleft
+#keycode 27 = bracketright braceright asciitilde
+# control keycode 27 = Control_bracketright
+# alt keycode 27 = Meta_bracketright
keycode 28 = Return
- altgr keycode 28 = greater
+ altgr keycode 28 = greater
+# alt keycode 28 = Meta_Control_m
keycode 29 = Control
keycode 30 = a
- altgr keycode 30 = exclam
+ altgr keycode 30 = exclam
+# altgr keycode 30 = Hex_A
keycode 31 = s
- altgr keycode 31 = at
+ altgr keycode 31 = at
keycode 32 = d
- altgr keycode 32 = numbersign
+ altgr keycode 32 = numbersign
+# altgr keycode 32 = Hex_D
keycode 33 = f
- altgr keycode 33 = dollar
+ altgr keycode 33 = dollar
+# altgr keycode 33 = Hex_F
keycode 34 = g
- altgr keycode 34 = percent
-keycode 35 = h
- altgr keycode 35 = underscore
-keycode 36 = j
- altgr keycode 36 = ampersand
-keycode 37 = k
- altgr keycode 37 = asterisk
-keycode 38 = l
- altgr keycode 38 = parenleft
-keycode 39 =
-keycode 40 = apostrophe
- altgr keycode 40 = asciitilde
- shift keycode 40 = quotedbl
-keycode 41 =
+ altgr keycode 34 = percent
+keycode 35 = h
+ altgr keycode 35 = underscore
+keycode 36 = j
+ altgr keycode 36 = ampersand
+keycode 37 = k
+ altgr keycode 37 = asterisk
+keycode 38 = l
+ altgr keycode 38 = parenleft
+#keycode 39 = semicolon colon
+# alt keycode 39 = Meta_semicolon
+keycode 40 = apostrophe quotedbl
+ altgr keycode 40 = asciitilde
+# control keycode 40 = Control_g
+# alt keycode 40 = Meta_apostrophe
+#keycode 41 = grave asciitilde
+# control keycode 41 = nul
+# alt keycode 41 = Meta_grave
keycode 42 = Shift
-keycode 43 =
+#keycode 43 = backslash bar
+# control keycode 43 = Control_backslash
+# alt keycode 43 = Meta_backslash
keycode 44 = z
+## alt keycode 44 =
keycode 45 = x
+ altgr keycode 45 = Control_x
keycode 46 = c
+ altgr keycode 46 = Control_c
+# altgr keycode 46 = Hex_C
keycode 47 = v
+ altgr keycode 47 = Control_v
keycode 48 = b
- altgr keycode 48 = minus
+ altgr keycode 48 = minus
+# altgr keycode 48 = Hex_B
keycode 49 = n
- altgr keycode 49 = plus
+ altgr keycode 49 = plus
keycode 50 = m
- altgr keycode 50 = equal
-keycode 51 = comma
- altgr keycode 51 = parenright
- shift keycode 51 = semicolon
-keycode 52 = period
- shift keycode 52 = colon
- altgr keycode 52 = less
-
-keycode 53 = slash
- shift keycode 53 = question
- altgr keycode 53 = Num_Lock
-
+ altgr keycode 50 = equal
+keycode 51 = comma semicolon
+ altgr keycode 51 = parenright
+#keycode 51 = comma less
+# alt keycode 51 = Meta_comma
+keycode 52 = period colon
+ control keycode 52 = Compose
+ altgr keycode 52 = less
+#keycode 52 = period greater
+# control keycode 52 = Compose
+# alt keycode 52 = Meta_period
+keycode 53 = slash question
+ altgr keycode 53 = Num_Lock
+# control keycode 53 = Delete
+# alt keycode 53 = Meta_slash
keycode 54 = Shift
-keycode 55 =
-keycode 56 = Alt
+#keycode 55 = KP_Multiply
+#keycode 56 = Alt
keycode 57 = space space
- control keycode 57 = nul
- altgr keycode 57 = bar
-keycode 59 = F9
-keycode 60 = F10
-keycode 61 = AltGr
-keycode 62 = Escape
-keycode 63 = space
-keycode 64 = Control
-keycode 65 = F15
-keycode 66 = F24
-keycode 67 = F12
-keycode 68 = F13
-keycode 79 = F15
-keycode 80 = F16
-keycode 82 = F17
-keycode 87 = Return
-keycode 88 = F11
-keycode 97 = Control
-keycode 99 = F12
+ altgr keycode 57 = bar
+# control keycode 57 = nul
+# alt keycode 57 = Meta_space
+#keycode 58 = Caps_Lock
+#keycode 59 = F1 F11 Console_13
+# control keycode 59 = F1
+# alt keycode 59 = Console_1
+# control alt keycode 59 = Console_1
+#keycode 60 = F2 F12 Console_14
+# control keycode 60 = F2
+# alt keycode 60 = Console_2
+# control alt keycode 60 = Console_2
+#keycode 61 = F3 F13 Console_15
+# control keycode 61 = F3
+# alt keycode 61 = Console_3
+# control alt keycode 61 = Console_3
+#keycode 62 = F4 F14 Console_16
+# control keycode 62 = F4
+# alt keycode 62 = Console_4
+# control alt keycode 62 = Console_4
+#keycode 63 = F5 F15 Console_17
+# control keycode 63 = F5
+# alt keycode 63 = Console_5
+# control alt keycode 63 = Console_5
+#keycode 64 = F6 F16 Console_18
+# control keycode 64 = F6
+# alt keycode 64 = Console_6
+# control alt keycode 64 = Console_6
+#keycode 65 = F7 F17 Console_19
+# control keycode 65 = F7
+# alt keycode 65 = Console_7
+# control alt keycode 65 = Console_7
+#keycode 66 = F8 F18 Console_20
+# control keycode 66 = F8
+# alt keycode 66 = Console_8
+# control alt keycode 66 = Console_8
+#keycode 67 = F9 F19 Console_21
+# control keycode 67 = F9
+# alt keycode 67 = Console_9
+# control alt keycode 67 = Console_9
+#keycode 68 = F10 F20 Console_22
+# control keycode 68 = F10
+# alt keycode 68 = Console_10
+# control alt keycode 68 = Console_10
+#keycode 69 = Num_Lock
+# shift keycode 69 = Bare_Num_Lock
+#keycode 70 = Scroll_Lock Show_Memory Show_Registers
+# control keycode 70 = Show_State
+# alt keycode 70 = Scroll_Lock
+#keycode 71 = KP_7
+# alt keycode 71 = Ascii_7
+# altgr keycode 71 = Hex_7
+#keycode 72 = KP_8
+# alt keycode 72 = Ascii_8
+# altgr keycode 72 = Hex_8
+#keycode 73 = KP_9
+# alt keycode 73 = Ascii_9
+# altgr keycode 73 = Hex_9
+#keycode 74 = KP_Subtract
+#keycode 75 = KP_4
+# alt keycode 75 = Ascii_4
+# altgr keycode 75 = Hex_4
+#keycode 76 = KP_5
+# alt keycode 76 = Ascii_5
+# altgr keycode 76 = Hex_5
+#keycode 77 = KP_6
+# alt keycode 77 = Ascii_6
+# altgr keycode 77 = Hex_6
+#keycode 78 = KP_Add
+#keycode 79 = KP_1
+# alt keycode 79 = Ascii_1
+# altgr keycode 79 = Hex_1
+#keycode 80 = KP_2
+# alt keycode 80 = Ascii_2
+# altgr keycode 80 = Hex_2
+#keycode 81 = KP_3
+# alt keycode 81 = Ascii_3
+# altgr keycode 81 = Hex_3
+#keycode 82 = KP_0
+# alt keycode 82 = Ascii_0
+# altgr keycode 82 = Hex_0
+#keycode 83 = KP_Period
+## altgr control keycode 83 = Boot
+# control alt keycode 83 = Boot
+#keycode 84 = Last_Console
+#keycode 85 =
+#keycode 86 = less greater bar
+# alt keycode 86 = Meta_less
+#keycode 87 = F11 F11 Console_23
+# control keycode 87 = F11
+# alt keycode 87 = Console_11
+# control alt keycode 87 = Console_11
+#keycode 88 = F12 F12 Console_24
+# control keycode 88 = F12
+# alt keycode 88 = Console_12
+# control alt keycode 88 = Console_12
+#keycode 89 =
+#keycode 90 =
+keycode 91 = space
+#keycode 91 =
+keycode 92 = Return
+#keycode 92 =
+#keycode 93 =
+#keycode 94 =
+#keycode 95 =
+#keycode 96 = KP_Enter
+#keycode 97 = Control
+#keycode 98 = KP_Divide
+#keycode 99 = Control_backslash
+# control keycode 99 = Control_backslash
+# alt keycode 99 = Control_backslash
+keycode 100 = AltGr
+#keycode 101 = Break
+#keycode 102 = Find
keycode 103 = Up
+ altgr keycode 103 = Prior
+ shift keycode 104 = Scroll_Backward
+#keycode 104 = Prior
+# shift keycode 104 = Scroll_Backward
keycode 105 = Left
- altgr keycode 105 = Decr_Console
+ altgr keycode 105 = Decr_Console
keycode 106 = Right
- altgr keycode 106 = Incr_Console
-keycode 108 = Down
+ altgr keycode 106 = Incr_Console
+#keycode 107 = Select
+keycode 108 = Down
+ altgr keycode 108 = Next
+ shift keycode 108 = Scroll_Forward
+#keycode 109 = Next
+# shift keycode 109 = Scroll_Forward
+#keycode 110 = Insert
+#keycode 111 = Remove
+## altgr control keycode 111 = Boot
+# control alt keycode 111 = Boot
+#keycode 112 = Macro
+#keycode 113 = F13
+#keycode 114 = F14
+#keycode 115 = Help
+#keycode 116 = Do
+#keycode 117 = F17
+#keycode 118 = KP_MinPlus
+#keycode 119 = Pause
+#keycode 120 =
+#keycode 121 =
+#keycode 122 =
+#keycode 123 =
+#keycode 124 =
+#keycode 125 =
+#keycode 126 =
+#keycode 127 =
string F1 = "\033[[A"
string F2 = "\033[[B"
string F3 = "\033[[C"
diff --git a/packages/keymaps/keymaps_1.0.bb b/packages/keymaps/keymaps_1.0.bb
index 00a215f948..dd10b64099 100644
--- a/packages/keymaps/keymaps_1.0.bb
+++ b/packages/keymaps/keymaps_1.0.bb
@@ -3,7 +3,7 @@ SECTION = "base"
RDEPENDS = "initscripts console-tools"
LICENSE = "GPL"
PACKAGE_ARCH = "${MACHINE}"
-PR = "r16"
+PR = "r18"
inherit update-rc.d
diff --git a/packages/kismet/kismet-2007-10-R1/fix_strip.patch b/packages/kismet/kismet-2007-10-R1/fix_strip.patch
new file mode 100644
index 0000000000..54e7a9b1b7
--- /dev/null
+++ b/packages/kismet/kismet-2007-10-R1/fix_strip.patch
@@ -0,0 +1,47 @@
+Index: kismet-2007-10-R1/Makefile.in
+===================================================================
+--- kismet-2007-10-R1.orig/Makefile.in 2008-03-06 15:20:37.000000000 +0000
++++ kismet-2007-10-R1/Makefile.in 2008-03-06 15:21:07.000000000 +0000
+@@ -138,23 +138,23 @@
+ fi
+
+ binuserinstall:
+- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(PS) $(BIN)/$(PS);
+- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(DRONE) $(BIN)/$(DRONE);
++ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(PS) $(BIN)/$(PS);
++ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(DRONE) $(BIN)/$(DRONE);
+
+ binsuidinstall:
+- install -o $(INSTUSR) -g $(INSTGRP) -s -m 4755 $(PS) $(BIN)/$(PS);
+- install -o $(INSTUSR) -g $(INSTGRP) -s -m 4755 $(DRONE) $(BIN)/$(DRONE);
++ install -o $(INSTUSR) -g $(INSTGRP) -m 4755 $(PS) $(BIN)/$(PS);
++ install -o $(INSTUSR) -g $(INSTGRP) -m 4755 $(DRONE) $(BIN)/$(DRONE);
+
+ commoninstall:
+ mkdir -p $(ETC)
+ mkdir -p $(BIN)
+
+ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(WRAP) $(BIN)/kismet
+- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(NC) $(BIN)/$(NC)
+- # install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(HOPPER) $(BIN)/$(HOPPER)
++ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(NC) $(BIN)/$(NC)
++ # install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(HOPPER) $(BIN)/$(HOPPER)
+ @if test "$(ZAURUS)" = "yes"; then \
+- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(BUZZER) $(BIN)/buzzme; \
+- echo install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(BUZZER) $(BIN)/buzzme; \
++ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(BUZZER) $(BIN)/buzzme; \
++ echo install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(BUZZER) $(BIN)/buzzme; \
+ fi
+ #install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet_monitor $(BIN)/kismet_monitor
+ #install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/kismet_unmonitor $(BIN)/kismet_unmonitor
+@@ -169,8 +169,8 @@
+ install -o $(INSTUSR) -g $(MANGRP) -m 644 man/kismet_drone.conf.5 $(MAN)/man5/kismet_drone.conf.5
+
+ @if test "$(GPSLBUILD)" = "$(GPSL)"; then \
+- install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(GPSL) $(BIN)/$(GPSL); \
+- echo install -o $(INSTUSR) -g $(INSTGRP) -s -m 755 $(GPSL) $(BIN)/$(GPSL); \
++ install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(GPSL) $(BIN)/$(GPSL); \
++ echo install -o $(INSTUSR) -g $(INSTGRP) -m 755 $(GPSL) $(BIN)/$(GPSL); \
+ install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
+ echo install -o $(INSTUSR) -g $(INSTGRP) -m 755 scripts/gpsmap-helper-earthamaps $(BIN)/gpsmap-helper-earthamaps; \
+ install -o $(INSTUSR) -g $(MANGRP) -m 644 man/gpsmap.1 $(MAN)/man1/gpsmap.1; \
diff --git a/packages/klibc/files/fstype-sane-and-vfat-jffs2.patch b/packages/klibc/files/fstype-sane-and-vfat-jffs2.patch
deleted file mode 100644
index e89c5adb9a..0000000000
--- a/packages/klibc/files/fstype-sane-and-vfat-jffs2.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-diff -r 3c9d84425ba7 utils/fstype.c
---- a/utils/fstype.c Thu Feb 14 02:09:30 2008 +0200
-+++ b/utils/fstype.c Thu Feb 14 02:13:46 2008 +0200
-@@ -13,11 +13,18 @@
- */
-
- #include <sys/types.h>
-+#include <linux/types.h>
- #include <stdio.h>
- #include <string.h>
- #include <unistd.h>
- #include <endian.h>
- #include <netinet/in.h>
-+#if __BYTE_ORDER == __BIG_ENDIAN
-+#include <linux/byteorder/big_endian.h>
-+#else
-+#include <linux/byteorder/little_endian.h>
-+#endif
-+
-
- #define cpu_to_be32(x) __cpu_to_be32(x) /* Needed by romfs_fs.h */
-
-@@ -105,6 +112,27 @@ static int romfs_image(const unsigned ch
- return 0;
- }
-
-+static int jffs2_image(const unsigned char *buf, unsigned long *blocks)
-+{
-+ // Very sloppy! ;-E
-+ if (*buf == 0x85 && buf[1] == 0x19)
-+ return 1;
-+
-+ return 0;
-+}
-+
-+static int vfat_image(const unsigned char *buf, unsigned long *blocks)
-+{
-+ const struct romfs_super_block *sb =
-+ (const struct romfs_super_block *)buf;
-+ if (!strncmp(buf + 54, "FAT12 ", 8)
-+ || !strncmp(buf + 54, "FAT16 ", 8)
-+ || !strncmp(buf + 82, "FAT32 ", 8))
-+ return 1;
-+
-+ return 0;
-+}
-+
- static int minix_image(const unsigned char *buf, unsigned long *blocks)
- {
- const struct minix_super_block *sb =
-@@ -167,8 +195,6 @@ static int xfs_image(const unsigned char
- (const struct xfs_sb *)buf;
-
- if (__be32_to_cpu(sb->sb_magicnum) == XFS_SB_MAGIC) {
-- *blocks = __be64_to_cpu(sb->sb_dblocks) *
-- (__be32_to_cpu(sb->sb_blocksize) / BLOCK_SIZE);
- return 1;
- }
- return 0;
-@@ -184,6 +210,8 @@ static struct imagetype images[] = {
- { 0, "gzip", gzip_image },
- { 0, "cramfs", cramfs_image },
- { 0, "romfs", romfs_image },
-+ { 0, "jffs2", jffs2_image },
-+ { 0, "vfat", vfat_image },
- { 0, "xfs", xfs_image },
- { 1, "minix", minix_image },
- { 1, "ext3", ext3_image },
diff --git a/packages/klibc/files/losetup.patch b/packages/klibc/files/losetup.patch
new file mode 100644
index 0000000000..77049bd05f
--- /dev/null
+++ b/packages/klibc/files/losetup.patch
@@ -0,0 +1,571 @@
+Index: klibc-1.5/usr/utils/losetup.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ klibc-1.5/usr/utils/losetup.c 2008-03-07 23:13:38.635692852 +0100
+@@ -0,0 +1,485 @@
++/* Originally from Ted's losetup.c */
++
++#define LOOPMAJOR 7
++
++/*
++ * losetup.c - setup and control loop devices
++ */
++
++#include <stdio.h>
++#include <string.h>
++#include <ctype.h>
++#include <fcntl.h>
++#include <errno.h>
++#include <stdlib.h>
++#include <unistd.h>
++#include <sys/ioctl.h>
++#include <sys/stat.h>
++#include <sys/mman.h>
++#include <sys/sysmacros.h>
++#include <string.h>
++
++#include "loop.h"
++
++extern int verbose;
++extern char *progname;
++extern char *xstrdup (const char *s); /* not: #include "sundries.h" */
++extern void error (const char *fmt, ...); /* idem */
++
++/* caller guarantees n > 0 */
++void
++xstrncpy(char *dest, const char *src, size_t n) {
++ strncpy(dest, src, n-1);
++ dest[n-1] = 0;
++}
++
++
++static int
++loop_info64_to_old(const struct loop_info64 *info64, struct loop_info *info)
++{
++ memset(info, 0, sizeof(*info));
++ info->lo_number = info64->lo_number;
++ info->lo_device = info64->lo_device;
++ info->lo_inode = info64->lo_inode;
++ info->lo_rdevice = info64->lo_rdevice;
++ info->lo_offset = info64->lo_offset;
++ info->lo_encrypt_type = info64->lo_encrypt_type;
++ info->lo_encrypt_key_size = info64->lo_encrypt_key_size;
++ info->lo_flags = info64->lo_flags;
++ info->lo_init[0] = info64->lo_init[0];
++ info->lo_init[1] = info64->lo_init[1];
++ if (info->lo_encrypt_type == LO_CRYPT_CRYPTOAPI)
++ memcpy(info->lo_name, info64->lo_crypt_name, LO_NAME_SIZE);
++ else
++ memcpy(info->lo_name, info64->lo_file_name, LO_NAME_SIZE);
++ memcpy(info->lo_encrypt_key, info64->lo_encrypt_key, LO_KEY_SIZE);
++
++ /* error in case values were truncated */
++ if (info->lo_device != info64->lo_device ||
++ info->lo_rdevice != info64->lo_rdevice ||
++ info->lo_inode != info64->lo_inode ||
++ info->lo_offset != info64->lo_offset)
++ return -EOVERFLOW;
++
++ return 0;
++}
++
++
++static int
++show_loop(char *device) {
++ struct loop_info loopinfo;
++ struct loop_info64 loopinfo64;
++ int fd, errsv;
++
++ if ((fd = open(device, O_RDONLY)) < 0) {
++ int errsv = errno;
++ fprintf(stderr, "loop: can't open device %s: %s\n",
++ device, strerror (errsv));
++ return 2;
++ }
++
++ if (ioctl(fd, LOOP_GET_STATUS64, &loopinfo64) == 0) {
++
++ loopinfo64.lo_file_name[LO_NAME_SIZE-2] = '*';
++ loopinfo64.lo_file_name[LO_NAME_SIZE-1] = 0;
++ loopinfo64.lo_crypt_name[LO_NAME_SIZE-1] = 0;
++
++ printf("%s: [%04llx]:%llu (%s)",
++ device, loopinfo64.lo_device, loopinfo64.lo_inode,
++ loopinfo64.lo_file_name);
++
++ if (loopinfo64.lo_offset)
++ printf(", offset %lld", loopinfo64.lo_offset);
++
++ if (loopinfo64.lo_sizelimit)
++ printf(", sizelimit %lld", loopinfo64.lo_sizelimit);
++
++ if (loopinfo64.lo_encrypt_type ||
++ loopinfo64.lo_crypt_name[0]) {
++ char *e = loopinfo64.lo_crypt_name;
++
++ if (*e == 0 && loopinfo64.lo_encrypt_type == 1)
++ e = "XOR";
++ printf(", encryption %s (type %d)",
++ e, loopinfo64.lo_encrypt_type);
++ }
++ printf("\n");
++ close (fd);
++ return 0;
++ }
++
++ if (ioctl(fd, LOOP_GET_STATUS, &loopinfo) == 0) {
++ printf ("%s: [%04x]:%ld (%s)",
++ device, loopinfo.lo_device, loopinfo.lo_inode,
++ loopinfo.lo_name);
++
++ if (loopinfo.lo_offset)
++ printf(", offset %d", loopinfo.lo_offset);
++
++ if (loopinfo.lo_encrypt_type)
++ printf(", encryption type %d\n",
++ loopinfo.lo_encrypt_type);
++
++ printf("\n");
++ close (fd);
++ return 0;
++ }
++
++ errsv = errno;
++ fprintf(stderr, "loop: can't get info on device %s: %s\n",
++ device, strerror (errsv));
++ close (fd);
++ return 1;
++}
++
++int
++is_loop_device (const char *device) {
++ struct stat statbuf;
++
++ return (stat(device, &statbuf) == 0 &&
++ S_ISBLK(statbuf.st_mode) &&
++ major(statbuf.st_rdev) == LOOPMAJOR);
++}
++
++#define SIZE(a) (sizeof(a)/sizeof(a[0]))
++
++char *
++find_unused_loop_device (void) {
++ /* Just creating a device, say in /tmp, is probably a bad idea -
++ people might have problems with backup or so.
++ So, we just try /dev/loop[0-7]. */
++ char dev[20];
++ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" };
++ int i, j, fd, somedev = 0, someloop = 0, permission = 0;
++ struct stat statbuf;
++ struct loop_info loopinfo;
++
++ for (j = 0; j < SIZE(loop_formats); j++) {
++ for(i = 0; i < 256; i++) {
++ sprintf(dev, loop_formats[j], i);
++ if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
++ somedev++;
++ fd = open (dev, O_RDONLY);
++ if (fd >= 0) {
++ if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0)
++ someloop++; /* in use */
++ else if (errno == ENXIO) {
++ close (fd);
++ return xstrdup(dev);/* probably free */
++ }
++ close (fd);
++ } else if (errno == EACCES)
++ permission++;
++
++ continue;/* continue trying as long as devices exist */
++ }
++ break;
++ }
++ }
++
++ if (!somedev)
++ error("%s: could not find any device /dev/loop#", progname);
++ else if (!someloop && permission)
++ error("%s: no permission to look at /dev/loop#", progname);
++ else if (!someloop)
++ error(
++ "%s: Could not find any loop device. Maybe this kernel "
++ "does not know\n"
++ " about the loop device? (If so, recompile or "
++ "`modprobe loop'.)", progname);
++ else
++ error("%s: could not find any free loop device", progname);
++ return 0;
++}
++
++/*
++ * A function to read the passphrase either from the terminal or from
++ * an open file descriptor.
++ */
++static char *
++xgetpass(int pfd, const char *prompt) {
++ char *pass;
++ int buflen, i;
++
++ pass = NULL;
++ buflen = 0;
++ for (i=0; ; i++) {
++ if (i >= buflen-1) {
++ /* we're running out of space in the buffer.
++ * Make it bigger: */
++ char *tmppass = pass;
++ buflen += 128;
++ pass = realloc(tmppass, buflen);
++ if (pass == NULL) {
++ /* realloc failed. Stop reading. */
++ error("Out of memory while reading passphrase");
++ pass = tmppass; /* the old buffer hasn't changed */
++ break;
++ }
++ }
++ if (read(pfd, pass+i, 1) != 1 ||
++ pass[i] == '\n' || pass[i] == 0)
++ break;
++ }
++
++ if (pass == NULL)
++ return "";
++
++ pass[i] = 0;
++ return pass;
++}
++
++static int
++digits_only(const char *s) {
++ while (*s)
++ if (!isdigit(*s++))
++ return 0;
++ return 1;
++}
++
++int
++set_loop(const char *device, const char *file, unsigned long long offset,
++ const char *encryption, int pfd, int *loopro) {
++ struct loop_info64 loopinfo64;
++ int fd, ffd, mode, i;
++ char *pass;
++
++ mode = (*loopro ? O_RDONLY : O_RDWR);
++ if ((ffd = open(file, mode)) < 0) {
++ if (!*loopro && errno == EROFS)
++ ffd = open(file, mode = O_RDONLY);
++ if (ffd < 0) {
++ perror(file);
++ return 1;
++ }
++ }
++ if ((fd = open(device, mode)) < 0) {
++ perror (device);
++ return 1;
++ }
++ *loopro = (mode == O_RDONLY);
++
++ memset(&loopinfo64, 0, sizeof(loopinfo64));
++
++ xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE);
++
++ if (encryption && *encryption) {
++ if (digits_only(encryption)) {
++ loopinfo64.lo_encrypt_type = atoi(encryption);
++ } else {
++ loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI;
++ snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE,
++ "%s", encryption);
++ }
++ }
++
++ loopinfo64.lo_offset = offset;
++
++
++ switch (loopinfo64.lo_encrypt_type) {
++ case LO_CRYPT_NONE:
++ loopinfo64.lo_encrypt_key_size = 0;
++ break;
++ case LO_CRYPT_XOR:
++ pass = xgetpass(pfd, "Password: ");
++ goto gotpass;
++ default:
++ pass = xgetpass(pfd, "Password: ");
++ gotpass:
++ memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE);
++ xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
++ memset(pass, 0, strlen(pass));
++ loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE;
++ }
++
++ if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
++ perror("ioctl: LOOP_SET_FD");
++ return 1;
++ }
++ close (ffd);
++
++ i = ioctl(fd, LOOP_SET_STATUS64, &loopinfo64);
++ if (i) {
++ struct loop_info loopinfo;
++ int errsv = errno;
++
++ i = loop_info64_to_old(&loopinfo64, &loopinfo);
++ if (i) {
++ errno = errsv;
++ perror("ioctl: LOOP_SET_STATUS64");
++ } else {
++ i = ioctl(fd, LOOP_SET_STATUS, &loopinfo);
++ if (i)
++ perror("ioctl: LOOP_SET_STATUS");
++ }
++ memset(&loopinfo, 0, sizeof(loopinfo));
++ }
++ memset(&loopinfo64, 0, sizeof(loopinfo64));
++
++ if (i) {
++ ioctl (fd, LOOP_CLR_FD, 0);
++ close (fd);
++ return 1;
++ }
++ close (fd);
++
++ if (verbose > 1)
++ printf("set_loop(%s,%s,%llu): success\n",
++ device, file, offset);
++ return 0;
++}
++
++int
++del_loop (const char *device) {
++ int fd;
++
++ if ((fd = open (device, O_RDONLY)) < 0) {
++ int errsv = errno;
++ fprintf(stderr, "loop: can't delete device %s: %s\n",
++ device, strerror (errsv));
++ return 1;
++ }
++ if (ioctl (fd, LOOP_CLR_FD, 0) < 0) {
++ perror ("ioctl: LOOP_CLR_FD");
++ return 1;
++ }
++ close (fd);
++ if (verbose > 1)
++ printf("del_loop(%s): success\n", device);
++ return 0;
++}
++
++
++#include <getopt.h>
++#include <stdarg.h>
++
++int verbose = 0;
++char *progname;
++
++static void
++usage(void) {
++ fprintf(stderr, "usage:\n\
++ %s loop_device # give info\n\
++ %s -d loop_device # delete\n\
++ %s -f # find unused\n\
++ %s [-e encryption] [-o offset] {-f|loop_device} file # setup\n",
++ progname, progname, progname, progname);
++ exit(1);
++}
++
++char *
++xstrdup (const char *s) {
++ char *t;
++
++ if (s == NULL)
++ return NULL;
++
++ t = strdup (s);
++
++ if (t == NULL) {
++ fprintf(stderr, "not enough memory");
++ exit(1);
++ }
++
++ return t;
++}
++
++void
++error (const char *fmt, ...) {
++ va_list args;
++
++ va_start (args, fmt);
++ vfprintf (stderr, fmt, args);
++ va_end (args);
++ fprintf (stderr, "\n");
++}
++
++int
++main(int argc, char **argv) {
++ char *p, *offset, *encryption, *passfd, *device, *file;
++ int delete, find, c;
++ int res = 0;
++ int ro = 0;
++ int pfd = -1;
++ unsigned long long off;
++
++
++ delete = find = 0;
++ off = 0;
++ offset = encryption = passfd = NULL;
++
++ progname = argv[0];
++ if ((p = strrchr(progname, '/')) != NULL)
++ progname = p+1;
++
++ while ((c = getopt(argc, argv, "de:E:fo:p:v")) != -1) {
++ switch (c) {
++ case 'd':
++ delete = 1;
++ break;
++ case 'E':
++ case 'e':
++ encryption = optarg;
++ break;
++ case 'f':
++ find = 1;
++ break;
++ case 'o':
++ offset = optarg;
++ break;
++ case 'p':
++ passfd = optarg;
++ break;
++ case 'v':
++ verbose = 1;
++ break;
++ default:
++ usage();
++ }
++ }
++
++ if (argc == 1) {
++ usage();
++ } else if (delete) {
++ if (argc != optind+1 || encryption || offset || find)
++ usage();
++ } else if (find) {
++ if (argc < optind || argc > optind+1)
++ usage();
++ } else {
++ if (argc < optind+1 || argc > optind+2)
++ usage();
++ }
++
++ if (find) {
++ device = find_unused_loop_device();
++ if (device == NULL)
++ return -1;
++ if (verbose)
++ printf("Loop device is %s\n", device);
++ if (argc == optind) {
++ printf("%s\n", device);
++ return 0;
++ }
++ file = argv[optind];
++ } else {
++ device = argv[optind];
++ if (argc == optind+1)
++ file = NULL;
++ else
++ file = argv[optind+1];
++ }
++
++ if (delete)
++ res = del_loop(device);
++ else if (file == NULL)
++ res = show_loop(device);
++ else {
++ if (offset && sscanf(offset, "%llu", &off) != 1)
++ usage();
++ if (passfd && sscanf(passfd, "%d", &pfd) != 1)
++ usage();
++ res = set_loop(device, file, off, encryption, pfd, &ro);
++ }
++ return res;
++}
+Index: klibc-1.5/usr/utils/loop.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ klibc-1.5/usr/utils/loop.h 2008-03-07 23:01:49.336694297 +0100
+@@ -0,0 +1,51 @@
++#define LO_CRYPT_NONE 0
++#define LO_CRYPT_XOR 1
++#define LO_CRYPT_DES 2
++#define LO_CRYPT_CRYPTOAPI 18
++
++#define LOOP_SET_FD 0x4C00
++#define LOOP_CLR_FD 0x4C01
++#define LOOP_SET_STATUS 0x4C02
++#define LOOP_GET_STATUS 0x4C03
++#define LOOP_SET_STATUS64 0x4C04
++#define LOOP_GET_STATUS64 0x4C05
++
++#define LO_NAME_SIZE 64
++#define LO_KEY_SIZE 32
++
++#include "my_dev_t.h"
++
++struct loop_info {
++ int lo_number;
++ my_dev_t lo_device;
++ unsigned long lo_inode;
++ my_dev_t lo_rdevice;
++ int lo_offset;
++ int lo_encrypt_type;
++ int lo_encrypt_key_size;
++ int lo_flags;
++ char lo_name[LO_NAME_SIZE];
++ unsigned char lo_encrypt_key[LO_KEY_SIZE];
++ unsigned long lo_init[2];
++ char reserved[4];
++};
++
++/*
++ * Where to get __u8, __u32, __u64? Let us use unsigned char/int/long long
++ * and get punished when someone comes with 128-bit long longs.
++ */
++struct loop_info64 {
++ unsigned long long lo_device;
++ unsigned long long lo_inode;
++ unsigned long long lo_rdevice;
++ unsigned long long lo_offset;
++ unsigned long long lo_sizelimit; /* bytes, 0 == max available */
++ unsigned int lo_number;
++ unsigned int lo_encrypt_type;
++ unsigned int lo_encrypt_key_size;
++ unsigned int lo_flags;
++ unsigned char lo_file_name[LO_NAME_SIZE];
++ unsigned char lo_crypt_name[LO_NAME_SIZE];
++ unsigned char lo_encrypt_key[LO_KEY_SIZE];
++ unsigned long long lo_init[2];
++};
+Index: klibc-1.5/usr/utils/my_dev_t.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ klibc-1.5/usr/utils/my_dev_t.h 2008-03-07 23:03:45.148693283 +0100
+@@ -0,0 +1,20 @@
++/* silliness to get dev_t defined as the kernel defines it */
++/* glibc uses a different dev_t */
++
++#include <linux/posix_types.h>
++#include <linux/version.h>
++
++#ifndef KERNEL_VERSION
++#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
++#endif
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(1,3,78)
++/* for i386 - alpha uses unsigned int */
++#define my_dev_t unsigned short
++#else
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68)
++#define my_dev_t __kernel_dev_t
++#else
++#define my_dev_t __kernel_old_dev_t
++#endif
++#endif
diff --git a/packages/klibc/files/modprobe.patch b/packages/klibc/files/modprobe.patch
new file mode 100644
index 0000000000..074b0b6311
--- /dev/null
+++ b/packages/klibc/files/modprobe.patch
@@ -0,0 +1,1985 @@
+Index: klibc-1.5/usr/utils/Kbuild
+===================================================================
+--- klibc-1.5.orig/usr/utils/Kbuild 2008-03-07 22:01:45.223695348 +0100
++++ klibc-1.5/usr/utils/Kbuild 2008-03-07 22:48:44.660783243 +0100
+@@ -3,8 +3,8 @@
+ #
+
+ progs := chroot dd mkdir mkfifo mknod mount pivot_root umount
+-progs += true false sleep ln nuke minips cat
+-progs += insmod uname halt kill readlink cpio
++progs += true false sleep ln nuke minips cat losetup
++progs += insmod uname halt kill readlink cpio modprobe
+
+ static-y := $(addprefix static/, $(progs))
+ shared-y := $(addprefix shared/, $(progs))
+@@ -52,7 +52,10 @@
+ shared/readlink-y := readlink.o
+ static/cpio-y := cpio.o
+ shared/cpio-y := cpio.o
+-
++static/modprobe-y := modprobe.o
++shared/modprobe-y := modprobe.o
++static/losetup-y := losetup.o
++shared/losetup-y := losetup.o
+ # Additionally linked targets
+ always := static/reboot static/poweroff shared/reboot shared/poweroff
+
+Index: klibc-1.5/usr/utils/list.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ klibc-1.5/usr/utils/list.h 2008-03-07 22:33:22.287688586 +0100
+@@ -0,0 +1,238 @@
++/* Stolen from Linux Kernel Source's list.h -- GPL. */
++#ifndef _MODINITTOOLS_LIST_H
++#define _MODINITTOOLS_LIST_H
++
++#undef offsetof
++#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
++
++/**
++ * container_of - cast a member of a structure out to the containing structure
++ *
++ * @ptr: the pointer to the member.
++ * @type: the type of the container struct this is embedded in.
++ * @member: the name of the member within the struct.
++ *
++ */
++#define container_of(ptr, type, member) ({ \
++ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
++ (type *)( (char *)__mptr - offsetof(type,member) );})
++
++/*
++ * Simple doubly linked list implementation.
++ *
++ * Some of the internal functions ("__xxx") are useful when
++ * manipulating whole lists rather than single entries, as
++ * sometimes we already know the next/prev entries and we can
++ * generate better code by using them directly rather than
++ * using the generic single-entry routines.
++ */
++
++struct list_head {
++ struct list_head *next, *prev;
++};
++
++#define LIST_HEAD_INIT(name) { &(name), &(name) }
++
++#define LIST_HEAD(name) \
++ struct list_head name = LIST_HEAD_INIT(name)
++
++#define INIT_LIST_HEAD(ptr) do { \
++ (ptr)->next = (ptr); (ptr)->prev = (ptr); \
++} while (0)
++
++/*
++ * Insert a new entry between two known consecutive entries.
++ *
++ * This is only for internal list manipulation where we know
++ * the prev/next entries already!
++ */
++static inline void __list_add(struct list_head *new,
++ struct list_head *prev,
++ struct list_head *next)
++{
++ next->prev = new;
++ new->next = next;
++ new->prev = prev;
++ prev->next = new;
++}
++
++/**
++ * list_add - add a new entry
++ * @new: new entry to be added
++ * @head: list head to add it after
++ *
++ * Insert a new entry after the specified head.
++ * This is good for implementing stacks.
++ */
++static inline void list_add(struct list_head *new, struct list_head *head)
++{
++ __list_add(new, head, head->next);
++}
++
++/**
++ * list_add_tail - add a new entry
++ * @new: new entry to be added
++ * @head: list head to add it before
++ *
++ * Insert a new entry before the specified head.
++ * This is useful for implementing queues.
++ */
++static inline void list_add_tail(struct list_head *new, struct list_head *head)
++{
++ __list_add(new, head->prev, head);
++}
++
++/*
++ * Delete a list entry by making the prev/next entries
++ * point to each other.
++ *
++ * This is only for internal list manipulation where we know
++ * the prev/next entries already!
++ */
++static inline void __list_del(struct list_head * prev, struct list_head * next)
++{
++ next->prev = prev;
++ prev->next = next;
++}
++
++/**
++ * list_del - deletes entry from list.
++ * @entry: the element to delete from the list.
++ * Note: list_empty on entry does not return true after this, the entry is
++ * in an undefined state.
++ */
++static inline void list_del(struct list_head *entry)
++{
++ __list_del(entry->prev, entry->next);
++}
++
++/**
++ * list_del_init - deletes entry from list and reinitialize it.
++ * @entry: the element to delete from the list.
++ */
++static inline void list_del_init(struct list_head *entry)
++{
++ __list_del(entry->prev, entry->next);
++ INIT_LIST_HEAD(entry);
++}
++
++/**
++ * list_move - delete from one list and add as another's head
++ * @list: the entry to move
++ * @head: the head that will precede our entry
++ */
++static inline void list_move(struct list_head *list, struct list_head *head)
++{
++ __list_del(list->prev, list->next);
++ list_add(list, head);
++}
++
++/**
++ * list_move_tail - delete from one list and add as another's tail
++ * @list: the entry to move
++ * @head: the head that will follow our entry
++ */
++static inline void list_move_tail(struct list_head *list,
++ struct list_head *head)
++{
++ __list_del(list->prev, list->next);
++ list_add_tail(list, head);
++}
++
++/**
++ * list_empty - tests whether a list is empty
++ * @head: the list to test.
++ */
++static inline int list_empty(struct list_head *head)
++{
++ return head->next == head;
++}
++
++static inline void __list_splice(struct list_head *list,
++ struct list_head *head)
++{
++ struct list_head *first = list->next;
++ struct list_head *last = list->prev;
++ struct list_head *at = head->next;
++
++ first->prev = head;
++ head->next = first;
++
++ last->next = at;
++ at->prev = last;
++}
++
++/**
++ * list_splice - join two lists
++ * @list: the new list to add.
++ * @head: the place to add it in the first list.
++ */
++static inline void list_splice(struct list_head *list, struct list_head *head)
++{
++ if (!list_empty(list))
++ __list_splice(list, head);
++}
++
++/**
++ * list_splice_init - join two lists and reinitialise the emptied list.
++ * @list: the new list to add.
++ * @head: the place to add it in the first list.
++ *
++ * The list at @list is reinitialised
++ */
++static inline void list_splice_init(struct list_head *list,
++ struct list_head *head)
++{
++ if (!list_empty(list)) {
++ __list_splice(list, head);
++ INIT_LIST_HEAD(list);
++ }
++}
++
++/**
++ * list_entry - get the struct for this entry
++ * @ptr: the &struct list_head pointer.
++ * @type: the type of the struct this is embedded in.
++ * @member: the name of the list_struct within the struct.
++ */
++#define list_entry(ptr, type, member) \
++ container_of(ptr, type, member)
++
++/**
++ * list_for_each - iterate over a list
++ * @pos: the &struct list_head to use as a loop counter.
++ * @head: the head for your list.
++ */
++#define list_for_each(pos, head) \
++ for (pos = (head)->next; pos != (head); pos = pos->next)
++
++/**
++ * list_for_each_prev - iterate over a list backwards
++ * @pos: the &struct list_head to use as a loop counter.
++ * @head: the head for your list.
++ */
++#define list_for_each_prev(pos, head) \
++ for (pos = (head)->prev; pos != (head); pos = pos->prev)
++
++/**
++ * list_for_each_safe - iterate over a list safe against removal of list entry
++ * @pos: the &struct list_head to use as a loop counter.
++ * @n: another &struct list_head to use as temporary storage
++ * @head: the head for your list.
++ */
++#define list_for_each_safe(pos, n, head) \
++ for (pos = (head)->next, n = pos->next; pos != (head); \
++ pos = n, n = pos->next)
++
++/**
++ * list_for_each_entry - iterate over list of given type
++ * @pos: the type * to use as a loop counter.
++ * @head: the head for your list.
++ * @member: the name of the list_struct within the struct.
++ */
++#define list_for_each_entry(pos, head, member) \
++ for (pos = list_entry((head)->next, typeof(*pos), member); \
++ &pos->member != (head); \
++ pos = list_entry(pos->member.next, typeof(*pos), member))
++
++#endif
+Index: klibc-1.5/usr/utils/modprobe.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ klibc-1.5/usr/utils/modprobe.c 2008-03-08 03:05:51.847688952 +0100
+@@ -0,0 +1,1710 @@
++/* modprobe.c: insert a module into the kernel, intelligently.
++ Copyright (C) 2001 Rusty Russell.
++ Copyright (C) 2002, 2003 Rusty Russell, IBM Corporation.
++
++ 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
++*/
++#define _GNU_SOURCE /* asprintf */
++
++#include <sys/utsname.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <sys/mman.h>
++#include <fcntl.h>
++#include <stdarg.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <ctype.h>
++#include <string.h>
++#include <errno.h>
++#include <unistd.h>
++#include <dirent.h>
++#include <limits.h>
++#include <elf.h>
++#include <getopt.h>
++#include <fnmatch.h>
++#include <asm/unistd.h>
++#include <sys/wait.h>
++#include <syslog.h>
++#include <zlib.h>
++
++#define streq(a,b) (strcmp((a),(b)) == 0)
++#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
++
++#include "list.h"
++static inline void try_old_version(const char *progname, char *argv[])
++{
++}
++extern long init_module(void *, unsigned long, const char *);
++extern long delete_module(const char *, unsigned int);
++
++struct module {
++ struct list_head list;
++ char *modname;
++ char filename[0];
++};
++
++#ifndef MODULE_DIR
++#define MODULE_DIR "/lib/modules"
++#endif
++
++typedef void (*errfn_t)(const char *fmt, ...);
++
++/* Do we use syslog or stderr for messages? */
++static int log;
++
++static void message(const char *prefix, const char *fmt, va_list *arglist)
++{
++ char *buf, *buf2;
++
++ vasprintf(&buf, fmt, *arglist);
++ asprintf(&buf2, "%s%s", prefix, buf);
++
++ if (log)
++ syslog(LOG_NOTICE, "%s", buf2);
++ else
++ fprintf(stderr, "%s", buf2);
++ free(buf2);
++ free(buf);
++}
++void *grab_contents(gzFile *gzfd, unsigned long *size)
++{
++ unsigned int max = 16384;
++ void *buffer = malloc(max);
++ int ret;
++
++ if (!buffer)
++ return NULL;
++
++ *size = 0;
++ while ((ret = gzread(gzfd, buffer + *size, max - *size)) > 0) {
++ *size += ret;
++ if (*size == max) {
++ buffer = realloc(buffer, max *= 2);
++ if (!buffer)
++ return NULL;
++ }
++ }
++ if (ret < 0) {
++ free(buffer);
++ buffer = NULL;
++ }
++ return buffer;
++}
++
++void *grab_fd(int fd, unsigned long *size)
++{
++ gzFile gzfd;
++
++ gzfd = gzdopen(fd, "rb");
++ if (!gzfd)
++ return NULL;
++
++ /* gzclose(gzfd) would close fd, which would drop locks.
++ Don't blame zlib: POSIX locking semantics are so horribly
++ broken that they should be ripped out. */
++ return grab_contents(gzfd, size);
++}
++void release_file(void *data, unsigned long size)
++{
++ free(data);
++}
++
++
++static int warned = 0;
++static void warn(const char *fmt, ...)
++{
++ va_list arglist;
++ warned++;
++ va_start(arglist, fmt);
++ message("WARNING: ", fmt, &arglist);
++ va_end(arglist);
++}
++
++static void fatal(const char *fmt, ...)
++{
++ va_list arglist;
++ va_start(arglist, fmt);
++ message("FATAL: ", fmt, &arglist);
++ va_end(arglist);
++ exit(1);
++}
++
++
++static void grammar(const char *cmd, const char *filename, unsigned int line)
++{
++ warn("%s line %u: ignoring bad line starting with '%s'\n",
++ filename, line, cmd);
++}
++
++static void *do_nofail(void *ptr, const char *file, int line, const char *expr)
++{
++ if (!ptr) {
++ fatal("Memory allocation failure %s line %d: %s.\n",
++ file, line, expr);
++ }
++ return ptr;
++}
++
++#define NOFAIL(ptr) do_nofail((ptr), __FILE__, __LINE__, #ptr)
++
++static void print_usage(const char *progname)
++{
++ fprintf(stderr,
++ "Usage: %s [-v] [-V] [-C config-file] [-n] [-i] [-q] [-b] [-o <modname>] <modname> [parameters...]\n"
++ "%s -r [-n] [-i] [-v] <modulename> ...\n"
++ "%s -l -t <dirname> [ -a <modulename> ...]\n",
++ progname, progname, progname);
++ exit(1);
++}
++
++static int fgetc_wrapped(FILE *file, unsigned int *linenum)
++{
++ for (;;) {
++ int ch = fgetc(file);
++ if (ch != '\\')
++ return ch;
++ ch = fgetc(file);
++ if (ch != '\n')
++ return ch;
++ if (linenum)
++ (*linenum)++;
++ }
++}
++
++static char *getline_wrapped(FILE *file, unsigned int *linenum)
++{
++ int size = 1024;
++ int i = 0;
++ char *buf = NOFAIL(malloc(size));
++ for(;;) {
++ int ch = fgetc_wrapped(file, linenum);
++ if (i == size) {
++ size *= 2;
++ buf = NOFAIL(realloc(buf, size));
++ }
++ if (ch < 0 && i == 0) {
++ free(buf);
++ return NULL;
++ }
++ if (ch < 0 || ch == '\n') {
++ if (linenum)
++ (*linenum)++;
++ buf[i] = '\0';
++ return NOFAIL(realloc(buf, i+1));
++ }
++ buf[i++] = ch;
++ }
++}
++
++static struct module *find_module(const char *filename, struct list_head *list)
++{
++ struct module *i;
++
++ list_for_each_entry(i, list, list) {
++ if (strcmp(i->filename, filename) == 0)
++ return i;
++ }
++ return NULL;
++}
++
++/* Convert filename to the module name. Works if filename == modname, too. */
++static void filename2modname(char *modname, const char *filename)
++{
++ const char *afterslash;
++ unsigned int i;
++
++ afterslash = strrchr(filename, '/');
++ if (!afterslash)
++ afterslash = filename;
++ else
++ afterslash++;
++
++ /* Convert to underscores, stop at first . */
++ for (i = 0; afterslash[i] && afterslash[i] != '.'; i++) {
++ if (afterslash[i] == '-')
++ modname[i] = '_';
++ else
++ modname[i] = afterslash[i];
++ }
++ modname[i] = '\0';
++}
++
++static int lock_file(const char *filename)
++{
++ int fd = open(filename, O_RDWR, 0);
++
++ if (fd >= 0) {
++ struct flock lock;
++ lock.l_type = F_WRLCK;
++ lock.l_whence = SEEK_SET;
++ lock.l_start = 0;
++ lock.l_len = 1;
++ fcntl(fd, F_SETLKW, &lock);
++ } else
++ /* Read-only filesystem? There goes locking... */
++ fd = open(filename, O_RDONLY, 0);
++ return fd;
++}
++
++static void unlock_file(int fd)
++{
++ /* Valgrind is picky... */
++ close(fd);
++}
++
++static void add_module(char *filename, int namelen, struct list_head *list)
++{
++ struct module *mod;
++
++ /* If it's a duplicate: move it to the end, so it gets
++ inserted where it is *first* required. */
++ mod = find_module(filename, list);
++ if (mod)
++ list_del(&mod->list);
++ else {
++ /* No match. Create a new module. */
++ mod = NOFAIL(malloc(sizeof(struct module) + namelen + 1));
++ memcpy(mod->filename, filename, namelen);
++ mod->filename[namelen] = '\0';
++ mod->modname = NOFAIL(malloc(namelen + 1));
++ filename2modname(mod->modname, mod->filename);
++ }
++
++ list_add_tail(&mod->list, list);
++}
++
++/* Compare len chars of a to b, with _ and - equivalent. */
++static int modname_equal(const char *a, const char *b, unsigned int len)
++{
++ unsigned int i;
++
++ if (strlen(b) != len)
++ return 0;
++
++ for (i = 0; i < len; i++) {
++ if ((a[i] == '_' || a[i] == '-')
++ && (b[i] == '_' || b[i] == '-'))
++ continue;
++ if (a[i] != b[i])
++ return 0;
++ }
++ return 1;
++}
++
++/* Fills in list of modules if this is the line we want. */
++static int add_modules_dep_line(char *line,
++ const char *name,
++ struct list_head *list)
++{
++ char *ptr;
++ int len;
++ char *modname;
++
++ /* Ignore lines without : or which start with a # */
++ ptr = strchr(line, ':');
++ if (ptr == NULL || line[strspn(line, "\t ")] == '#')
++ return 0;
++
++ /* Is this the module we are looking for? */
++ *ptr = '\0';
++ if (strrchr(line, '/'))
++ modname = strrchr(line, '/') + 1;
++ else
++ modname = line;
++
++ len = strlen(modname);
++ if (strchr(modname, '.'))
++ len = strchr(modname, '.') - modname;
++ if (!modname_equal(modname, name, len))
++ return 0;
++
++ /* Create the list. */
++ add_module(line, ptr - line, list);
++
++ ptr++;
++ for(;;) {
++ char *dep_start;
++ ptr += strspn(ptr, " \t");
++ if (*ptr == '\0')
++ break;
++ dep_start = ptr;
++ ptr += strcspn(ptr, " \t");
++ add_module(dep_start, ptr - dep_start, list);
++ }
++ return 1;
++}
++
++static void read_depends(const char *dirname,
++ const char *start_name,
++ struct list_head *list)
++{
++ char *modules_dep_name;
++ char *line;
++ FILE *modules_dep;
++ int done = 0;
++
++ asprintf(&modules_dep_name, "%s/%s", dirname, "modules.dep");
++ modules_dep = fopen(modules_dep_name, "r");
++ if (!modules_dep)
++ fatal("Could not load %s: %s\n",
++ modules_dep_name, strerror(errno));
++
++ /* Stop at first line, as we can have duplicates (eg. symlinks
++ from boot/ */
++ while (!done && (line = getline_wrapped(modules_dep, NULL)) != NULL) {
++ done = add_modules_dep_line(line, start_name, list);
++ free(line);
++ }
++ fclose(modules_dep);
++ free(modules_dep_name);
++}
++
++/* We use error numbers in a loose translation... */
++static const char *insert_moderror(int err)
++{
++ switch (err) {
++ case ENOEXEC:
++ return "Invalid module format";
++ case ENOENT:
++ return "Unknown symbol in module, or unknown parameter (see dmesg)";
++ case ENOSYS:
++ return "Kernel does not have module support";
++ default:
++ return strerror(err);
++ }
++}
++
++static const char *remove_moderror(int err)
++{
++ switch (err) {
++ case ENOENT:
++ return "No such module";
++ case ENOSYS:
++ return "Kernel does not have module unloading support";
++ default:
++ return strerror(err);
++ }
++}
++
++/* Is module in /proc/modules? If so, fill in usecount if not NULL.
++ 0 means no, 1 means yes, -1 means unknown.
++ */
++static int module_in_kernel(const char *modname, unsigned int *usecount)
++{
++ FILE *proc_modules;
++ char *line;
++
++again:
++ /* Might not be mounted yet. Don't fail. */
++ proc_modules = fopen("/proc/modules", "r");
++ if (!proc_modules)
++ return -1;
++
++ while ((line = getline_wrapped(proc_modules, NULL)) != NULL) {
++ char *entry = strtok(line, " \n");
++
++ if (entry && streq(entry, modname)) {
++ /* If it exists, usecount is the third entry. */
++ if (!strtok(NULL, " \n"))
++ goto out;
++
++ if (!(entry = strtok(NULL, " \n"))) /* usecount */
++ goto out;
++ else
++ if (usecount)
++ *usecount = atoi(entry);
++
++ /* Followed by - then status. */
++ if (strtok(NULL, " \n")
++ && (entry = strtok(NULL, " \n")) != NULL) {
++ /* Locking will fail on ro fs, we might hit
++ * cases where module is in flux. Spin. */
++ if (streq(entry, "Loading")
++ || streq(entry, "Unloading")) {
++ usleep(100000);
++ free(line);
++ fclose(proc_modules);
++ goto again;
++ }
++ }
++
++ out:
++ free(line);
++ fclose(proc_modules);
++ return 1;
++ }
++ free(line);
++ }
++ fclose(proc_modules);
++ return 0;
++}
++
++static void replace_modname(struct module *module,
++ void *mem, unsigned long len,
++ const char *oldname, const char *newname)
++{
++ char *p;
++
++ /* 64 - sizeof(unsigned long) - 1 */
++ if (strlen(newname) > 55)
++ fatal("New name %s is too long\n", newname);
++
++ /* Find where it is in the module structure. Don't assume layout! */
++ for (p = mem; p < (char *)mem + len - strlen(oldname); p++) {
++ if (memcmp(p, oldname, strlen(oldname)) == 0) {
++ strcpy(p, newname);
++ return;
++ }
++ }
++
++ warn("Could not find old name in %s to replace!\n", module->filename);
++}
++
++static void *get_section32(void *file,
++ unsigned long size,
++ const char *name,
++ unsigned long *secsize)
++{
++ Elf32_Ehdr *hdr = file;
++ Elf32_Shdr *sechdrs = file + hdr->e_shoff;
++ const char *secnames;
++ unsigned int i;
++
++ /* Too short? */
++ if (size < sizeof(*hdr))
++ return NULL;
++ if (size < hdr->e_shoff + hdr->e_shnum * sizeof(sechdrs[0]))
++ return NULL;
++ if (size < sechdrs[hdr->e_shstrndx].sh_offset)
++ return NULL;
++
++ secnames = file + sechdrs[hdr->e_shstrndx].sh_offset;
++ for (i = 1; i < hdr->e_shnum; i++)
++ if (strcmp(secnames + sechdrs[i].sh_name, name) == 0) {
++ *secsize = sechdrs[i].sh_size;
++ return file + sechdrs[i].sh_offset;
++ }
++ return NULL;
++}
++
++static void *get_section64(void *file,
++ unsigned long size,
++ const char *name,
++ unsigned long *secsize)
++{
++ Elf64_Ehdr *hdr = file;
++ Elf64_Shdr *sechdrs = file + hdr->e_shoff;
++ const char *secnames;
++ unsigned int i;
++
++ /* Too short? */
++ if (size < sizeof(*hdr))
++ return NULL;
++ if (size < hdr->e_shoff + hdr->e_shnum * sizeof(sechdrs[0]))
++ return NULL;
++ if (size < sechdrs[hdr->e_shstrndx].sh_offset)
++ return NULL;
++
++ secnames = file + sechdrs[hdr->e_shstrndx].sh_offset;
++ for (i = 1; i < hdr->e_shnum; i++)
++ if (strcmp(secnames + sechdrs[i].sh_name, name) == 0) {
++ *secsize = sechdrs[i].sh_size;
++ return file + sechdrs[i].sh_offset;
++ }
++ return NULL;
++}
++
++static int elf_ident(void *mod, unsigned long size)
++{
++ /* "\177ELF" <byte> where byte = 001 for 32-bit, 002 for 64 */
++ char *ident = mod;
++
++ if (size < EI_CLASS || memcmp(mod, ELFMAG, SELFMAG) != 0)
++ return ELFCLASSNONE;
++ return ident[EI_CLASS];
++}
++
++static void *get_section(void *file,
++ unsigned long size,
++ const char *name,
++ unsigned long *secsize)
++{
++ switch (elf_ident(file, size)) {
++ case ELFCLASS32:
++ return get_section32(file, size, name, secsize);
++ case ELFCLASS64:
++ return get_section64(file, size, name, secsize);
++ default:
++ return NULL;
++ }
++}
++
++static void rename_module(struct module *module,
++ void *mod,
++ unsigned long len,
++ const char *newname)
++{
++ void *modstruct;
++ unsigned long modstruct_len;
++
++ /* Old-style */
++ modstruct = get_section(mod, len, ".gnu.linkonce.this_module",
++ &modstruct_len);
++ /* New-style */
++ if (!modstruct)
++ modstruct = get_section(mod, len, "__module", &modstruct_len);
++ if (!modstruct)
++ warn("Could not find module name to change in %s\n",
++ module->filename);
++ else
++ replace_modname(module, modstruct, modstruct_len,
++ module->modname, newname);
++}
++
++/* Kernel told to ignore these sections if SHF_ALLOC not set. */
++static void invalidate_section32(void *mod, const char *secname)
++{
++ Elf32_Ehdr *hdr = mod;
++ Elf32_Shdr *sechdrs = mod + hdr->e_shoff;
++ const char *secnames = mod + sechdrs[hdr->e_shstrndx].sh_offset;
++ unsigned int i;
++
++ for (i = 1; i < hdr->e_shnum; i++)
++ if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0)
++ sechdrs[i].sh_flags &= ~SHF_ALLOC;
++}
++
++static void invalidate_section64(void *mod, const char *secname)
++{
++ Elf64_Ehdr *hdr = mod;
++ Elf64_Shdr *sechdrs = mod + hdr->e_shoff;
++ const char *secnames = mod + sechdrs[hdr->e_shstrndx].sh_offset;
++ unsigned int i;
++
++ for (i = 1; i < hdr->e_shnum; i++)
++ if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0)
++ sechdrs[i].sh_flags &= ~(unsigned long long)SHF_ALLOC;
++}
++
++static void strip_section(struct module *module,
++ void *mod,
++ unsigned long len,
++ const char *secname)
++{
++ switch (elf_ident(mod, len)) {
++ case ELFCLASS32:
++ invalidate_section32(mod, secname);
++ break;
++ case ELFCLASS64:
++ invalidate_section64(mod, secname);
++ break;
++ default:
++ warn("Unknown module format in %s: not forcing version\n",
++ module->filename);
++ }
++}
++
++static const char *next_string(const char *string, unsigned long *secsize)
++{
++ /* Skip non-zero chars */
++ while (string[0]) {
++ string++;
++ if ((*secsize)-- <= 1)
++ return NULL;
++ }
++
++ /* Skip any zero padding. */
++ while (!string[0]) {
++ string++;
++ if ((*secsize)-- <= 1)
++ return NULL;
++ }
++ return string;
++}
++
++static void clear_magic(struct module *module, void *mod, unsigned long len)
++{
++ const char *p;
++ unsigned long modlen;
++
++ /* Old-style: __vermagic section */
++ strip_section(module, mod, len, "__vermagic");
++
++ /* New-style: in .modinfo section */
++ for (p = get_section(mod, len, ".modinfo", &modlen);
++ p;
++ p = next_string(p, &modlen)) {
++ if (strncmp(p, "vermagic=", strlen("vermagic=")) == 0) {
++ memset((char *)p, 0, strlen(p));
++ return;
++ }
++ }
++}
++
++struct module_options
++{
++ struct module_options *next;
++ char *modulename;
++ char *options;
++};
++
++struct module_command
++{
++ struct module_command *next;
++ char *modulename;
++ char *command;
++};
++
++struct module_alias
++{
++ struct module_alias *next;
++ char *module;
++};
++
++struct module_blacklist
++{
++ struct module_blacklist *next;
++ char *modulename;
++};
++
++/* Link in a new option line from the config file. */
++static struct module_options *
++add_options(const char *modname,
++ const char *option,
++ struct module_options *options)
++{
++ struct module_options *new;
++ char *tab;
++
++ new = NOFAIL(malloc(sizeof(*new)));
++ new->modulename = NOFAIL(strdup(modname));
++ new->options = NOFAIL(strdup(option));
++ /* We can handle tabs, kernel can't. */
++ for (tab = strchr(new->options, '\t'); tab; tab = strchr(tab, '\t'))
++ *tab = ' ';
++ new->next = options;
++ return new;
++}
++
++/* Link in a new install line from the config file. */
++static struct module_command *
++add_command(const char *modname,
++ const char *command,
++ struct module_command *commands)
++{
++ struct module_command *new;
++
++ new = NOFAIL(malloc(sizeof(*new)));
++ new->modulename = NOFAIL(strdup(modname));
++ new->command = NOFAIL(strdup(command));
++ new->next = commands;
++ return new;
++}
++
++/* Link in a new alias line from the config file. */
++static struct module_alias *
++add_alias(const char *modname, struct module_alias *aliases)
++{
++ struct module_alias *new;
++
++ new = NOFAIL(malloc(sizeof(*new)));
++ new->module = NOFAIL(strdup(modname));
++ new->next = aliases;
++ return new;
++}
++
++/* Link in a new blacklist line from the config file. */
++static struct module_blacklist *
++add_blacklist(const char *modname, struct module_blacklist *blacklist)
++{
++ struct module_blacklist *new;
++
++ new = NOFAIL(malloc(sizeof(*new)));
++ new->modulename = NOFAIL(strdup(modname));
++ new->next = blacklist;
++ return new;
++}
++
++/* Find blacklist commands if any. */
++static int
++find_blacklist(const char *modname, const struct module_blacklist *blacklist)
++{
++ while (blacklist) {
++ if (strcmp(blacklist->modulename, modname) == 0)
++ return 1;
++ blacklist = blacklist->next;
++ }
++ return 0;
++}
++
++/* return a new alias list, with backlisted elems filtered out */
++static struct module_alias *
++apply_blacklist(const struct module_alias *aliases,
++ const struct module_blacklist *blacklist)
++{
++ struct module_alias *result = NULL;
++ while (aliases) {
++ char *modname = aliases->module;
++ if (!find_blacklist(modname, blacklist))
++ result = add_alias(modname, result);
++ aliases = aliases->next;
++ }
++ return result;
++}
++
++/* Find install commands if any. */
++static const char *find_command(const char *modname,
++ const struct module_command *commands)
++{
++ while (commands) {
++ if (fnmatch(commands->modulename, modname, 0) == 0)
++ return commands->command;
++ commands = commands->next;
++ }
++ return NULL;
++}
++
++static char *append_option(char *options, const char *newoption)
++{
++ options = NOFAIL(realloc(options, strlen(options) + 1
++ + strlen(newoption) + 1));
++ if (strlen(options)) strcat(options, " ");
++ strcat(options, newoption);
++ return options;
++}
++
++/* Add to options */
++static char *add_extra_options(const char *modname,
++ char *optstring,
++ const struct module_options *options)
++{
++ while (options) {
++ if (strcmp(options->modulename, modname) == 0)
++ optstring = append_option(optstring, options->options);
++ options = options->next;
++ }
++ return optstring;
++}
++
++/* If we don't flush, then child processes print before we do */
++static void verbose_printf(int verbose, const char *fmt, ...)
++{
++ va_list arglist;
++
++ if (verbose) {
++ va_start(arglist, fmt);
++ vprintf(fmt, arglist);
++ fflush(stdout);
++ va_end(arglist);
++ }
++}
++
++/* Do an install/remove command: replace $CMDLINE_OPTS if it's specified. */
++static void do_command(const char *modname,
++ const char *command,
++ int verbose, int dry_run,
++ errfn_t error,
++ const char *type,
++ const char *cmdline_opts)
++{
++ int ret;
++ char *p, *replaced_cmd = NOFAIL(strdup(command));
++
++ while ((p = strstr(replaced_cmd, "$CMDLINE_OPTS")) != NULL) {
++ char *new;
++ asprintf(&new, "%.*s%s%s",
++ p - replaced_cmd, replaced_cmd, cmdline_opts,
++ p + strlen("$CMDLINE_OPTS"));
++ NOFAIL(new);
++ free(replaced_cmd);
++ replaced_cmd = new;
++ }
++
++ verbose_printf(verbose, "%s %s\n", type, replaced_cmd);
++ if (dry_run)
++ return;
++
++ setenv("MODPROBE_MODULE", modname, 1);
++ ret = system(replaced_cmd);
++ if (ret == -1 || WEXITSTATUS(ret))
++ error("Error running %s command for %s\n", type, modname);
++ free(replaced_cmd);
++}
++
++/* Actually do the insert. Frees second arg. */
++static void insmod(struct list_head *list,
++ char *optstring,
++ const char *newname,
++ int first_time,
++ errfn_t error,
++ int dry_run,
++ int verbose,
++ const struct module_options *options,
++ const struct module_command *commands,
++ int ignore_commands,
++ int ignore_proc,
++ int strip_vermagic,
++ int strip_modversion,
++ const char *cmdline_opts)
++{
++ int ret, fd;
++ unsigned long len;
++ void *map;
++ const char *command;
++ struct module *mod = list_entry(list->next, struct module, list);
++
++ /* Take us off the list. */
++ list_del(&mod->list);
++
++ /* Do things we (or parent) depend on first, but don't die if
++ * they fail. */
++ if (!list_empty(list)) {
++ insmod(list, NOFAIL(strdup("")), NULL, 0, warn,
++ dry_run, verbose, options, commands, 0, ignore_proc,
++ strip_vermagic, strip_modversion, cmdline_opts);
++ }
++
++ /* Lock before we look, in case it's initializing. */
++ fd = lock_file(mod->filename);
++ if (fd < 0) {
++ error("Could not open '%s': %s\n",
++ mod->filename, strerror(errno));
++ goto out_optstring;
++ }
++
++ /* Don't do ANYTHING if already in kernel. */
++ if (!ignore_proc
++ && module_in_kernel(newname ?: mod->modname, NULL) == 1) {
++ if (first_time)
++ error("Module %s already in kernel.\n",
++ newname ?: mod->modname);
++ goto out_unlock;
++ }
++
++ command = find_command(mod->modname, commands);
++ if (command && !ignore_commands) {
++ /* It might recurse: unlock. */
++ unlock_file(fd);
++ do_command(mod->modname, command, verbose, dry_run, error,
++ "install", cmdline_opts);
++ goto out_optstring;
++ }
++
++ map = grab_fd(fd, &len);
++ if (!map) {
++ error("Could not read '%s': %s\n",
++ mod->filename, strerror(errno));
++ goto out_unlock;
++ }
++
++ /* Rename it? */
++ if (newname)
++ rename_module(mod, map, len, newname);
++
++ if (strip_modversion)
++ strip_section(mod, map, len, "__versions");
++ if (strip_vermagic)
++ clear_magic(mod, map, len);
++
++ /* Config file might have given more options */
++ optstring = add_extra_options(mod->modname, optstring, options);
++
++ verbose_printf(verbose, "insmod %s %s\n", mod->filename, optstring);
++
++ if (dry_run)
++ goto out;
++
++ ret = init_module(map, len, optstring);
++ if (ret != 0) {
++ if (errno == EEXIST) {
++ if (first_time)
++ error("Module %s already in kernel.\n",
++ newname ?: mod->modname);
++ goto out_unlock;
++ }
++ error("Error inserting %s (%s): %s\n",
++ mod->modname, mod->filename, insert_moderror(errno));
++ }
++ out:
++ release_file(map, len);
++ out_unlock:
++ unlock_file(fd);
++ out_optstring:
++ free(optstring);
++ return;
++}
++
++/* Do recursive removal. */
++static void rmmod(struct list_head *list,
++ const char *name,
++ int first_time,
++ errfn_t error,
++ int dry_run,
++ int verbose,
++ struct module_command *commands,
++ int ignore_commands,
++ int ignore_inuse,
++ const char *cmdline_opts)
++{
++ const char *command;
++ unsigned int usecount = 0;
++ int lock;
++ struct module *mod = list_entry(list->next, struct module, list);
++
++ /* Take first one off the list. */
++ list_del(&mod->list);
++
++ /* Ignore failure; it's best effort here. */
++ lock = lock_file(mod->filename);
++
++ if (!name)
++ name = mod->modname;
++
++ /* Even if renamed, find commands to orig. name. */
++ command = find_command(mod->modname, commands);
++ if (command && !ignore_commands) {
++ /* It might recurse: unlock. */
++ unlock_file(lock);
++ do_command(mod->modname, command, verbose, dry_run, error,
++ "remove", cmdline_opts);
++ goto remove_rest_no_unlock;
++ }
++
++ if (module_in_kernel(name, &usecount) == 0)
++ goto nonexistent_module;
++
++ if (usecount != 0) {
++ if (!ignore_inuse)
++ error("Module %s is in use.\n", name);
++ goto remove_rest;
++ }
++
++ verbose_printf(verbose, "rmmod %s\n", mod->filename);
++
++ if (dry_run)
++ goto remove_rest;
++
++ if (delete_module(name, O_EXCL) != 0) {
++ if (errno == ENOENT)
++ goto nonexistent_module;
++ error("Error removing %s (%s): %s\n",
++ name, mod->filename,
++ remove_moderror(errno));
++ }
++
++ remove_rest:
++ unlock_file(lock);
++ remove_rest_no_unlock:
++ /* Now do things we depend. */
++ if (!list_empty(list))
++ rmmod(list, NULL, 0, warn, dry_run, verbose, commands,
++ 0, 1, cmdline_opts);
++ return;
++
++nonexistent_module:
++ if (first_time)
++ fatal("Module %s is not in kernel.\n", mod->modname);
++ goto remove_rest;
++}
++
++/* Does path contain directory(s) subpath? */
++static int type_matches(const char *path, const char *subpath)
++{
++ char *subpath_with_slashes;
++ int ret;
++
++ asprintf(&subpath_with_slashes, "/%s/", subpath);
++ NOFAIL(subpath_with_slashes);
++
++ ret = (strstr(path, subpath_with_slashes) != NULL);
++ free(subpath_with_slashes);
++ return ret;
++}
++
++static char *underscores(char *string)
++{
++ if (string) {
++ unsigned int i;
++ for (i = 0; string[i]; i++)
++ if (string[i] == '-')
++ string[i] = '_';
++ }
++ return string;
++}
++
++static int do_wildcard(const char *dirname,
++ const char *type,
++ const char *wildcard)
++{
++ char modules_dep_name[strlen(dirname) + sizeof("modules.dep") + 1];
++ char *line, *wcard;
++ FILE *modules_dep;
++
++ /* Canonicalize wildcard */
++ wcard = strdup(wildcard);
++ underscores(wcard);
++
++ sprintf(modules_dep_name, "%s/%s", dirname, "modules.dep");
++ modules_dep = fopen(modules_dep_name, "r");
++ if (!modules_dep)
++ fatal("Could not load %s: %s\n",
++ modules_dep_name, strerror(errno));
++
++ while ((line = getline_wrapped(modules_dep, NULL)) != NULL) {
++ char *ptr;
++
++ /* Ignore lines without : or which start with a # */
++ ptr = strchr(line, ':');
++ if (ptr == NULL || line[strspn(line, "\t ")] == '#')
++ goto next;
++ *ptr = '\0';
++
++ /* "type" must match complete directory component(s). */
++ if (!type || type_matches(line, type)) {
++ char modname[strlen(line)+1];
++
++ filename2modname(modname, line);
++ if (fnmatch(wcard, modname, 0) == 0)
++ printf("%s\n", line);
++ }
++ next:
++ free(line);
++ }
++
++ free(wcard);
++ return 0;
++}
++
++static char *strsep_skipspace(char **string, char *delim)
++{
++ if (!*string)
++ return NULL;
++ *string += strspn(*string, delim);
++ return strsep(string, delim);
++}
++
++/* Recursion */
++static int read_config(const char *filename,
++ const char *name,
++ int dump_only,
++ int removing,
++ struct module_options **options,
++ struct module_command **commands,
++ struct module_alias **alias,
++ struct module_blacklist **blacklist);
++
++/* FIXME: Maybe should be extended to "alias a b [and|or c]...". --RR */
++static int read_config_file(const char *filename,
++ const char *name,
++ int dump_only,
++ int removing,
++ struct module_options **options,
++ struct module_command **commands,
++ struct module_alias **aliases,
++ struct module_blacklist **blacklist)
++{
++ char *line;
++ unsigned int linenum = 0;
++ FILE *cfile;
++
++ cfile = fopen(filename, "r");
++ if (!cfile)
++ return 0;
++
++ while ((line = getline_wrapped(cfile, &linenum)) != NULL) {
++ char *ptr = line;
++ char *cmd, *modname;
++
++ if (dump_only)
++ printf("%s\n", line);
++
++ cmd = strsep_skipspace(&ptr, "\t ");
++ if (cmd == NULL || cmd[0] == '#' || cmd[0] == '\0')
++ continue;
++
++ if (strcmp(cmd, "alias") == 0) {
++ char *wildcard
++ = underscores(strsep_skipspace(&ptr, "\t "));
++ char *realname
++ = underscores(strsep_skipspace(&ptr, "\t "));
++
++ if (!wildcard || !realname)
++ grammar(cmd, filename, linenum);
++ else if (fnmatch(wildcard,name,0) == 0)
++ *aliases = add_alias(realname, *aliases);
++ } else if (strcmp(cmd, "include") == 0) {
++ struct module_alias *newalias = NULL;
++ char *newfilename;
++
++ newfilename = strsep_skipspace(&ptr, "\t ");
++ if (!newfilename)
++ grammar(cmd, filename, linenum);
++ else {
++ if (!read_config(newfilename, name,
++ dump_only, removing,
++ options, commands, &newalias,
++ blacklist))
++ warn("Failed to open included"
++ " config file %s: %s\n",
++ newfilename, strerror(errno));
++
++ /* Files included override aliases,
++ etc that was already set ... */
++ if (newalias)
++ *aliases = newalias;
++ }
++ } else if (strcmp(cmd, "options") == 0) {
++ modname = strsep_skipspace(&ptr, "\t ");
++ if (!modname || !ptr)
++ grammar(cmd, filename, linenum);
++ else {
++ ptr += strspn(ptr, "\t ");
++ *options = add_options(underscores(modname),
++ ptr, *options);
++ }
++ } else if (strcmp(cmd, "install") == 0) {
++ modname = strsep_skipspace(&ptr, "\t ");
++ if (!modname || !ptr)
++ grammar(cmd, filename, linenum);
++ else if (!removing) {
++ ptr += strspn(ptr, "\t ");
++ *commands = add_command(underscores(modname),
++ ptr, *commands);
++ }
++ } else if (strcmp(cmd, "blacklist") == 0) {
++ modname = strsep_skipspace(&ptr, "\t ");
++ if (!modname)
++ grammar(cmd, filename, linenum);
++ else if (!removing) {
++ *blacklist = add_blacklist(underscores(modname),
++ *blacklist);
++ }
++ } else if (strcmp(cmd, "remove") == 0) {
++ modname = strsep_skipspace(&ptr, "\t ");
++ if (!modname || !ptr)
++ grammar(cmd, filename, linenum);
++ else if (removing) {
++ ptr += strspn(ptr, "\t ");
++ *commands = add_command(underscores(modname),
++ ptr, *commands);
++ }
++ } else
++ grammar(cmd, filename, linenum);
++
++ free(line);
++ }
++ fclose(cfile);
++ return 1;
++}
++
++/* Simple format, ignore lines starting with #, one command per line.
++ Returns true or false. */
++static int read_config(const char *filename,
++ const char *name,
++ int dump_only,
++ int removing,
++ struct module_options **options,
++ struct module_command **commands,
++ struct module_alias **aliases,
++ struct module_blacklist **blacklist)
++{
++ DIR *dir;
++ int ret = 0;
++
++ /* ignore everything in this directory */
++ if (streq(filename, "/etc/modprobe.d/arch"))
++ return 1;
++
++ /* Reiser4 has file/directory duality: treat it as both. */
++ dir = opendir(filename);
++ if (dir) {
++ struct dirent *i;
++ while ((i = readdir(dir)) != NULL) {
++ if (!streq(i->d_name,".") && !streq(i->d_name,"..")) {
++ char sub[strlen(filename) + 1
++ + strlen(i->d_name) + 1];
++
++ sprintf(sub, "%s/%s", filename, i->d_name);
++ if (!read_config(sub, name,
++ dump_only, removing, options,
++ commands, aliases, blacklist))
++ warn("Failed to open"
++ " config file %s: %s\n",
++ sub, strerror(errno));
++ }
++ }
++ closedir(dir);
++ ret = 1;
++ }
++
++ if (read_config_file(filename, name, dump_only, removing,
++ options, commands, aliases, blacklist))
++ ret = 1;
++
++ return ret;
++}
++
++static const char *default_configs[] =
++{
++ "/etc/modprobe.conf",
++ "/etc/modprobe.d",
++};
++
++static void read_toplevel_config(const char *filename,
++ const char *name,
++ int dump_only,
++ int removing,
++ struct module_options **options,
++ struct module_command **commands,
++ struct module_alias **aliases,
++ struct module_blacklist **blacklist)
++{
++ unsigned int i;
++
++ if (filename) {
++ if (!read_config(filename, name, dump_only, removing,
++ options, commands, aliases, blacklist))
++ fatal("Failed to open config file %s: %s\n",
++ filename, strerror(errno));
++ return;
++ }
++
++ /* Try defaults. */
++ for (i = 0; i < ARRAY_SIZE(default_configs); i++) {
++ if (read_config(default_configs[i], name, dump_only, removing,
++ options, commands, aliases, blacklist))
++ return;
++ }
++}
++
++static void add_to_env_var(const char *option)
++{
++ const char *oldenv;
++
++ if ((oldenv = getenv("MODPROBE_OPTIONS")) != NULL) {
++ char *newenv;
++ asprintf(&newenv, "%s %s", oldenv, option);
++ setenv("MODPROBE_OPTIONS", newenv, 1);
++ } else
++ setenv("MODPROBE_OPTIONS", option, 1);
++}
++
++/* Prepend options from environment. */
++static char **merge_args(char *args, char *argv[], int *argc)
++{
++ char *arg, *argstring;
++ char **newargs = NULL;
++ unsigned int i, num_env = 0;
++
++ if (!args)
++ return argv;
++
++ argstring = NOFAIL(strdup(args));
++ for (arg = strtok(argstring, " "); arg; arg = strtok(NULL, " ")) {
++ num_env++;
++ newargs = NOFAIL(realloc(newargs,
++ sizeof(newargs[0])
++ * (num_env + *argc + 1)));
++ newargs[num_env] = arg;
++ }
++
++ /* Append commandline args */
++ newargs[0] = argv[0];
++ for (i = 1; i <= *argc; i++)
++ newargs[num_env+i] = argv[i];
++
++ *argc += num_env;
++ return newargs;
++}
++
++static char *gather_options(char *argv[])
++{
++ char *optstring = NOFAIL(strdup(""));
++
++ /* Rest is module options */
++ while (*argv) {
++ /* Quote value if it contains spaces. */
++ unsigned int eq = strcspn(*argv, "=");
++
++ if (strchr(*argv+eq, ' ') && !strchr(*argv, '"')) {
++ char quoted[strlen(*argv) + 3];
++ (*argv)[eq] = '\0';
++ sprintf(quoted, "%s=\"%s\"", *argv, *argv+eq+1);
++ optstring = append_option(optstring, quoted);
++ } else
++ optstring = append_option(optstring, *argv);
++ argv++;
++ }
++ return optstring;
++}
++
++static void handle_module(const char *modname,
++ struct list_head *todo_list,
++ const char *newname,
++ int remove,
++ char *options,
++ int first_time,
++ errfn_t error,
++ int dry_run,
++ int verbose,
++ struct module_options *modoptions,
++ struct module_command *commands,
++ int ignore_commands,
++ int ignore_proc,
++ int strip_vermagic,
++ int strip_modversion,
++ int unknown_silent,
++ const char *cmdline_opts)
++{
++ if (list_empty(todo_list)) {
++ const char *command;
++
++ /* The dependencies have to be real modules, but
++ handle case where the first is completely bogus. */
++ command = find_command(modname, commands);
++ if (command && !ignore_commands) {
++ do_command(modname, command, verbose, dry_run, error,
++ remove ? "remove":"install", cmdline_opts);
++ return;
++ }
++
++ if (unknown_silent)
++ exit(1);
++ error("Module %s not found.\n", modname);
++ return;
++ }
++
++ if (remove)
++ rmmod(todo_list, newname, first_time, error, dry_run, verbose,
++ commands, ignore_commands, 0, cmdline_opts);
++ else
++ insmod(todo_list, NOFAIL(strdup(options)), newname,
++ first_time, error, dry_run, verbose, modoptions,
++ commands, ignore_commands, ignore_proc, strip_vermagic,
++ strip_modversion, cmdline_opts);
++}
++
++static struct option options[] = { { "verbose", 0, NULL, 'v' },
++ { "version", 0, NULL, 'V' },
++ { "config", 1, NULL, 'C' },
++ { "name", 1, NULL, 'o' },
++ { "remove", 0, NULL, 'r' },
++ { "showconfig", 0, NULL, 'c' },
++ { "autoclean", 0, NULL, 'k' },
++ { "quiet", 0, NULL, 'q' },
++ { "show", 0, NULL, 'n' },
++ { "dry-run", 0, NULL, 'n' },
++ { "syslog", 0, NULL, 's' },
++ { "type", 1, NULL, 't' },
++ { "list", 0, NULL, 'l' },
++ { "all", 0, NULL, 'a' },
++ { "ignore-install", 0, NULL, 'i' },
++ { "ignore-remove", 0, NULL, 'i' },
++ { "force", 0, NULL, 'f' },
++ { "force-vermagic", 0, NULL, 1 },
++ { "force-modversion", 0, NULL, 2 },
++ { "set-version", 1, NULL, 'S' },
++ { "show-depends", 0, NULL, 'D' },
++ { "first-time", 0, NULL, 3 },
++ { "use-blacklist", 0, NULL, 'b' },
++ { NULL, 0, NULL, 0 } };
++
++#define MODPROBE_DEVFSD_CONF "/etc/modprobe.devfs"
++
++/* This is a horrible hack to allow devfsd, which calls modprobe with
++ -C /etc/modules.conf or /etc/modules.devfs, to work. FIXME. */
++/* Modern devfsd or variants should use -q explicitly in 2.6. */
++static int is_devfs_call(char *argv[])
++{
++ unsigned int i;
++
++ /* Look for "/dev" arg */
++ for (i = 1; argv[i]; i++) {
++ if (strncmp(argv[i], "/dev/", 5) == 0)
++ return 1;
++ }
++ return 0;
++}
++
++int main(int argc, char *argv[])
++{
++ struct utsname buf;
++ struct stat statbuf;
++ int opt;
++ int dump_only = 0;
++ int dry_run = 0;
++ int remove = 0;
++ int verbose = 0;
++ int unknown_silent = 0;
++ int list_only = 0;
++ int all = 0;
++ int ignore_commands = 0;
++ int strip_vermagic = 0;
++ int strip_modversion = 0;
++ int ignore_proc = 0;
++ int first_time = 0;
++ int use_blacklist = 0;
++ unsigned int i, num_modules;
++ char *type = NULL;
++ const char *config = NULL;
++ char *dirname, *optstring;
++ char *newname = NULL;
++ char *aliasfilename, *symfilename;
++ errfn_t error = fatal;
++
++ /* Prepend options from environment. */
++ argv = merge_args(getenv("MODPROBE_OPTIONS"), argv, &argc);
++
++ /* --set-version overrides version, and disables backwards compat. */
++ for (opt = 1; opt < argc; opt++)
++ if (strncmp(argv[opt],"--set-version",strlen("--set-version"))
++ == 0)
++ break;
++
++ if (opt == argc)
++ try_old_version("modprobe", argv);
++
++ uname(&buf);
++ while ((opt = getopt_long(argc, argv, "vVC:o:rknqQsclt:aifb", options, NULL)) != -1){
++ switch (opt) {
++ case 'v':
++ add_to_env_var("-v");
++ verbose = 1;
++ break;
++ case 'V':
++ puts("module-init-tools version 3.2.2");
++ exit(0);
++ case 'S':
++ strncpy(buf.release, optarg, sizeof(buf.release));
++ buf.release[sizeof(buf.release)-1] = '\0';
++ break;
++ case 'C':
++ if (is_devfs_call(argv)) {
++ if (streq("/etc/modules.devfs", optarg)) {
++ config = MODPROBE_DEVFSD_CONF;
++ add_to_env_var("-C");
++ add_to_env_var(config);
++ /* Fall thru to -q */
++ } else if (streq("/etc/modules.conf", optarg))
++ /* Ignore config, fall thru to -q */
++ ;
++ else {
++ /* False alarm. Treat as normal. */
++ config = optarg;
++ add_to_env_var("-C");
++ add_to_env_var(config);
++ break;
++ }
++ } else {
++ config = optarg;
++ add_to_env_var("-C");
++ add_to_env_var(config);
++ break;
++ }
++ case 'q':
++ unknown_silent = 1;
++ add_to_env_var("-q");
++ break;
++ case 'D':
++ dry_run = 1;
++ ignore_proc = 1;
++ verbose = 1;
++ add_to_env_var("-D");
++ break;
++ case 'o':
++ newname = optarg;
++ break;
++ case 'r':
++ remove = 1;
++ break;
++ case 'c':
++ dump_only = 1;
++ break;
++ case 't':
++ type = optarg;
++ break;
++ case 'l':
++ list_only = 1;
++ break;
++ case 'a':
++ all = 1;
++ error = warn;
++ break;
++ case 'k':
++ /* FIXME: This should actually do something */
++ break;
++ case 'n':
++ dry_run = 1;
++ break;
++ case 's':
++ add_to_env_var("-s");
++ log = 1;
++ break;
++ case 'i':
++ ignore_commands = 1;
++ break;
++ case 'f':
++ strip_vermagic = 1;
++ strip_modversion = 1;
++ break;
++ case 'b':
++ use_blacklist = 1;
++ break;
++ case 1:
++ strip_vermagic = 1;
++ break;
++ case 2:
++ strip_modversion = 1;
++ break;
++ case 3:
++ first_time = 1;
++ break;
++ default:
++ print_usage(argv[0]);
++ }
++ }
++
++ /* If stderr not open, go to syslog */
++ if (log || fstat(STDERR_FILENO, &statbuf) != 0) {
++ openlog("modprobe", LOG_CONS, LOG_DAEMON);
++ log = 1;
++ }
++
++ if (argc < optind + 1 && !dump_only && !list_only && !remove)
++ print_usage(argv[0]);
++
++ dirname = NOFAIL(malloc(strlen(buf.release) + sizeof(MODULE_DIR) + 1));
++ sprintf(dirname, "%s/%s", MODULE_DIR, buf.release);
++ aliasfilename = NOFAIL(malloc(strlen(dirname)
++ + sizeof("/modules.alias")));
++ sprintf(aliasfilename, "%s/modules.alias", dirname);
++ symfilename = NOFAIL(malloc(strlen(dirname)
++ + sizeof("/modules.symbols")));
++ sprintf(symfilename, "%s/modules.symbols", dirname);
++
++ /* Old-style -t xxx wildcard? Only with -l. */
++ if (list_only) {
++ if (optind+1 < argc)
++ fatal("Can't have multiple wildcards\n");
++ /* fprintf(stderr, "man find\n"); return 1; */
++ return do_wildcard(dirname, type, argv[optind]?:"*");
++ }
++ if (type)
++ fatal("-t only supported with -l");
++
++ if (dump_only) {
++ struct module_command *commands = NULL;
++ struct module_options *modoptions = NULL;
++ struct module_alias *aliases = NULL;
++ struct module_blacklist *blacklist = NULL;
++
++ read_toplevel_config(config, "", 1, 0,
++ &modoptions, &commands, &aliases, &blacklist);
++ read_config(aliasfilename, "", 1, 0,&modoptions, &commands,
++ &aliases, &blacklist);
++ read_config(symfilename, "", 1, 0, &modoptions, &commands,
++ &aliases, &blacklist);
++ exit(0);
++ }
++
++ if (remove || all) {
++ num_modules = argc - optind;
++ optstring = NOFAIL(strdup(""));
++ } else {
++ num_modules = 1;
++ optstring = gather_options(argv+optind+1);
++ }
++
++ /* num_modules is always 1 except for -r or -a. */
++ for (i = 0; i < num_modules; i++) {
++ struct module_command *commands = NULL;
++ struct module_options *modoptions = NULL;
++ struct module_alias *aliases = NULL;
++ struct module_blacklist *blacklist = NULL;
++ LIST_HEAD(list);
++ char *modulearg = argv[optind + i];
++
++ /* Convert name we are looking for */
++ underscores(modulearg);
++
++ /* Returns the resolved alias, options */
++ read_toplevel_config(config, modulearg, 0,
++ remove, &modoptions, &commands, &aliases, &blacklist);
++
++ /* No luck? Try symbol names, if starts with symbol:. */
++ if (!aliases
++ && strncmp(modulearg, "symbol:", strlen("symbol:")) == 0)
++ read_config(symfilename, modulearg, 0,
++ remove, &modoptions, &commands,
++ &aliases, &blacklist);
++
++ if (!aliases) {
++ /* We only use canned aliases as last resort. */
++ read_depends(dirname, modulearg, &list);
++
++ if (list_empty(&list)
++ && !find_command(modulearg, commands))
++ {
++ read_config(aliasfilename, modulearg, 0,
++ remove, &modoptions, &commands,
++ &aliases, &blacklist);
++ aliases = apply_blacklist(aliases, blacklist);
++ }
++ }
++
++ if (aliases) {
++ errfn_t err = error;
++
++ /* More than one alias? Don't bail out on failure. */
++ if (aliases->next)
++ err = warn;
++ while (aliases) {
++ /* Add the options for this alias. */
++ char *opts = NOFAIL(strdup(optstring));
++ opts = add_extra_options(modulearg,
++ opts, modoptions);
++
++ read_depends(dirname, aliases->module, &list);
++ handle_module(aliases->module, &list, newname,
++ remove, opts, first_time, err,
++ dry_run, verbose, modoptions,
++ commands, ignore_commands,
++ ignore_proc, strip_vermagic,
++ strip_modversion,
++ unknown_silent,
++ optstring);
++
++ aliases = aliases->next;
++ INIT_LIST_HEAD(&list);
++ }
++ } else {
++ if (use_blacklist
++ && find_blacklist(modulearg, blacklist))
++ continue;
++
++ handle_module(modulearg, &list, newname, remove,
++ optstring, first_time, error, dry_run,
++ verbose, modoptions, commands,
++ ignore_commands, ignore_proc,
++ strip_vermagic, strip_modversion,
++ unknown_silent, optstring);
++ }
++ }
++ if (log)
++ closelog();
++
++ return 0;
++}
diff --git a/packages/klibc/klibc-common.inc b/packages/klibc/klibc-common.inc
index 7b23ece856..41859d3243 100644
--- a/packages/klibc/klibc-common.inc
+++ b/packages/klibc/klibc-common.inc
@@ -6,6 +6,8 @@ minimal entaglement, and portability, not speed."
LICENSE = "BSD-ADV"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/Stable/klibc-${PV}.tar.bz2 \
file://fstype-sane-vfat-and-jffs2-for-1.5.patch;patch=1 \
+ file://modprobe.patch;patch=1 \
+ file://losetup.patch;patch=1 \
"
S = "${WORKDIR}/klibc-${PV}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/packages/klibc/klibc-utils-fstype-static_1.1.1.bb b/packages/klibc/klibc-utils-fstype-static_1.1.1.bb
deleted file mode 100644
index 2bcc0f6085..0000000000
--- a/packages/klibc/klibc-utils-fstype-static_1.1.1.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SRC_URI = "${KERNELORG_MIRROR}/pub/linux/libs/klibc/Stable/klibc-${PV}.tar.bz2"
-SRC_URI += "file://fstype-sane-and-vfat-jffs2.patch;patch=1"
-PR = "r1"
-
-S = "${WORKDIR}/klibc-${PV}"
-
-do_compile() {
- ${CC} -o fstype utils/fstype.c -static
-}
-
-do_install () {
- install -d ${D}${bindir}
- install -m 0755 fstype ${D}${bindir}/
-}
diff --git a/packages/klibc/klibc-utils-static_1.5.bb b/packages/klibc/klibc-utils-static_1.5.bb
index 6d7a199967..c6f54489ab 100644
--- a/packages/klibc/klibc-utils-static_1.5.bb
+++ b/packages/klibc/klibc-utils-static_1.5.bb
@@ -1,6 +1,6 @@
require klibc-common.inc
-PR = "r7"
+PR = "r8"
# We only want the static utils. klibc build both. So we install only what we want.
do_install() {
@@ -36,6 +36,8 @@ do_install() {
install -m 755 usr/utils/static/true ${D}${base_bindir}
install -m 755 usr/utils/static/umount ${D}${base_bindir}
install -m 755 usr/utils/static/uname ${D}${base_bindir}
+ install -m 755 usr/utils/static/modprobe ${D}${base_bindir}
+ install -m 755 usr/utils/static/losetup ${D}${base_bindir}
cd ${D}${base_bindir}
ln -s gzip gunzip
ln -s gzip zcat
@@ -57,8 +59,8 @@ PACKAGES = "klibc-utils-static-sh klibc-utils-static-gzip \
klibc-utils-static-poweroff klibc-utils-static-readlink \
klibc-utils-static-reboot klibc-utils-static-sleep \
klibc-utils-static-true klibc-utils-static-umount \
- klibc-utils-static-uname \
- "
+ klibc-utils-static-uname klibc-utils-static-modprobe \
+ klibc-utils-static-losetup"
FILES_klibc-utils-static-sh = "${base_bindir}/sh"
FILES_klibc-utils-static-gzip = "${base_bindir}/gzip ${base_bindir}/gunzip ${base_bindir}/zcat"
@@ -91,3 +93,5 @@ FILES_klibc-utils-static-sleep = "${base_bindir}/sleep"
FILES_klibc-utils-static-true = "${base_bindir}/true"
FILES_klibc-utils-static-umount = "${base_bindir}/umount"
FILES_klibc-utils-static-uname = "${base_bindir}/uname"
+FILES_klibc-utils-static-modprobe = "${base_bindir}/modprobe"
+FILES_klibc-utils-static-losetup = "${base_bindir}/losetup"
diff --git a/packages/klibc/klibc.inc b/packages/klibc/klibc.inc
index 78e1bca125..c32111af37 100644
--- a/packages/klibc/klibc.inc
+++ b/packages/klibc/klibc.inc
@@ -38,6 +38,8 @@ do_install() {
install -m 755 usr/utils/shared/true ${D}${base_bindir}
install -m 755 usr/utils/shared/umount ${D}${base_bindir}
install -m 755 usr/utils/shared/uname ${D}${base_bindir}
+ install -m 755 usr/utils/shared/modprobe ${D}${base_bindir}
+ install -m 755 usr/utils/shared/losetup ${D}${base_bindir}
install -d ${D}${base_libdir}
install -m 755 usr/klibc/klibc-*.so ${D}${base_libdir}
@@ -71,11 +73,12 @@ PACKAGES = "${PN} klibc-utils-sh klibc-utils-kinit \
klibc-utils-readlink klibc-utils-reboot \
klibc-utils-sleep klibc-utils-true \
klibc-utils-umount klibc-utils-uname \
- klibc-utils-gzip"
+ klibc-utils-gzip klibc-utils-modprobe \
+ klibc-utils-losetup"
FILES_${PN} = "${base_libdir}/klibc*.so"
FILES_klibc-utils-sh = "${base_bindir}/sh"
-FILES_klibc-utils-static-gzip = "${base_bindir}/gzip ${base_bindir}/gunzip ${base_bindir}/zcat"
+FILES_klibc-utils-gzip = "${base_bindir}/gzip ${base_bindir}/gunzip ${base_bindir}/zcat"
FILES_klibc-utils-kinit = "${base_bindir}/kinit"
FILES_klibc-utils-fstype = "${base_bindir}/fstype"
FILES_klibc-utils-ipconfig = "${base_bindir}/ipconfig"
@@ -105,6 +108,8 @@ FILES_klibc-utils-sleep = "${base_bindir}/sleep"
FILES_klibc-utils-true = "${base_bindir}/true"
FILES_klibc-utils-umount = "${base_bindir}/umount"
FILES_klibc-utils-uname = "${base_bindir}/uname"
+FILES_klibc-utils-modprobe = "${base_bindir}/modprobe"
+FILES_klibc-utils-losetup = "${base_bindir}/losetup"
# Yes we want exactly the klibc that was compiled with the utils
RDEPENDS_klibc-utils-sh = "${PN} (=${PV}-${PR})"
@@ -137,3 +142,5 @@ RDEPENDS_klibc-utils-sleep = "${PN} (=${PV}-${PR})"
RDEPENDS_klibc-utils-true = "${PN} (=${PV}-${PR})"
RDEPENDS_klibc-utils-umount = "${PN} (=${PV}-${PR})"
RDEPENDS_klibc-utils-uname = "${PN} (=${PV}-${PR})"
+RDEPENDS_klibc-utils-modprobe = "${PN} (=${PV}-${PR})"
+RDEPENDS_klibc-utils-losetup = "${PN} (=${PV}-${PR})"
diff --git a/packages/klibc/klibc_1.5.bb b/packages/klibc/klibc_1.5.bb
index b5bd3557cf..925dcd0c36 100644
--- a/packages/klibc/klibc_1.5.bb
+++ b/packages/klibc/klibc_1.5.bb
@@ -1,2 +1,2 @@
require klibc.inc
-PR = "r5"
+PR = "r6"
diff --git a/packages/less/less_382.bb b/packages/less/less_382.bb
deleted file mode 100644
index f336a59ad6..0000000000
--- a/packages/less/less_382.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
-based program for viewing text files and the output from other \
-programs. Less offers many features beyond those that more does."
-HOMEPAGE = "http://www.greenwoodsoftware.com/"
-SECTION = "console/utils"
-LICENSE = "BSD"
-DEPENDS = "ncurses"
-PR = "r1"
-
-SRC_URI = "${GNU_MIRROR}/less/less-${PV}.tar.gz \
- file://configure.patch;patch=1"
-
-inherit autotools update-alternatives
-
-do_install () {
- oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
- mv ${D}${bindir}/less ${D}${bindir}/less.${PN}
-}
-
-ALTERNATIVE_NAME = "less"
-ALTERNATIVE_PATH = "less.${PN}"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/packages/less/less_406.bb b/packages/less/less_418.bb
index c8ef2fc6e6..c19a41e63d 100644
--- a/packages/less/less_406.bb
+++ b/packages/less/less_418.bb
@@ -6,7 +6,7 @@ SECTION = "console/utils"
LICENSE = "BSD"
DEPENDS = "ncurses"
-SRC_URI = "http://www.greenwoodsoftware.com/less/less-406.tar.gz "
+SRC_URI = "${GNU_MIRROR}/less/less-${PV}.tar.gz "
inherit autotools update-alternatives
diff --git a/packages/tslib/tslib-1.0/.mtn2git_empty b/packages/libc-client/files/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/tslib/tslib-1.0/.mtn2git_empty
+++ b/packages/libc-client/files/.mtn2git_empty
diff --git a/packages/libc-client/files/quote_cctype.patch b/packages/libc-client/files/quote_cctype.patch
new file mode 100644
index 0000000000..f729ee2074
--- /dev/null
+++ b/packages/libc-client/files/quote_cctype.patch
@@ -0,0 +1,12 @@
+diff -urN imap-2007.orig/Makefile imap-2007/Makefile
+--- imap-2007.orig/Makefile 2007-12-20 23:11:10.000000000 +0100
++++ imap-2007/Makefile 2008-03-19 14:08:47.000000000 +0100
+@@ -690,7 +690,7 @@
+ @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
+ @echo Rebuilding c-client for `$(CAT) OSTYPE`...
+ @$(TOUCH) SPECIALS
+- $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \
++ $(CD) c-client;$(MAKE) all CC="`$(CAT) CCTYPE`" \
+ CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
+
+ rebuildclean:
diff --git a/packages/libc-client/libc-client_2007.bb b/packages/libc-client/libc-client_2007.bb
index 87035afec4..cdfeca0b2b 100644
--- a/packages/libc-client/libc-client_2007.bb
+++ b/packages/libc-client/libc-client_2007.bb
@@ -3,8 +3,10 @@ SECTION = "devel"
PRIORITY = "optional"
LICENSE = "University of Washington's Free-Fork License"
DEPENDS = "libpam openssl"
+PR = "r1"
-SRC_URI = "ftp://ftp.cac.washington.edu/imap/c-client.tar.Z"
+SRC_URI = "ftp://ftp.cac.washington.edu/imap/c-client.tar.Z \
+ file://quote_cctype.patch;patch=1"
S = "${WORKDIR}/imap-2007"
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/.mtn2git_empty b/packages/libeventdb/libeventdb-0.90/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/.mtn2git_empty
+++ b/packages/libeventdb/libeventdb-0.90/.mtn2git_empty
diff --git a/packages/libeventdb/libeventdb-0.90/libeventdb-unbreak-LIVE-macro.patch b/packages/libeventdb/libeventdb-0.90/libeventdb-unbreak-LIVE-macro.patch
new file mode 100644
index 0000000000..e5da0afc89
--- /dev/null
+++ b/packages/libeventdb/libeventdb-0.90/libeventdb-unbreak-LIVE-macro.patch
@@ -0,0 +1,11 @@
+--- libeventdb-0.90/event.h.orig 2008-03-13 23:05:10.000000000 -0700
++++ libeventdb-0.90/event.h 2008-03-13 23:05:40.000000000 -0700
+@@ -130,7 +130,7 @@ extern GSList *event_list (EventSource *
+ GError **error)
+ __attribute__ ((visibility ("hidden")));
+
+-#define LIVE(ev) (g_assert (! EVENT (ev)->dead))
++#define LIVE(ev) G_STMT_START { g_assert (! EVENT (ev)->dead); } G_STMT_END
+
+ /* Marks the event as well as the calendar in which lives as
+ modified. */
diff --git a/packages/libeventdb/libeventdb_0.90.bb b/packages/libeventdb/libeventdb_0.90.bb
index 1c9d3ab4bc..f26780ccea 100644
--- a/packages/libeventdb/libeventdb_0.90.bb
+++ b/packages/libeventdb/libeventdb_0.90.bb
@@ -1,3 +1,4 @@
require libeventdb.inc
-PR = "r1"
+PR = "r2"
+SRC_URI += "file://libeventdb-unbreak-LIVE-macro.patch;patch=1"
diff --git a/packages/xorg-app/xev-1.0.2/.mtn2git_empty b/packages/libgee/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/xorg-app/xev-1.0.2/.mtn2git_empty
+++ b/packages/libgee/.mtn2git_empty
diff --git a/packages/libgee/files/.mtn2git_empty b/packages/libgee/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libgee/files/.mtn2git_empty
diff --git a/packages/libgee/files/no-tests.patch b/packages/libgee/files/no-tests.patch
new file mode 100644
index 0000000000..d2d20b2c4e
--- /dev/null
+++ b/packages/libgee/files/no-tests.patch
@@ -0,0 +1,12 @@
+Index: libgee-0.1.2/Makefile.am
+===================================================================
+--- libgee-0.1.2.orig/Makefile.am
++++ libgee-0.1.2/Makefile.am
+@@ -4,7 +4,6 @@ NULL =
+
+ SUBDIRS = \
+ gee \
+- tests \
+ $(NULL)
+
+ pkgconfigdir = $(libdir)/pkgconfig
diff --git a/packages/libgee/libgee_0.1.2.bb b/packages/libgee/libgee_0.1.2.bb
new file mode 100644
index 0000000000..4f6d113150
--- /dev/null
+++ b/packages/libgee/libgee_0.1.2.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "libgee is a collection library providing GObject-based interfaces \
+and classes for commonly used data structures."
+HOMEPAGE = "http://live.gnome.org/Libgee"
+SECTION = "libs"
+DEPENDS = "glib-2.0"
+LICENSE = "LGPL"
+
+SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/libgee/0.1/libgee-${PV}.tar.bz2 \
+ file://no-tests.patch;patch=1"
+
+inherit autotools pkgconfig
+
diff --git a/packages/libidl/libidl-native_0.8.6.bb b/packages/libidl/libidl-native_0.8.10.bb
index ce59fd4b86..ce59fd4b86 100644
--- a/packages/libidl/libidl-native_0.8.6.bb
+++ b/packages/libidl/libidl-native_0.8.10.bb
diff --git a/packages/libidl/libidl_0.8.6.bb b/packages/libidl/libidl.inc
index 2f44147711..e032575bb5 100644
--- a/packages/libidl/libidl_0.8.6.bb
+++ b/packages/libidl/libidl.inc
@@ -1,14 +1,12 @@
DESCRIPTION = "Library for parsing CORBA IDL files"
SECTION = "x11/gnome/libs"
LICENSE = "LGPL"
-DEPENDS = "glib-2.0 libidl-native"
-PR = "r3"
+
+inherit autotools pkgconfig
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/libIDL-${PV}.tar.bz2"
-S = "${WORKDIR}/libIDL-${PV}"
-BINCONFIG_GLOB = "*-config-2"
-inherit autotools pkgconfig binconfig
+S = "${WORKDIR}/libIDL-${PV}"
do_stage() {
autotools_stage_all
diff --git a/packages/libidl/libidl_0.8.10.bb b/packages/libidl/libidl_0.8.10.bb
new file mode 100644
index 0000000000..c6664acb23
--- /dev/null
+++ b/packages/libidl/libidl_0.8.10.bb
@@ -0,0 +1,8 @@
+require libidl.inc
+
+DEPENDS = "glib-2.0 libidl-native"
+
+PR = "r0"
+
+BINCONFIG_GLOB = "*-config-2"
+inherit autotools pkgconfig binconfig
diff --git a/packages/libidl/libidl_0.8.2.bb b/packages/libidl/libidl_0.8.2.bb
index 8a5b683d1e..b451ada539 100644
--- a/packages/libidl/libidl_0.8.2.bb
+++ b/packages/libidl/libidl_0.8.2.bb
@@ -1,10 +1,3 @@
-SECTION = "x11/gnome/libs"
-LICENSE = "LGPL"
-SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/libIDL-0.8.2.tar.bz2"
-S = "${WORKDIR}/libIDL-${PV}"
+require libidl.inc
-inherit autotools pkgconfig
-
-do_stage () {
- autotools_stage_all
-}
+PR = "r1"
diff --git a/packages/libidl/libidl_0.8.3.bb b/packages/libidl/libidl_0.8.3.bb
index 5f788a91d8..c4586f94f8 100644
--- a/packages/libidl/libidl_0.8.3.bb
+++ b/packages/libidl/libidl_0.8.3.bb
@@ -1,20 +1,13 @@
-DESCRIPTION = "Library for parsing CORBA IDL files"
-SECTION = "x11/gnome/libs"
-LICENSE = "LGPL"
-DEPENDS = "glib-2.0"
-PR = "r2"
+require libidl.inc
-SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/libIDL/0.8/libIDL-${PV}.tar.bz2"
-S = "${WORKDIR}/libIDL-${PV}"
+DEPENDS = "glib-2.0"
-inherit autotools pkgconfig
+PR = "r3"
# Firefox uses the libIDL-config-2 script instead of pkgconfig (for some
# strange reason - so we do some sed fu to fix the path there
-do_stage() {
- autotools_stage_all
-
+do_stage_prepend() {
cp ${STAGING_BINDIR}/libIDL-config-2 ${STAGING_BINDIR}/libIDL-config-2.orig
cat ${STAGING_BINDIR}/libIDL-config-2.orig | sed -e 's:${includedir}:${STAGING_INCDIR}:' > ${STAGING_BINDIR}/libIDL-config-2
@@ -22,6 +15,3 @@ do_stage() {
mv ${STAGING_BINDIR}/libIDL-config-2 ${STAGING_BINDIR_CROSS}/libIDL-config-2
fi
}
-
-FILES_${PN} = "${libdir}/*.so.*"
-FILES_${PN}-dev += " ${bindir}"
diff --git a/packages/libol/libol_0.3.16.bb b/packages/libol/libol_0.3.16.bb
deleted file mode 100644
index 1e4a1e9408..0000000000
--- a/packages/libol/libol_0.3.16.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-PR = "r5"
-
-SRC_URI = "http://www.balabit.com/downloads/files/libol/0.3/${P}.tar.gz"
-
-S = "${WORKDIR}/${PN}-${PV}"
-inherit autotools
-
-do_stage() {
- install -d ${STAGING_INCDIR}/libol
- install -m 0755 ${S}/libol-config ${STAGING_BINDIR_CROSS}
- install -m 0755 ${S}/src/.libs/libol.so.0.0.0 ${STAGING_LIBDIR}
- ln -fs ${STAGING_LIBDIR}/libol.so.0.0.0 ${STAGING_LIBDIR}/libol.so.0
- install ${S}/src/*.h ${STAGING_INCDIR}/libol/
-}
-
diff --git a/packages/libol/libol_0.3.18.bb b/packages/libol/libol_0.3.18.bb
index 0b6518c43e..7dc48f92df 100644
--- a/packages/libol/libol_0.3.18.bb
+++ b/packages/libol/libol_0.3.18.bb
@@ -1,14 +1,12 @@
-PR = "r7"
+DESCRIPTION = "A tiny C support library"
+SECTION = "libs"
+LICENSE = "GPL"
+PR = "r8"
SRC_URI = "http://www.balabit.com/downloads/files/libol/0.3/${P}.tar.gz"
-S = "${WORKDIR}/${PN}-${PV}"
-
inherit autotools binconfig
do_stage() {
- install -d ${STAGING_INCDIR}/libol
- install -m 0755 ${S}/src/.libs/libol.so.0.0.0 ${STAGING_LIBDIR}/
- ln -fs ${STAGING_LIBDIR}/libol.so.0.0.0 ${STAGING_LIBDIR}/libol.so.0
- install ${S}/src/*.h ${STAGING_INCDIR}/libol/
+ autotools_stage_all
}
diff --git a/packages/libpcre/files/.mtn2git_empty b/packages/libpcre/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libpcre/files/.mtn2git_empty
diff --git a/packages/libpcre/files/native-rpath-link.patch b/packages/libpcre/files/native-rpath-link.patch
new file mode 100644
index 0000000000..69de2bea64
--- /dev/null
+++ b/packages/libpcre/files/native-rpath-link.patch
@@ -0,0 +1,19 @@
+Index: pcre-4.4/Makefile.in
+===================================================================
+--- pcre-4.4.orig/Makefile.in 2003-08-21 11:43:07.000000000 +0100
++++ pcre-4.4/Makefile.in 2008-03-19 10:34:08.000000000 +0000
+@@ -107,12 +107,12 @@
+
+ libpcre.la: $(OBJ)
+ -rm -f libpcre.la
+- $(LINKLIB) -rpath $(LIBDIR) -version-info \
++ $(LINKLIB) -rpath $(LIBDIR) -L$(LIBDIR) -version-info \
+ '$(PCRELIBVERSION)' -o libpcre.la $(LOBJ)
+
+ libpcreposix.la: pcreposix.@OBJEXT@
+ -rm -f libpcreposix.la
+- $(LINKLIB) -rpath $(LIBDIR) libpcre.la -version-info \
++ $(LINKLIB) -rpath $(LIBDIR) -L$(LIBDIR) libpcre.la -version-info \
+ '$(PCREPOSIXLIBVERSION)' -o libpcreposix.la pcreposix.lo
+
+ pcre.@OBJEXT@: $(top_srcdir)/chartables.c $(top_srcdir)/pcre.c \
diff --git a/packages/libpcre/libpcre-native_4.4.bb b/packages/libpcre/libpcre-native_4.4.bb
index 8a4211384a..1bbfde7f0a 100644
--- a/packages/libpcre/libpcre-native_4.4.bb
+++ b/packages/libpcre/libpcre-native_4.4.bb
@@ -6,3 +6,14 @@ FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libpcre-${PV}"
# NOTE: multiple providers are available (libpcre, libpcre-native);
# NOTE: consider defining PREFERRED_PROVIDER_pcre
PROVIDES = ""
+
+SRC_URI += "file://native-rpath-link.patch;patch=1"
+
+do_compile () {
+ # The generation of dftables can lead to timestamp problems with ccache
+ # because the generated config.h seems newer. It is sufficient to ensure that the
+ # attempt to build dftables inside make will actually work (foo_FOR_BUILD is
+ # only used for this).
+ oe_runmake CC_FOR_BUILD="${BUILD_CC}" CFLAGS_FOR_BUILD="-DLINK_SIZE=2 -I${S}/include" LINK_FOR_BUILD="${BUILD_CC}"
+}
+
diff --git a/packages/libsdl/libsdl.inc b/packages/libsdl/libsdl.inc
index ad74ecc87c..217072ce61 100644
--- a/packages/libsdl/libsdl.inc
+++ b/packages/libsdl/libsdl.inc
@@ -2,6 +2,7 @@ DESCRIPTION = "Simple DirectMedia Layer - X11 Edition"
SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "alsa-lib mesa virtual/libx11 libxext"
+DEPENDS_avr32 = "alsa-lib virtual/libx11 libxext"
PROVIDES = "virtual/libsdl"
LICENSE = "LGPL"
PR = "r4"
diff --git a/packages/libtool/libtool-cross_1.5.10.bb b/packages/libtool/libtool-cross_1.5.10.bb
index 5f15c56a97..7374f107de 100644
--- a/packages/libtool/libtool-cross_1.5.10.bb
+++ b/packages/libtool/libtool-cross_1.5.10.bb
@@ -1,10 +1,11 @@
-SECTION = "devel"
+require libtool.inc
require libtool_${PV}.bb
-PR = "r9"
+PR = "r10"
PACKAGES = ""
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
-SRC_URI_append = " file://libdir-la.patch;patch=1 \
+SRC_URI_append = " file://rpath-control.patch;patch=1 \
+ file://libdir-la.patch;patch=1 \
file://libdir-la2.patch;patch=1 \
file://prefix.patch;patch=1 \
file://tag.patch;patch=1 \
@@ -18,7 +19,7 @@ prefix = "${STAGING_DIR_NATIVE}${layout_prefix}"
exec_prefix = "${STAGING_DIR_NATIVE}${layout_exec_prefix}"
bindir = "${STAGING_BINDIR_NATIVE}"
-do_compile () {
+do_configure_prepend () {
rm -f ltmain.shT
date=`/bin/sh ./mkstamp < ./ChangeLog` && \
sed -e 's/@''PACKAGE@/libtool/' -e 's/@''VERSION@/1.5.10/' \
@@ -28,6 +29,10 @@ do_compile () {
cp ltmain.sh ./libltdl/
}
+do_compile () {
+ :
+}
+
do_stage () {
install -m 0755 ${HOST_SYS}-libtool ${bindir}/${HOST_SYS}-libtool
install -m 0644 libltdl/ltdl.h ${STAGING_INCDIR}/
diff --git a/packages/libtool/libtool-cross_1.5.22.bb b/packages/libtool/libtool-cross_1.5.22.bb
index c91647b559..c44b0512ee 100644
--- a/packages/libtool/libtool-cross_1.5.22.bb
+++ b/packages/libtool/libtool-cross_1.5.22.bb
@@ -1,6 +1,6 @@
DEFAULT_PREFERENCE = "-1"
-SECTION = "devel"
+require libtool.inc
require libtool_${PV}.bb
PR = "r0"
diff --git a/packages/libtool/libtool-cross_1.5.24.bb b/packages/libtool/libtool-cross_1.5.24.bb
index e60db4b808..cf6cc18ef6 100644
--- a/packages/libtool/libtool-cross_1.5.24.bb
+++ b/packages/libtool/libtool-cross_1.5.24.bb
@@ -1,4 +1,4 @@
-SECTION = "devel"
+require libtool.inc
require libtool_${PV}.bb
PR = "r0"
diff --git a/packages/libtool/libtool-native_1.5.10.bb b/packages/libtool/libtool-native_1.5.10.bb
index e21a20b85d..59b323d8ff 100644
--- a/packages/libtool/libtool-native_1.5.10.bb
+++ b/packages/libtool/libtool-native_1.5.10.bb
@@ -1,15 +1,14 @@
-SECTION = "devel"
+require libtool.inc
require libtool_${PV}.bb
-PR = "r9"
+PR = "r10"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
SRC_URI_append = " file://libdir-la.patch;patch=1 \
file://libdir-la2.patch;patch=1 \
file://prefix.patch;patch=1 \
file://tag.patch;patch=1 \
file://install-path-check.patch;patch=1 \
- file://nousrlib.patch;patch=1 \
- file://rpath-control.patch;patch=1"
+ file://nousrlib.patch;patch=1"
S = "${WORKDIR}/libtool-${PV}"
diff --git a/packages/libtool/libtool-native_1.5.22.bb b/packages/libtool/libtool-native_1.5.22.bb
index dec4bf1e14..16db0bb65b 100644
--- a/packages/libtool/libtool-native_1.5.22.bb
+++ b/packages/libtool/libtool-native_1.5.22.bb
@@ -1,6 +1,6 @@
DEFAULT_PREFERENCE = "-1"
-SECTION = "devel"
+require libtool.inc
require libtool_${PV}.bb
PR = "r0"
diff --git a/packages/libtool/libtool-native_1.5.24.bb b/packages/libtool/libtool-native_1.5.24.bb
index 3587dd8034..1b0cb90a1e 100644
--- a/packages/libtool/libtool-native_1.5.24.bb
+++ b/packages/libtool/libtool-native_1.5.24.bb
@@ -1,6 +1,7 @@
SECTION = "devel"
+
+require libtool.inc
require libtool_${PV}.bb
-DEFAULT_PREFERENCE = "-1"
PR = "r0"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/libtool-${PV}"
diff --git a/packages/libtool/libtool.inc b/packages/libtool/libtool.inc
new file mode 100644
index 0000000000..db86d15ba4
--- /dev/null
+++ b/packages/libtool/libtool.inc
@@ -0,0 +1,8 @@
+DESCRIPTION = "Generic library support script \
+This is GNU libtool, a generic library support script. Libtool hides \
+the complexity of generating special library types (such as shared \
+libraries) behind a consistent interface."
+HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
+LICENSE = "GPL"
+SECTION = "devel"
+
diff --git a/packages/libtool/libtool_1.5.10.bb b/packages/libtool/libtool_1.5.10.bb
index 3a9ff7ef59..428a06a0e7 100644
--- a/packages/libtool/libtool_1.5.10.bb
+++ b/packages/libtool/libtool_1.5.10.bb
@@ -1,10 +1,4 @@
-DESCRIPTION = "Generic library support script \
-This is GNU libtool, a generic library support script. Libtool hides \
-the complexity of generating special library types (such as shared \
-libraries) behind a consistent interface."
-HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
-LICENSE = "GPL"
-SECTION = "devel"
+require libtool.inc
PR = "r5"
SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
diff --git a/packages/libtool/libtool_1.5.22.bb b/packages/libtool/libtool_1.5.22.bb
index 66182cb57e..4bed7842b4 100644
--- a/packages/libtool/libtool_1.5.22.bb
+++ b/packages/libtool/libtool_1.5.22.bb
@@ -1,12 +1,6 @@
DEFAULT_PREFERENCE = "-1"
-DESCRIPTION = "Generic library support script \
-This is GNU libtool, a generic library support script. Libtool hides \
-the complexity of generating special library types (such as shared \
-libraries) behind a consistent interface."
-HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
-LICENSE = "GPL"
-SECTION = "devel"
+require libtool.inc
PR = "r1"
SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
diff --git a/packages/libtool/libtool_1.5.24.bb b/packages/libtool/libtool_1.5.24.bb
index f40613f3ee..7bdad1bed4 100644
--- a/packages/libtool/libtool_1.5.24.bb
+++ b/packages/libtool/libtool_1.5.24.bb
@@ -1,12 +1,6 @@
DEFAULT_PREFERENCE = "-1"
-DESCRIPTION = "Generic library support script \
-This is GNU libtool, a generic library support script. Libtool hides \
-the complexity of generating special library types (such as shared \
-libraries) behind a consistent interface."
-HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
-LICENSE = "GPL"
-SECTION = "devel"
+require libtool.inc
PR = "r1"
SRC_URI = "${GNU_MIRROR}/libtool/libtool-${PV}.tar.gz \
diff --git a/packages/libtool/libtool_1.5.6.bb b/packages/libtool/libtool_1.5.6.bb
index 7c02c4ba97..7fd9b81a3d 100644
--- a/packages/libtool/libtool_1.5.6.bb
+++ b/packages/libtool/libtool_1.5.6.bb
@@ -1,12 +1,6 @@
# Exists for compatibility with certain distributions (e.g. Maemo).
-DESCRIPTION = "Generic library support script \
-This is GNU libtool, a generic library support script. Libtool hides \
-the complexity of generating special library types (such as shared \
-libraries) behind a consistent interface."
-HOMEPAGE = "http://www.gnu.org/software/libtool/libtool.html"
-LICENSE = "GPL"
-SECTION = "devel"
+require libtool.inc
PR = "r2"
DEFAULT_PREFERENCE = "-1"
diff --git a/packages/libxslt/files/pkgconfig_fix.patch b/packages/libxslt/files/pkgconfig_fix.patch
new file mode 100644
index 0000000000..5e4a38f0b2
--- /dev/null
+++ b/packages/libxslt/files/pkgconfig_fix.patch
@@ -0,0 +1,22 @@
+Index: libxslt-1.1.22/libexslt.pc.in
+===================================================================
+--- libxslt-1.1.22.orig/libexslt.pc.in 2008-03-19 16:52:20.000000000 +0000
++++ libxslt-1.1.22/libexslt.pc.in 2008-03-19 16:55:49.000000000 +0000
+@@ -8,5 +8,5 @@
+ Version: @LIBEXSLT_VERSION@
+ Description: EXSLT Extension library
+ Requires: libxml-2.0
+-Libs: @EXSLT_LIBDIR@ @EXSLT_LIBS@
++Libs: -lxslt @EXSLT_LIBDIR@ @M_LIBS@
+ Cflags: @EXSLT_INCLUDEDIR@
+Index: libxslt-1.1.22/libxslt.pc.in
+===================================================================
+--- libxslt-1.1.22.orig/libxslt.pc.in 2008-03-19 16:52:20.000000000 +0000
++++ libxslt-1.1.22/libxslt.pc.in 2008-03-19 16:55:38.000000000 +0000
+@@ -8,5 +8,5 @@
+ Version: @VERSION@
+ Description: XSLT library version 2.
+ Requires: libxml-2.0
+-Libs: @XSLT_LIBDIR@ @XSLT_LIBS@
++Libs: -lxslt @XSLT_LIBDIR@ @M_LIBS@
+ Cflags: @XSLT_INCLUDEDIR@
diff --git a/packages/libxslt/libxslt_1.1.22.bb b/packages/libxslt/libxslt_1.1.22.bb
index 53348becc9..86fe70dff2 100644
--- a/packages/libxslt/libxslt_1.1.22.bb
+++ b/packages/libxslt/libxslt_1.1.22.bb
@@ -3,21 +3,16 @@ SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "libxml2 (>=2.6.27)"
LICENSE = "MIT"
+PR = "r1"
-SRC_URI = "ftp://xmlsoft.org/libxml2/libxslt-${PV}.tar.gz"
+SRC_URI = "ftp://xmlsoft.org/libxml2/libxslt-${PV}.tar.gz \
+ file://pkgconfig_fix.patch;patch=1"
S = "${WORKDIR}/libxslt-${PV}"
inherit autotools pkgconfig
EXTRA_OECONF = "--without-python --without-debug --without-mem-debug --without-crypto"
-# Something is wrong inside configure.ac, so we need to resort to sed in this stage :(
-# Koen - 20080305
-do_compile_append() {
- sed -i -e s:-L${STAGING_LIBDIR}::g libexslt.pc
- sed -i -e s:-L${STAGING_LIBDIR}::g libxslt.pc
-}
-
do_stage () {
autotools_stage_all
}
diff --git a/packages/linux/gumstix-linux.inc b/packages/linux/gumstix-linux.inc
index 50111cb545..038089c965 100644
--- a/packages/linux/gumstix-linux.inc
+++ b/packages/linux/gumstix-linux.inc
@@ -35,16 +35,6 @@ do_configure_prepend() {
yes '' | oe_runmake oldconfig
}
-do_sizecheck() {
- if [ ! -z "${KERNEL_IMAGE_MAXSIZE}" ]; then
- size=`ls -l arch/${ARCH}/boot/${KERNEL_IMAGETYPE} | awk '{ print $5}'`
- if [ $size -ge ${KERNEL_IMAGE_MAXSIZE} ]; then
- rm arch/${ARCH}/boot/${KERNEL_IMAGETYPE}
- die "This kernel (size=$size) is too big for your device. Please reduce the size of the kernel by making more of it modular."
- fi
- fi
-}
-
do_install_prepend() {
if test -e arch/${ARCH}/boot/Image ; then
ln -f arch/${ARCH}/boot/Image arch/${ARCH}/boot/uImage
@@ -68,7 +58,4 @@ do_deploy() {
fi
}
-addtask sizecheck before do_install after do_compile
addtask deploy before do_package after do_install
-
-
diff --git a/packages/linux/linux-2.6.24/at32stk1000/.mtn2git_empty b/packages/linux/linux-2.6.24/at32stk1000/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-2.6.24/at32stk1000/.mtn2git_empty
diff --git a/packages/linux/linux-2.6.24/at32stk1000/defconfig b/packages/linux/linux-2.6.24/at32stk1000/defconfig
new file mode 100644
index 0000000000..8a3e2ace8b
--- /dev/null
+++ b/packages/linux/linux-2.6.24/at32stk1000/defconfig
@@ -0,0 +1,1186 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24.3
+# Fri Mar 14 12:39:45 2008
+#
+CONFIG_AVR32=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_FAIR_GROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+# CONFIG_BASE_FULL is not set
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=1
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+# CONFIG_KMOD is not set
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# System Type and features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_SUBARCH_AVR32B=y
+CONFIG_MMU=y
+CONFIG_PERFORMANCE_COUNTERS=y
+CONFIG_PLATFORM_AT32AP=y
+CONFIG_CPU_AT32AP700X=y
+CONFIG_CPU_AT32AP7000=y
+CONFIG_BOARD_ATSTK1000=y
+# CONFIG_BOARD_ATNGW100 is not set
+CONFIG_BOARD_ATSTK1002=y
+# CONFIG_BOARD_ATSTK1003 is not set
+# CONFIG_BOARD_ATSTK1004 is not set
+# CONFIG_BOARD_ATSTK100X_CUSTOM is not set
+# CONFIG_BOARD_ATSTK100X_SPI1 is not set
+# CONFIG_BOARD_ATSTK1000_J2_LED is not set
+# CONFIG_BOARD_ATSTK1000_J2_LED8 is not set
+# CONFIG_BOARD_ATSTK1000_J2_RGB is not set
+CONFIG_BOARD_ATSTK1000_EXTDAC=y
+# CONFIG_BOARD_ATSTK100X_ENABLE_AC97 is not set
+# CONFIG_BOARD_ATSTK1000_CF_HACKS is not set
+# CONFIG_BOARD_ATSTK100X_ENABLE_PSIF is not set
+CONFIG_LOADER_U_BOOT=y
+
+#
+# Atmel AVR32 AP options
+#
+# CONFIG_AP700X_32_BIT_SMC is not set
+CONFIG_AP700X_16_BIT_SMC=y
+# CONFIG_AP700X_8_BIT_SMC is not set
+CONFIG_GPIO_DEV=y
+CONFIG_LOAD_ADDRESS=0x10000000
+CONFIG_ENTRY_ADDRESS=0x90000000
+CONFIG_PHYS_OFFSET=0x10000000
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
+# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
+# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_OWNERSHIP_TRACE is not set
+CONFIG_NMI_DEBUGGING=y
+CONFIG_DW_DMAC=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_CMDLINE=" debug "
+
+#
+# Power management options
+#
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+# CONFIG_CPU_FREQ_STAT is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_AT32AP=y
+
+#
+# Bus options
+#
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+CONFIG_NET_KEY=m
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+CONFIG_BRIDGE=m
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NET_TCPPROBE is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x8000000
+CONFIG_MTD_PHYSMAP_LEN=0x0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_DATAFLASH=m
+CONFIG_MTD_M25P80=m
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+CONFIG_ATMEL_PWM=m
+CONFIG_ATMEL_TCLIB=y
+CONFIG_ATMEL_TCB_CLKSRC=y
+CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_ATMEL_SSC=m
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_SCSI_PROC_FS is not set
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+# CONFIG_SCSI_LOWLEVEL is not set
+CONFIG_ATA=m
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_PATA_AT32=m
+# CONFIG_PATA_PLATFORM is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+CONFIG_MACB=y
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+CONFIG_INPUT_POLLDEV=m
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_GPIO=m
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+CONFIG_MOUSE_GPIO=m
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_SERIAL_ATMEL_PDC=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ATMELTWI=m
+CONFIG_I2C_GPIO=m
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_ATMEL=y
+# CONFIG_SPI_BITBANG is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+CONFIG_SPI_SPIDEV=m
+# CONFIG_SPI_TLE62X0 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_AT32AP700X_WDT=y
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_ATMEL=y
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_LTV350QV=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_ATMEL_LCDC=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=m
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+# CONFIG_SND_VERBOSE_PROCFS is not set
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# AVR32 devices
+#
+CONFIG_SND_ATMEL_AC97=m
+
+#
+# SPI devices
+#
+CONFIG_SND_AT73C213=m
+CONFIG_SND_AT73C213_TARGET_BITRATE=48000
+
+#
+# System on Chip audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=m
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+CONFIG_SOUND_AT32_ABDAC=m
+CONFIG_AC97_BUS=m
+# CONFIG_HID_SUPPORT is not set
+CONFIG_USB_SUPPORT=y
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+# CONFIG_USB_GADGET_DEBUG_FS is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+CONFIG_USB_GADGET_ATMEL_USBA=y
+CONFIG_USB_ATMEL_USBA=y
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_BLOCK_BOUNCE is not set
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_ATMELMCI=y
+CONFIG_MMC_SPI=m
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+CONFIG_LEDS_ATMEL_PWM=m
+CONFIG_LEDS_GPIO=m
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_AT32AP700X=y
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+# CONFIG_JFFS2_FS_WRITEBUFFER is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+CONFIG_KPROBES=y
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_LKDTM is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_ECB is not set
+CONFIG_CRYPTO_CBC=m
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_CRC7=m
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-2.6.24/atngw100/.mtn2git_empty b/packages/linux/linux-2.6.24/atngw100/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-2.6.24/atngw100/.mtn2git_empty
diff --git a/packages/linux/linux-2.6.24/atngw100/defconfig b/packages/linux/linux-2.6.24/atngw100/defconfig
new file mode 100644
index 0000000000..922bb32c44
--- /dev/null
+++ b/packages/linux/linux-2.6.24/atngw100/defconfig
@@ -0,0 +1,1223 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24.3
+# Fri Mar 14 11:46:04 2008
+#
+CONFIG_AVR32=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_SUPPORTS_OPROFILE=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+# CONFIG_BASE_FULL is not set
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=1
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# System Type and features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_SUBARCH_AVR32B=y
+CONFIG_MMU=y
+CONFIG_PERFORMANCE_COUNTERS=y
+CONFIG_PLATFORM_AT32AP=y
+CONFIG_CPU_AT32AP700X=y
+CONFIG_CPU_AT32AP7000=y
+# CONFIG_BOARD_ATSTK1000 is not set
+CONFIG_BOARD_ATNGW100=y
+CONFIG_BOARD_ATNGW100_I2C_GPIO=y
+CONFIG_LOADER_U_BOOT=y
+
+#
+# Atmel AVR32 AP options
+#
+# CONFIG_AP700X_32_BIT_SMC is not set
+CONFIG_AP700X_16_BIT_SMC=y
+# CONFIG_AP700X_8_BIT_SMC is not set
+CONFIG_GPIO_DEV=y
+CONFIG_LOAD_ADDRESS=0x10000000
+CONFIG_ENTRY_ADDRESS=0x90000000
+CONFIG_PHYS_OFFSET=0x10000000
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HAVE_ARCH_BOOTMEM_NODE is not set
+# CONFIG_ARCH_HAVE_MEMORY_PRESENT is not set
+# CONFIG_NEED_NODE_MEMMAP_SIZE is not set
+CONFIG_ARCH_FLATMEM_ENABLE=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+# CONFIG_ARCH_SPARSEMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_OWNERSHIP_TRACE is not set
+# CONFIG_NMI_DEBUGGING is not set
+CONFIG_DW_DMAC=y
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_CMDLINE=""
+
+#
+# Power management options
+#
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+# CONFIG_CPU_FREQ_STAT is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_AT32AP=y
+
+#
+# Bus options
+#
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=y
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+CONFIG_NET_KEY=y
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_MULTIPLE_TABLES is not set
+# CONFIG_IP_ROUTE_MULTIPATH is not set
+# CONFIG_IP_ROUTE_VERBOSE is not set
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+# CONFIG_IP_PIMSM_V2 is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=y
+CONFIG_INET_ESP=y
+CONFIG_INET_IPCOMP=y
+CONFIG_INET_XFRM_TUNNEL=y
+CONFIG_INET_TUNNEL=y
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=y
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=y
+CONFIG_INET6_ESP=y
+CONFIG_INET6_IPCOMP=y
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=y
+CONFIG_INET6_TUNNEL=y
+CONFIG_INET6_XFRM_MODE_TRANSPORT=y
+CONFIG_INET6_XFRM_MODE_TUNNEL=y
+CONFIG_INET6_XFRM_MODE_BEET=y
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=y
+# CONFIG_IPV6_TUNNEL is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+# CONFIG_NF_CONNTRACK_EVENTS is not set
+CONFIG_NF_CT_PROTO_GRE=m
+# CONFIG_NF_CT_PROTO_SCTP is not set
+# CONFIG_NF_CT_PROTO_UDPLITE is not set
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NETFILTER_XTABLES=y
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+# CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+# CONFIG_IP_NF_TARGET_ULOG is not set
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_HL=m
+CONFIG_IP6_NF_RAW=m
+
+#
+# Bridge: Netfilter Configuration
+#
+# CONFIG_BRIDGE_NF_EBTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+CONFIG_NET_CLS_ROUTE=y
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NET_TCPPROBE is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x80000000
+CONFIG_MTD_PHYSMAP_LEN=0x0
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_ATMEL_PWM is not set
+CONFIG_ATMEL_TCLIB=y
+CONFIG_ATMEL_TCB_CLKSRC=y
+CONFIG_ATMEL_TCB_CLKSRC_BLOCK=0
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ATMEL_SSC is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+CONFIG_PHYLIB=y
+
+#
+# MII PHY device drivers
+#
+# CONFIG_MARVELL_PHY is not set
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_QSEMI_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_CICADA_PHY is not set
+# CONFIG_VITESSE_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_BROADCOM_PHY is not set
+# CONFIG_ICPLUS_PHY is not set
+# CONFIG_FIXED_PHY is not set
+# CONFIG_MDIO_BITBANG is not set
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+CONFIG_MACB=y
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_AT32PSIF is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_SERIAL_ATMEL_PDC=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_RTC is not set
+CONFIG_GEN_RTC=n
+# CONFIG_GEN_RTC_X is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_ATMELTWI=m
+CONFIG_I2C_GPIO=m
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_ATMEL=y
+# CONFIG_SPI_BITBANG is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+CONFIG_SPI_SPIDEV=m
+# CONFIG_SPI_TLE62X0 is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_AT32AP700X_WDT=y
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+# CONFIG_USB_ARCH_HAS_HCD is not set
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+CONFIG_USB_GADGET_ATMEL_USBA=y
+CONFIG_USB_ATMEL_USBA=y
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_BLOCK_BOUNCE is not set
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_ATMELMCI=y
+CONFIG_MMC_SPI=m
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_GPIO=y
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_AT32AP700X=y
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_DNOTIFY is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=850
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_PROC_KCORE is not set
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+# CONFIG_NFSD_V4 is not set
+CONFIG_NFSD_TCP=y
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+CONFIG_INSTRUMENTATION=y
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+CONFIG_KPROBES=y
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_LKDTM is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=y
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_CRC7=m
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-2.6.24/mpc8313e-rdb/defconfig b/packages/linux/linux-2.6.24/mpc8313e-rdb/defconfig
index b87f62acbc..b7ca083ac1 100644
--- a/packages/linux/linux-2.6.24/mpc8313e-rdb/defconfig
+++ b/packages/linux/linux-2.6.24/mpc8313e-rdb/defconfig
@@ -758,7 +758,7 @@ CONFIG_NETDEVICES=y
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
+CONFIG_TUN=m
# CONFIG_VETH is not set
# CONFIG_ARCNET is not set
CONFIG_PHYLIB=y
diff --git a/packages/linux/linux-2.6.24/simpad/linux-2.6.24-SIMpad-rtc-sa1100.patch b/packages/linux/linux-2.6.24/simpad/linux-2.6.24-SIMpad-rtc-sa1100.patch
new file mode 100644
index 0000000000..6e09bfd103
--- /dev/null
+++ b/packages/linux/linux-2.6.24/simpad/linux-2.6.24-SIMpad-rtc-sa1100.patch
@@ -0,0 +1,28 @@
+diff -Nur linux-2.6.24.vanilla/drivers/rtc/rtc-sa1100.c linux-2.6.24/drivers/rtc/rtc-sa1100.c
+--- linux-2.6.24.vanilla/drivers/rtc/rtc-sa1100.c 2008-01-24 23:58:37.000000000 +0100
++++ linux-2.6.24/drivers/rtc/rtc-sa1100.c 2008-03-17 20:52:41.000000000 +0100
+@@ -15,6 +15,10 @@
+ * Converted to the RTC subsystem and Driver Model
+ * by Richard Purdie <rpurdie@rpsys.net>
+ *
++ * 2008/03/17 mrdata:
++ * disable IRQ RTC1Hz and RTCAlrm before request_irq
++ * in sa1100_rtc_open()
++ *
+ * 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
+@@ -154,7 +158,12 @@
+ static int sa1100_rtc_open(struct device *dev)
+ {
+ int ret;
+-
++
++ spin_lock_irq(&sa1100_rtc_lock);
++ RTSR &= ~RTSR_HZE;
++ RTSR &= ~RTSR_ALE;
++ spin_unlock_irq(&sa1100_rtc_lock);
++
+ ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, IRQF_DISABLED,
+ "rtc 1Hz", dev);
+ if (ret) {
diff --git a/packages/linux/linux-beagleboard/.mtn2git_empty b/packages/linux/linux-beagleboard/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-beagleboard/.mtn2git_empty
diff --git a/packages/linux/linux-beagleboard/defconfig b/packages/linux/linux-beagleboard/defconfig
new file mode 100644
index 0000000000..7a994cc810
--- /dev/null
+++ b/packages/linux/linux-beagleboard/defconfig
@@ -0,0 +1,805 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24-rc3-omap1
+# Mon Dec 3 16:12:50 2007
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+# CONFIG_SYSCTL_SYSCALL is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+CONFIG_ARCH_OMAP=y
+
+#
+# TI OMAP Implementations
+#
+# CONFIG_ARCH_OMAP1 is not set
+# CONFIG_ARCH_OMAP2 is not set
+CONFIG_ARCH_OMAP3=y
+
+#
+# OMAP Feature Selections
+#
+CONFIG_OMAP_DEBUG_SRAM_PATCH=y
+# CONFIG_OMAP_RESET_CLOCKS is not set
+CONFIG_OMAP_BOOT_TAG=y
+CONFIG_OMAP_BOOT_REASON=y
+# CONFIG_OMAP_COMPONENT_VERSION is not set
+# CONFIG_OMAP_GPIO_SWITCH is not set
+CONFIG_OMAP_MUX=y
+CONFIG_OMAP_MUX_DEBUG=y
+CONFIG_OMAP_MUX_WARNINGS=y
+# CONFIG_OMAP_MCBSP is not set
+# CONFIG_OMAP_MMU_FWK is not set
+# CONFIG_OMAP_MBOX_FWK is not set
+CONFIG_OMAP_MPU_TIMER=y
+# CONFIG_OMAP_32K_TIMER is not set
+CONFIG_OMAP_DM_TIMER=y
+CONFIG_OMAP_LL_DEBUG_UART1=y
+# CONFIG_OMAP_LL_DEBUG_UART2 is not set
+# CONFIG_OMAP_LL_DEBUG_UART3 is not set
+CONFIG_OMAP_SERIAL_WAKE=y
+CONFIG_ARCH_OMAP34XX=y
+CONFIG_ARCH_OMAP3430=y
+
+#
+# OMAP Board Type
+#
+# CONFIG_MACH_OMAP_3430SDP is not set
+CONFIG_MACH_OMAP3_BEAGLE=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_V7=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_PABRT_IFAR=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_ARM_XENON is not set
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_BPREDICT_DISABLE is not set
+CONFIG_HAS_TLS_REG=y
+# CONFIG_OUTER_CACHE is not set
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.0.1:/home/user/buildroot ip=192.168.0.2:192.168.0.1:192.168.0.1:255.255.255.0:tgt:eth0:off rw console=ttyS2,115200n8"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+# CONFIG_NEON is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=y
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+
+#
+# Networking
+#
+# CONFIG_NET is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_MTD is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+# CONFIG_INPUT_MOUSEDEV is not set
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=32
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_OMAP=y
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_TLV320AIC23 is not set
+CONFIG_TWL4030_CORE=y
+CONFIG_TWL4030_GPIO=y
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_OMAP_WATCHDOG=y
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# Enable Host or Gadget support to see Inventra options
+#
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_OMAP=y
+# CONFIG_NEW_LEDS is not set
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# CBUS support
+#
+# CONFIG_CBUS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+CONFIG_PRINT_QUOTA_WARNING=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+CONFIG_INSTRUMENTATION=y
+# CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+CONFIG_DEBUG_MUTEXES=y
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+# CONFIG_DEBUG_ERRORS is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-beagleboard_git.bb b/packages/linux/linux-beagleboard_git.bb
new file mode 100644
index 0000000000..610b9ea361
--- /dev/null
+++ b/packages/linux/linux-beagleboard_git.bb
@@ -0,0 +1,12 @@
+require linux.inc
+
+SRCREV = "1a77f70604e00b94bb3c841665a44b34430e9eda"
+PV = "2.6.23+2.6.24rc3-git${SRCREV}"
+PR = "r1"
+
+COMPATIBLE_MACHINE = "beagleboard"
+
+SRC_URI = "git://www.beagleboard.org/linux.git;protocol=http \
+ file://defconfig"
+
+S = "${WORKDIR}/linux"
diff --git a/packages/linux/linux-handhelds-2.6.inc b/packages/linux/linux-handhelds-2.6.inc
index 3bd9f78ea2..48e49115f0 100644
--- a/packages/linux/linux-handhelds-2.6.inc
+++ b/packages/linux/linux-handhelds-2.6.inc
@@ -37,6 +37,16 @@ do_configure() {
die "No default configuration for ${MACHINE} available."
fi
+ if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" = "glibc" ]; then
+ if [ ! -f ${KERNEL_INITRAMFS_PATH} ]; then
+ echo "${KERNEL_INITRAMFS_PATH} does not exist, you may need to bitbake it separately"
+ exit 1
+ fi
+
+ # Kernel expects non-compressed cpio
+ gzip -d -c ${KERNEL_INITRAMFS_PATH} >${WORKDIR}/initramfs.cpio
+ echo "CONFIG_INITRAMFS_SOURCE=\"${WORKDIR}/initramfs.cpio\"" >> ${S}/.config
+ fi
if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then
echo "CONFIG_AEABI=y" >> ${S}/.config
@@ -48,22 +58,13 @@ do_configure() {
sed -e '/CONFIG_AEABI/d' \
-e '/CONFIG_OABI_COMPAT=/d' \
+ -e '/CONFIG_INITRAMFS_SOURCE=/d' \
'${WORKDIR}/defconfig' >>'${S}/.config'
yes '' | oe_runmake oldconfig
}
-do_compile_prepend() {
- if [ -n "${KERNEL_INITRAMFS_PATH}" -a "${ANGSTROM_MODE}" == "glibc" ]; then
- if [ ! -f ${KERNEL_INITRAMFS_PATH} ]; then
- echo "${KERNEL_INITRAMFS_PATH} does not exist, you may need to bitbake it separately"
- exit 1
- fi
- cp ${KERNEL_INITRAMFS_PATH} usr/initramfs_data.cpio.gz
- fi
-}
-
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}
install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_FILENAME}
diff --git a/packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb b/packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb
index 066c17faed..3df1102761 100644
--- a/packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb
+++ b/packages/linux/linux-handhelds-2.6_2.6.21-hh20.bb
@@ -1,7 +1,7 @@
SECTION = "kernel"
DESCRIPTION = "handhelds.org Linux kernel 2.6 for PocketPCs and other consumer handheld devices."
LICENSE = "GPL"
-PR = "r14"
+PR = "r20"
DEFAULT_PREFERENCE = "-1"
@@ -12,6 +12,6 @@ FILESPATH = "${FILE_DIRNAME}/linux-handhelds-2.6-2.6.21/${MACHINE}:${FILE_DIRNAM
SRC_URI = "${HANDHELDS_CVS};module=linux/kernel26;tag=${@'K' + bb.data.getVar('PV',d,1).replace('.', '-')} \
file://linux-2.6.git-9d20fdd58e74d4d26dc5216efaaa0f800c23dd3a.patch;patch=1 \
http://www.rpsys.net/openzaurus/patches/archive/export_atags-r0a.patch;patch=1 \
- file://defconfig"
+ file://defconfig"
require linux-handhelds-2.6.inc
diff --git a/packages/linux/linux-mainstone/.mtn2git_empty b/packages/linux/linux-mainstone/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-mainstone/.mtn2git_empty
diff --git a/packages/linux/linux-mainstone/mainstone-keypad.patch b/packages/linux/linux-mainstone/mainstone-keypad.patch
new file mode 100644
index 0000000000..cad6289260
--- /dev/null
+++ b/packages/linux/linux-mainstone/mainstone-keypad.patch
@@ -0,0 +1,7631 @@
+diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/devices.c linux-2.6.25-rc4/arch/arm/mach-pxa/devices.c
+--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/devices.c 2008-03-08 18:25:54.000000000 +0100
++++ linux-2.6.25-rc4/arch/arm/mach-pxa/devices.c 2008-03-08 16:22:35.000000000 +0100
+@@ -396,6 +396,31 @@
+
+ #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
+
++static struct resource pxa27x_resource_keypad[] = {
++ [0] = {
++ .start = 0x41500000,
++ .end = 0x4150004c,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_KEYPAD,
++ .end = IRQ_KEYPAD,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device pxa27x_device_keypad = {
++ .name = "pxa27x-keypad",
++ .id = -1,
++ .resource = pxa27x_resource_keypad,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_keypad),
++};
++
++void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
++{
++ pxa_register_device(&pxa27x_device_keypad, info);
++}
++
+ static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
+
+ static struct resource pxa27x_resource_ohci[] = {
+diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/devices.h linux-2.6.25-rc4/arch/arm/mach-pxa/devices.h
+--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/devices.h 2008-03-08 18:25:54.000000000 +0100
++++ linux-2.6.25-rc4/arch/arm/mach-pxa/devices.h 2008-03-08 16:22:35.000000000 +0100
+@@ -14,6 +14,7 @@
+
+ extern struct platform_device pxa27x_device_i2c_power;
+ extern struct platform_device pxa27x_device_ohci;
++extern struct platform_device pxa27x_device_keypad;
+
+ extern struct platform_device pxa25x_device_ssp;
+ extern struct platform_device pxa25x_device_nssp;
+diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/mainstone.c linux-2.6.25-rc4/arch/arm/mach-pxa/mainstone.c
+--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/mainstone.c 2008-03-08 18:25:54.000000000 +0100
++++ linux-2.6.25-rc4/arch/arm/mach-pxa/mainstone.c 2008-03-08 16:11:42.000000000 +0100
+@@ -46,6 +46,7 @@
+ #include <asm/arch/mmc.h>
+ #include <asm/arch/irda.h>
+ #include <asm/arch/ohci.h>
++#include <asm/arch/pxa27x_keypad.h>
+
+ #include "generic.h"
+ #include "devices.h"
+@@ -460,6 +461,72 @@
+ .init = mainstone_ohci_init,
+ };
+
++#if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULES)
++static unsigned int mainstone_matrix_keys[] = {
++ KEY(0, 0, KEY_A), KEY(1, 0, KEY_B), KEY(2, 0, KEY_C),
++ KEY(3, 0, KEY_D), KEY(4, 0, KEY_E), KEY(5, 0, KEY_F),
++ KEY(0, 1, KEY_G), KEY(1, 1, KEY_H), KEY(2, 1, KEY_I),
++ KEY(3, 1, KEY_J), KEY(4, 1, KEY_K), KEY(5, 1, KEY_L),
++ KEY(0, 2, KEY_M), KEY(1, 2, KEY_N), KEY(2, 2, KEY_O),
++ KEY(3, 2, KEY_P), KEY(4, 2, KEY_Q), KEY(5, 2, KEY_R),
++ KEY(0, 3, KEY_S), KEY(1, 3, KEY_T), KEY(2, 3, KEY_U),
++ KEY(3, 3, KEY_V), KEY(4, 3, KEY_W), KEY(5, 3, KEY_X),
++ KEY(2, 4, KEY_Y), KEY(3, 4, KEY_Z),
++
++ KEY(0, 4, KEY_DOT), /* . */
++ KEY(1, 4, KEY_CLOSE), /* @ */
++ KEY(4, 4, KEY_SLASH),
++ KEY(5, 4, KEY_BACKSLASH),
++ KEY(0, 5, KEY_HOME),
++ KEY(1, 5, KEY_LEFTSHIFT),
++ KEY(2, 5, KEY_SPACE),
++ KEY(3, 5, KEY_SPACE),
++ KEY(4, 5, KEY_ENTER),
++ KEY(5, 5, KEY_BACKSPACE),
++
++ KEY(0, 6, KEY_UP),
++ KEY(1, 6, KEY_DOWN),
++ KEY(2, 6, KEY_LEFT),
++ KEY(3, 6, KEY_RIGHT),
++ KEY(4, 6, KEY_SELECT),
++};
++
++struct pxa27x_keypad_platform_data mainstone_keypad_info = {
++ .matrix_key_rows = 6,
++ .matrix_key_cols = 7,
++ .matrix_key_map = mainstone_matrix_keys,
++ .matrix_key_map_size = ARRAY_SIZE(mainstone_matrix_keys),
++
++ .enable_rotary0 = 1,
++ .rotary0_up_key = KEY_UP,
++ .rotary0_down_key = KEY_DOWN,
++
++ .debounce_interval = 30,
++};
++
++static void __init mainstone_init_keypad(void)
++{
++ pxa_gpio_mode(100 | GPIO_ALT_FN_1_IN); /* MKIN0 */
++ pxa_gpio_mode(101 | GPIO_ALT_FN_1_IN); /* MKIN1 */
++ pxa_gpio_mode(102 | GPIO_ALT_FN_1_IN); /* MKIN2 */
++ pxa_gpio_mode( 97 | GPIO_ALT_FN_3_IN); /* MKIN3 */
++ pxa_gpio_mode( 98 | GPIO_ALT_FN_3_IN); /* MKIN4 */
++ pxa_gpio_mode( 99 | GPIO_ALT_FN_3_IN); /* MKIN5 */
++ pxa_gpio_mode(103 | GPIO_ALT_FN_2_OUT); /* MKOUT0 */
++ pxa_gpio_mode(104 | GPIO_ALT_FN_2_OUT); /* MKOUT1 */
++ pxa_gpio_mode(105 | GPIO_ALT_FN_2_OUT); /* MKOUT2 */
++ pxa_gpio_mode(106 | GPIO_ALT_FN_2_OUT); /* MKOUT3 */
++ pxa_gpio_mode(107 | GPIO_ALT_FN_2_OUT); /* MKOUT4 */
++ pxa_gpio_mode(108 | GPIO_ALT_FN_2_OUT); /* MKOUT5 */
++ pxa_gpio_mode( 93 | GPIO_ALT_FN_1_IN); /* DKIN0 */
++ pxa_gpio_mode( 94 | GPIO_ALT_FN_1_IN); /* DKIN1 */
++
++ pxa_set_keypad_info(&mainstone_keypad_info);
++}
++#else
++static inline void mainstone_init_keypad(void) { }
++#endif
++
+ static void __init mainstone_init(void)
+ {
+ int SW7 = 0; /* FIXME: get from SCR (Mst doc section 3.2.1.1) */
+@@ -520,6 +587,8 @@
+ pxa_set_mci_info(&mainstone_mci_platform_data);
+ pxa_set_ficp_info(&mainstone_ficp_platform_data);
+ pxa_set_ohci_info(&mainstone_ohci_platform_data);
++
++ mainstone_init_keypad();
+ }
+
+
+diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/pxa27x.c linux-2.6.25-rc4/arch/arm/mach-pxa/pxa27x.c
+--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/pxa27x.c 2008-03-08 18:25:54.000000000 +0100
++++ linux-2.6.25-rc4/arch/arm/mach-pxa/pxa27x.c 2008-03-08 16:22:35.000000000 +0100
+@@ -151,7 +151,7 @@
+
+ INIT_CKEN("USBCLK", USBHOST, 48000000, 0, &pxa27x_device_ohci.dev),
+ INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
+- INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
++ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
+
+ INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
+ INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
+diff -NbBur linux-2.6.25-rc4-orig/arch/arm/mach-pxa/pxa3xx.c linux-2.6.25-rc4/arch/arm/mach-pxa/pxa3xx.c
+--- linux-2.6.25-rc4-orig/arch/arm/mach-pxa/pxa3xx.c 2008-03-08 18:25:54.000000000 +0100
++++ linux-2.6.25-rc4/arch/arm/mach-pxa/pxa3xx.c 2008-03-08 16:22:35.000000000 +0100
+@@ -185,6 +185,7 @@
+ PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
+ PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev),
+ PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
++ PXA3xx_CKEN("KBDCLK", KEYPAD, 32768, 0, &pxa27x_device_keypad.dev),
+
+ PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
+ PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/akita.h linux-2.6.25-rc4/include/asm-arm/arch/akita.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/akita.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/akita.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,32 @@
++/*
++ * Hardware specific definitions for SL-C1000 (Akita)
++ *
++ * Copyright (c) 2005 Richard Purdie
++ *
++ * 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.
++ *
++ */
++
++/* Akita IO Expander GPIOs */
++
++#define AKITA_IOEXP_RESERVED_7 (1 << 7)
++#define AKITA_IOEXP_IR_ON (1 << 6)
++#define AKITA_IOEXP_AKIN_PULLUP (1 << 5)
++#define AKITA_IOEXP_BACKLIGHT_CONT (1 << 4)
++#define AKITA_IOEXP_BACKLIGHT_ON (1 << 3)
++#define AKITA_IOEXP_MIC_BIAS (1 << 2)
++#define AKITA_IOEXP_RESERVED_1 (1 << 1)
++#define AKITA_IOEXP_RESERVED_0 (1 << 0)
++
++/* Direction Bitfield 0=output 1=input */
++#define AKITA_IOEXP_IO_DIR 0
++/* Default Values */
++#define AKITA_IOEXP_IO_OUT (AKITA_IOEXP_IR_ON | AKITA_IOEXP_AKIN_PULLUP)
++
++extern struct platform_device akitaioexp_device;
++
++void akita_set_ioexp(struct device *dev, unsigned char bitmask);
++void akita_reset_ioexp(struct device *dev, unsigned char bitmask);
++
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/audio.h linux-2.6.25-rc4/include/asm-arm/arch/audio.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/audio.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/audio.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,15 @@
++#ifndef __ASM_ARCH_AUDIO_H__
++#define __ASM_ARCH_AUDIO_H__
++
++#include <sound/core.h>
++#include <sound/pcm.h>
++
++typedef struct {
++ int (*startup)(struct snd_pcm_substream *, void *);
++ void (*shutdown)(struct snd_pcm_substream *, void *);
++ void (*suspend)(void *);
++ void (*resume)(void *);
++ void *priv;
++} pxa2xx_audio_ops_t;
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/bitfield.h linux-2.6.25-rc4/include/asm-arm/arch/bitfield.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/bitfield.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/bitfield.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,113 @@
++/*
++ * FILE bitfield.h
++ *
++ * Version 1.1
++ * Author Copyright (c) Marc A. Viredaz, 1998
++ * DEC Western Research Laboratory, Palo Alto, CA
++ * Date April 1998 (April 1997)
++ * System Advanced RISC Machine (ARM)
++ * Language C or ARM Assembly
++ * Purpose Definition of macros to operate on bit fields.
++ */
++
++
++
++#ifndef __BITFIELD_H
++#define __BITFIELD_H
++
++#ifndef __ASSEMBLY__
++#define UData(Data) ((unsigned long) (Data))
++#else
++#define UData(Data) (Data)
++#endif
++
++
++/*
++ * MACRO: Fld
++ *
++ * Purpose
++ * The macro "Fld" encodes a bit field, given its size and its shift value
++ * with respect to bit 0.
++ *
++ * Note
++ * A more intuitive way to encode bit fields would have been to use their
++ * mask. However, extracting size and shift value information from a bit
++ * field's mask is cumbersome and might break the assembler (255-character
++ * line-size limit).
++ *
++ * Input
++ * Size Size of the bit field, in number of bits.
++ * Shft Shift value of the bit field with respect to bit 0.
++ *
++ * Output
++ * Fld Encoded bit field.
++ */
++
++#define Fld(Size, Shft) (((Size) << 16) + (Shft))
++
++
++/*
++ * MACROS: FSize, FShft, FMsk, FAlnMsk, F1stBit
++ *
++ * Purpose
++ * The macros "FSize", "FShft", "FMsk", "FAlnMsk", and "F1stBit" return
++ * the size, shift value, mask, aligned mask, and first bit of a
++ * bit field.
++ *
++ * Input
++ * Field Encoded bit field (using the macro "Fld").
++ *
++ * Output
++ * FSize Size of the bit field, in number of bits.
++ * FShft Shift value of the bit field with respect to bit 0.
++ * FMsk Mask for the bit field.
++ * FAlnMsk Mask for the bit field, aligned on bit 0.
++ * F1stBit First bit of the bit field.
++ */
++
++#define FSize(Field) ((Field) >> 16)
++#define FShft(Field) ((Field) & 0x0000FFFF)
++#define FMsk(Field) (((UData (1) << FSize (Field)) - 1) << FShft (Field))
++#define FAlnMsk(Field) ((UData (1) << FSize (Field)) - 1)
++#define F1stBit(Field) (UData (1) << FShft (Field))
++
++
++/*
++ * MACRO: FInsrt
++ *
++ * Purpose
++ * The macro "FInsrt" inserts a value into a bit field by shifting the
++ * former appropriately.
++ *
++ * Input
++ * Value Bit-field value.
++ * Field Encoded bit field (using the macro "Fld").
++ *
++ * Output
++ * FInsrt Bit-field value positioned appropriately.
++ */
++
++#define FInsrt(Value, Field) \
++ (UData (Value) << FShft (Field))
++
++
++/*
++ * MACRO: FExtr
++ *
++ * Purpose
++ * The macro "FExtr" extracts the value of a bit field by masking and
++ * shifting it appropriately.
++ *
++ * Input
++ * Data Data containing the bit-field to be extracted.
++ * Field Encoded bit field (using the macro "Fld").
++ *
++ * Output
++ * FExtr Bit-field value.
++ */
++
++#define FExtr(Data, Field) \
++ ((UData (Data) >> FShft (Field)) & FAlnMsk (Field))
++
++
++#endif /* __BITFIELD_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/cm-x270.h linux-2.6.25-rc4/include/asm-arm/arch/cm-x270.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/cm-x270.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/cm-x270.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,50 @@
++/*
++ * linux/include/asm/arch-pxa/cm-x270.h
++ *
++ * Copyright Compulab Ltd., 2003, 2007
++ * Mike Rapoport <mike@compulab.co.il>
++ *
++ * 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.
++ */
++
++
++/* CM-x270 device physical addresses */
++#define CMX270_CS1_PHYS (PXA_CS1_PHYS)
++#define MARATHON_PHYS (PXA_CS2_PHYS)
++#define CMX270_IDE104_PHYS (PXA_CS3_PHYS)
++#define CMX270_IT8152_PHYS (PXA_CS4_PHYS)
++
++/* Statically mapped regions */
++#define CMX270_VIRT_BASE (0xe8000000)
++#define CMX270_IT8152_VIRT (CMX270_VIRT_BASE)
++#define CMX270_IDE104_VIRT (CMX270_IT8152_VIRT + SZ_64M)
++
++/* GPIO related definitions */
++#define GPIO_IT8152_IRQ (22)
++
++#define IRQ_GPIO_IT8152_IRQ IRQ_GPIO(GPIO_IT8152_IRQ)
++#define PME_IRQ IRQ_GPIO(0)
++#define CMX270_IDE_IRQ IRQ_GPIO(100)
++#define CMX270_GPIRQ1 IRQ_GPIO(101)
++#define CMX270_TOUCHIRQ IRQ_GPIO(96)
++#define CMX270_ETHIRQ IRQ_GPIO(10)
++#define CMX270_GFXIRQ IRQ_GPIO(95)
++#define CMX270_NANDIRQ IRQ_GPIO(89)
++#define CMX270_MMC_IRQ IRQ_GPIO(83)
++
++/* PCMCIA related definitions */
++#define PCC_DETECT(x) (GPLR(84 - (x)) & GPIO_bit(84 - (x)))
++#define PCC_READY(x) (GPLR(82 - (x)) & GPIO_bit(82 - (x)))
++
++#define PCMCIA_S0_CD_VALID IRQ_GPIO(84)
++#define PCMCIA_S0_CD_VALID_EDGE GPIO_BOTH_EDGES
++
++#define PCMCIA_S1_CD_VALID IRQ_GPIO(83)
++#define PCMCIA_S1_CD_VALID_EDGE GPIO_BOTH_EDGES
++
++#define PCMCIA_S0_RDYINT IRQ_GPIO(82)
++#define PCMCIA_S1_RDYINT IRQ_GPIO(81)
++
++#define PCMCIA_RESET_GPIO 53
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/colibri.h linux-2.6.25-rc4/include/asm-arm/arch/colibri.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/colibri.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/colibri.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,19 @@
++#ifndef _COLIBRI_H_
++#define _COLIBRI_H_
++
++/* physical memory regions */
++#define COLIBRI_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */
++#define COLIBRI_ETH_PHYS (PXA_CS2_PHYS) /* Ethernet DM9000 region */
++#define COLIBRI_SDRAM_BASE 0xa0000000 /* SDRAM region */
++
++/* virtual memory regions */
++#define COLIBRI_DISK_VIRT 0xF0000000 /* Disk On Chip region */
++
++/* size of flash */
++#define COLIBRI_FLASH_SIZE 0x02000000 /* Flash size 32 MB */
++
++/* Ethernet Controller Davicom DM9000 */
++#define GPIO_DM9000 114
++#define COLIBRI_ETH_IRQ IRQ_GPIO(GPIO_DM9000)
++
++#endif /* _COLIBRI_H_ */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/corgi.h linux-2.6.25-rc4/include/asm-arm/arch/corgi.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/corgi.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/corgi.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,109 @@
++/*
++ * Hardware specific definitions for SL-C7xx series of PDAs
++ *
++ * Copyright (c) 2004-2005 Richard Purdie
++ *
++ * Based on Sharp's 2.4 kernel patches
++ *
++ * 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_ARCH_CORGI_H
++#define __ASM_ARCH_CORGI_H 1
++
++
++/*
++ * Corgi (Non Standard) GPIO Definitions
++ */
++#define CORGI_GPIO_KEY_INT (0) /* Keyboard Interrupt */
++#define CORGI_GPIO_AC_IN (1) /* Charger Detection */
++#define CORGI_GPIO_WAKEUP (3) /* System wakeup notification? */
++#define CORGI_GPIO_AK_INT (4) /* Headphone Jack Control Interrupt */
++#define CORGI_GPIO_TP_INT (5) /* Touch Panel Interrupt */
++#define CORGI_GPIO_nSD_WP (7) /* SD Write Protect? */
++#define CORGI_GPIO_nSD_DETECT (9) /* MMC/SD Card Detect */
++#define CORGI_GPIO_nSD_INT (10) /* SD Interrupt for SDIO? */
++#define CORGI_GPIO_MAIN_BAT_LOW (11) /* Main Battery Low Notification */
++#define CORGI_GPIO_BAT_COVER (11) /* Battery Cover Detect */
++#define CORGI_GPIO_LED_ORANGE (13) /* Orange LED Control */
++#define CORGI_GPIO_CF_CD (14) /* Compact Flash Card Detect */
++#define CORGI_GPIO_CHRG_FULL (16) /* Charging Complete Notification */
++#define CORGI_GPIO_CF_IRQ (17) /* Compact Flash Interrupt */
++#define CORGI_GPIO_LCDCON_CS (19) /* LCD Control Chip Select */
++#define CORGI_GPIO_MAX1111_CS (20) /* MAX1111 Chip Select */
++#define CORGI_GPIO_ADC_TEMP_ON (21) /* Select battery voltage or temperature */
++#define CORGI_GPIO_IR_ON (22) /* Enable IR Transciever */
++#define CORGI_GPIO_ADS7846_CS (24) /* ADS7846 Chip Select */
++#define CORGI_GPIO_SD_PWR (33) /* MMC/SD Power */
++#define CORGI_GPIO_CHRG_ON (38) /* Enable battery Charging */
++#define CORGI_GPIO_DISCHARGE_ON (42) /* Enable battery Discharge */
++#define CORGI_GPIO_CHRG_UKN (43) /* Unknown Charging (Bypass Control?) */
++#define CORGI_GPIO_HSYNC (44) /* LCD HSync Pulse */
++#define CORGI_GPIO_USB_PULLUP (45) /* USB show presence to host */
++
++
++/*
++ * Corgi Keyboard Definitions
++ */
++#define CORGI_KEY_STROBE_NUM (12)
++#define CORGI_KEY_SENSE_NUM (8)
++#define CORGI_GPIO_ALL_STROBE_BIT (0x00003ffc)
++#define CORGI_GPIO_HIGH_SENSE_BIT (0xfc000000)
++#define CORGI_GPIO_HIGH_SENSE_RSHIFT (26)
++#define CORGI_GPIO_LOW_SENSE_BIT (0x00000003)
++#define CORGI_GPIO_LOW_SENSE_LSHIFT (6)
++#define CORGI_GPIO_STROBE_BIT(a) GPIO_bit(66+(a))
++#define CORGI_GPIO_SENSE_BIT(a) GPIO_bit(58+(a))
++#define CORGI_GAFR_ALL_STROBE_BIT (0x0ffffff0)
++#define CORGI_GAFR_HIGH_SENSE_BIT (0xfff00000)
++#define CORGI_GAFR_LOW_SENSE_BIT (0x0000000f)
++#define CORGI_GPIO_KEY_SENSE(a) (58+(a))
++#define CORGI_GPIO_KEY_STROBE(a) (66+(a))
++
++
++/*
++ * Corgi Interrupts
++ */
++#define CORGI_IRQ_GPIO_KEY_INT IRQ_GPIO(0)
++#define CORGI_IRQ_GPIO_AC_IN IRQ_GPIO(1)
++#define CORGI_IRQ_GPIO_WAKEUP IRQ_GPIO(3)
++#define CORGI_IRQ_GPIO_AK_INT IRQ_GPIO(4)
++#define CORGI_IRQ_GPIO_TP_INT IRQ_GPIO(5)
++#define CORGI_IRQ_GPIO_nSD_DETECT IRQ_GPIO(9)
++#define CORGI_IRQ_GPIO_nSD_INT IRQ_GPIO(10)
++#define CORGI_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(11)
++#define CORGI_IRQ_GPIO_CF_CD IRQ_GPIO(14)
++#define CORGI_IRQ_GPIO_CHRG_FULL IRQ_GPIO(16) /* Battery fully charged */
++#define CORGI_IRQ_GPIO_CF_IRQ IRQ_GPIO(17)
++#define CORGI_IRQ_GPIO_KEY_SENSE(a) IRQ_GPIO(58+(a)) /* Keyboard Sense lines */
++
++
++/*
++ * Corgi SCOOP GPIOs and Config
++ */
++#define CORGI_SCP_LED_GREEN SCOOP_GPCR_PA11
++#define CORGI_SCP_SWA SCOOP_GPCR_PA12 /* Hinge Switch A */
++#define CORGI_SCP_SWB SCOOP_GPCR_PA13 /* Hinge Switch B */
++#define CORGI_SCP_MUTE_L SCOOP_GPCR_PA14
++#define CORGI_SCP_MUTE_R SCOOP_GPCR_PA15
++#define CORGI_SCP_AKIN_PULLUP SCOOP_GPCR_PA16
++#define CORGI_SCP_APM_ON SCOOP_GPCR_PA17
++#define CORGI_SCP_BACKLIGHT_CONT SCOOP_GPCR_PA18
++#define CORGI_SCP_MIC_BIAS SCOOP_GPCR_PA19
++
++#define CORGI_SCOOP_IO_DIR ( CORGI_SCP_LED_GREEN | CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R | \
++ CORGI_SCP_AKIN_PULLUP | CORGI_SCP_APM_ON | CORGI_SCP_BACKLIGHT_CONT | \
++ CORGI_SCP_MIC_BIAS )
++#define CORGI_SCOOP_IO_OUT ( CORGI_SCP_MUTE_L | CORGI_SCP_MUTE_R )
++
++
++/*
++ * Shared data structures
++ */
++extern struct platform_device corgiscoop_device;
++extern struct platform_device corgissp_device;
++
++#endif /* __ASM_ARCH_CORGI_H */
++
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/debug-macro.S linux-2.6.25-rc4/include/asm-arm/arch/debug-macro.S
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/debug-macro.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/debug-macro.S 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,25 @@
++/* linux/include/asm-arm/arch-pxa/debug-macro.S
++ *
++ * Debugging macro include header
++ *
++ * Copyright (C) 1994-1999 Russell King
++ * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
++ *
++ * 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.
++ *
++*/
++
++#include "hardware.h"
++
++ .macro addruart,rx
++ mrc p15, 0, \rx, c1, c0
++ tst \rx, #1 @ MMU enabled?
++ moveq \rx, #0x40000000 @ physical
++ movne \rx, #io_p2v(0x40000000) @ virtual
++ orr \rx, \rx, #0x00100000
++ .endm
++
++#define UART_SHIFT 2
++#include <asm/hardware/debug-8250.S>
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/dma.h linux-2.6.25-rc4/include/asm-arm/arch/dma.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/dma.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/dma.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,50 @@
++/*
++ * linux/include/asm-arm/arch-pxa/dma.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software, Inc.
++ *
++ * 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_ARCH_DMA_H
++#define __ASM_ARCH_DMA_H
++
++/*
++ * Descriptor structure for PXA's DMA engine
++ * Note: this structure must always be aligned to a 16-byte boundary.
++ */
++
++typedef struct pxa_dma_desc {
++ volatile u32 ddadr; /* Points to the next descriptor + flags */
++ volatile u32 dsadr; /* DSADR value for the current transfer */
++ volatile u32 dtadr; /* DTADR value for the current transfer */
++ volatile u32 dcmd; /* DCMD value for the current transfer */
++} pxa_dma_desc;
++
++typedef enum {
++ DMA_PRIO_HIGH = 0,
++ DMA_PRIO_MEDIUM = 1,
++ DMA_PRIO_LOW = 2
++} pxa_dma_prio;
++
++#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
++#define HAVE_ARCH_PCI_SET_DMA_MASK 1
++#endif
++
++/*
++ * DMA registration
++ */
++
++int __init pxa_init_dma(int num_ch);
++
++int pxa_request_dma (char *name,
++ pxa_dma_prio prio,
++ void (*irq_handler)(int, void *),
++ void *data);
++
++void pxa_free_dma (int dma_ch);
++
++#endif /* _ASM_ARCH_DMA_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/entry-macro.S linux-2.6.25-rc4/include/asm-arm/arch/entry-macro.S
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/entry-macro.S 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/entry-macro.S 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,57 @@
++/*
++ * include/asm-arm/arch-pxa/entry-macro.S
++ *
++ * Low-level IRQ helper macros for PXA-based platforms
++ *
++ * This file is licensed under the terms of the GNU General Public
++ * License version 2. This program is licensed "as is" without any
++ * warranty of any kind, whether express or implied.
++ */
++#include <asm/hardware.h>
++#include <asm/arch/irqs.h>
++
++ .macro disable_fiq
++ .endm
++
++ .macro get_irqnr_preamble, base, tmp
++ .endm
++
++ .macro arch_ret_to_user, tmp1, tmp2
++ .endm
++
++ .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
++ mrc p15, 0, \tmp, c0, c0, 0 @ CPUID
++ mov \tmp, \tmp, lsr #13
++ and \tmp, \tmp, #0x7 @ Core G
++ cmp \tmp, #1
++ bhi 1004f
++
++ mov \base, #io_p2v(0x40000000) @ IIR Ctl = 0x40d00000
++ add \base, \base, #0x00d00000
++ ldr \irqstat, [\base, #0] @ ICIP
++ ldr \irqnr, [\base, #4] @ ICMR
++ b 1002f
++
++1004:
++ mrc p6, 0, \irqstat, c6, c0, 0 @ ICIP2
++ mrc p6, 0, \irqnr, c7, c0, 0 @ ICMR2
++ ands \irqnr, \irqstat, \irqnr
++ beq 1003f
++ rsb \irqstat, \irqnr, #0
++ and \irqstat, \irqstat, \irqnr
++ clz \irqnr, \irqstat
++ rsb \irqnr, \irqnr, #31
++ add \irqnr, \irqnr, #32
++ b 1001f
++1003:
++ mrc p6, 0, \irqstat, c0, c0, 0 @ ICIP
++ mrc p6, 0, \irqnr, c1, c0, 0 @ ICMR
++1002:
++ ands \irqnr, \irqstat, \irqnr
++ beq 1001f
++ rsb \irqstat, \irqnr, #0
++ and \irqstat, \irqstat, \irqnr
++ clz \irqnr, \irqstat
++ rsb \irqnr, \irqnr, #31
++1001:
++ .endm
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/gpio.h linux-2.6.25-rc4/include/asm-arm/arch/gpio.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/gpio.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/gpio.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,65 @@
++/*
++ * linux/include/asm-arm/arch-pxa/gpio.h
++ *
++ * PXA GPIO wrappers for arch-neutral GPIO calls
++ *
++ * Written by Philipp Zabel <philipp.zabel@gmail.com>
++ *
++ * 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
++ *
++ */
++
++#ifndef __ASM_ARCH_PXA_GPIO_H
++#define __ASM_ARCH_PXA_GPIO_H
++
++#include <asm/arch/pxa-regs.h>
++#include <asm/irq.h>
++#include <asm/hardware.h>
++
++#include <asm-generic/gpio.h>
++
++
++/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
++ * Those cases currently cause holes in the GPIO number space.
++ */
++#define NR_BUILTIN_GPIO 128
++
++static inline int gpio_get_value(unsigned gpio)
++{
++ if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO))
++ return GPLR(gpio) & GPIO_bit(gpio);
++ else
++ return __gpio_get_value(gpio);
++}
++
++static inline void gpio_set_value(unsigned gpio, int value)
++{
++ if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) {
++ if (value)
++ GPSR(gpio) = GPIO_bit(gpio);
++ else
++ GPCR(gpio) = GPIO_bit(gpio);
++ } else {
++ __gpio_set_value(gpio, value);
++ }
++}
++
++#define gpio_cansleep __gpio_cansleep
++
++#define gpio_to_irq(gpio) IRQ_GPIO(gpio)
++#define irq_to_gpio(irq) IRQ_TO_GPIO(irq)
++
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/hardware.h linux-2.6.25-rc4/include/asm-arm/arch/hardware.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/hardware.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/hardware.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,216 @@
++/*
++ * linux/include/asm-arm/arch-pxa/hardware.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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_ARCH_HARDWARE_H
++#define __ASM_ARCH_HARDWARE_H
++
++/*
++ * We requires absolute addresses.
++ */
++#define PCIO_BASE 0
++
++/*
++ * Workarounds for at least 2 errata so far require this.
++ * The mapping is set in mach-pxa/generic.c.
++ */
++#define UNCACHED_PHYS_0 0xff000000
++#define UNCACHED_ADDR UNCACHED_PHYS_0
++
++/*
++ * Intel PXA2xx internal register mapping:
++ *
++ * 0x40000000 - 0x41ffffff <--> 0xf2000000 - 0xf3ffffff
++ * 0x44000000 - 0x45ffffff <--> 0xf4000000 - 0xf5ffffff
++ * 0x48000000 - 0x49ffffff <--> 0xf6000000 - 0xf7ffffff
++ * 0x4c000000 - 0x4dffffff <--> 0xf8000000 - 0xf9ffffff
++ * 0x50000000 - 0x51ffffff <--> 0xfa000000 - 0xfbffffff
++ * 0x54000000 - 0x55ffffff <--> 0xfc000000 - 0xfdffffff
++ * 0x58000000 - 0x59ffffff <--> 0xfe000000 - 0xffffffff
++ *
++ * Note that not all PXA2xx chips implement all those addresses, and the
++ * kernel only maps the minimum needed range of this mapping.
++ */
++#define io_p2v(x) (0xf2000000 + ((x) & 0x01ffffff) + (((x) & 0x1c000000) >> 1))
++#define io_v2p(x) (0x3c000000 + ((x) & 0x01ffffff) + (((x) & 0x0e000000) << 1))
++
++#ifndef __ASSEMBLY__
++
++# define __REG(x) (*((volatile u32 *)io_p2v(x)))
++
++/* With indexed regs we don't want to feed the index through io_p2v()
++ especially if it is a variable, otherwise horrible code will result. */
++# define __REG2(x,y) \
++ (*(volatile u32 *)((u32)&__REG(x) + (y)))
++
++# define __PREG(x) (io_v2p((u32)&(x)))
++
++#else
++
++# define __REG(x) io_p2v(x)
++# define __PREG(x) io_v2p(x)
++
++#endif
++
++#ifndef __ASSEMBLY__
++
++#ifdef CONFIG_PXA25x
++#define __cpu_is_pxa21x(id) \
++ ({ \
++ unsigned int _id = (id) >> 4 & 0xf3f; \
++ _id == 0x212; \
++ })
++
++#define __cpu_is_pxa25x(id) \
++ ({ \
++ unsigned int _id = (id) >> 4 & 0xfff; \
++ _id == 0x2d0 || _id == 0x290; \
++ })
++#else
++#define __cpu_is_pxa21x(id) (0)
++#define __cpu_is_pxa25x(id) (0)
++#endif
++
++#ifdef CONFIG_PXA27x
++#define __cpu_is_pxa27x(id) \
++ ({ \
++ unsigned int _id = (id) >> 4 & 0xfff; \
++ _id == 0x411; \
++ })
++#else
++#define __cpu_is_pxa27x(id) (0)
++#endif
++
++#ifdef CONFIG_CPU_PXA300
++#define __cpu_is_pxa300(id) \
++ ({ \
++ unsigned int _id = (id) >> 4 & 0xfff; \
++ _id == 0x688; \
++ })
++#else
++#define __cpu_is_pxa300(id) (0)
++#endif
++
++#ifdef CONFIG_CPU_PXA310
++#define __cpu_is_pxa310(id) \
++ ({ \
++ unsigned int _id = (id) >> 4 & 0xfff; \
++ _id == 0x689; \
++ })
++#else
++#define __cpu_is_pxa310(id) (0)
++#endif
++
++#ifdef CONFIG_CPU_PXA320
++#define __cpu_is_pxa320(id) \
++ ({ \
++ unsigned int _id = (id) >> 4 & 0xfff; \
++ _id == 0x603 || _id == 0x682; \
++ })
++#else
++#define __cpu_is_pxa320(id) (0)
++#endif
++
++#define cpu_is_pxa21x() \
++ ({ \
++ __cpu_is_pxa21x(read_cpuid_id()); \
++ })
++
++#define cpu_is_pxa25x() \
++ ({ \
++ __cpu_is_pxa25x(read_cpuid_id()); \
++ })
++
++#define cpu_is_pxa27x() \
++ ({ \
++ __cpu_is_pxa27x(read_cpuid_id()); \
++ })
++
++#define cpu_is_pxa300() \
++ ({ \
++ __cpu_is_pxa300(read_cpuid_id()); \
++ })
++
++#define cpu_is_pxa310() \
++ ({ \
++ __cpu_is_pxa310(read_cpuid_id()); \
++ })
++
++#define cpu_is_pxa320() \
++ ({ \
++ __cpu_is_pxa320(read_cpuid_id()); \
++ })
++
++/*
++ * CPUID Core Generation Bit
++ * <= 0x2 for pxa21x/pxa25x/pxa26x/pxa27x
++ * == 0x3 for pxa300/pxa310/pxa320
++ */
++#define __cpu_is_pxa2xx(id) \
++ ({ \
++ unsigned int _id = (id) >> 13 & 0x7; \
++ _id <= 0x2; \
++ })
++
++#define __cpu_is_pxa3xx(id) \
++ ({ \
++ unsigned int _id = (id) >> 13 & 0x7; \
++ _id == 0x3; \
++ })
++
++#define cpu_is_pxa2xx() \
++ ({ \
++ __cpu_is_pxa2xx(read_cpuid_id()); \
++ })
++
++#define cpu_is_pxa3xx() \
++ ({ \
++ __cpu_is_pxa3xx(read_cpuid_id()); \
++ })
++
++/*
++ * Handy routine to set GPIO alternate functions
++ */
++extern int pxa_gpio_mode( int gpio_mode );
++
++/*
++ * Return GPIO level, nonzero means high, zero is low
++ */
++extern int pxa_gpio_get_value(unsigned gpio);
++
++/*
++ * Set output GPIO level
++ */
++extern void pxa_gpio_set_value(unsigned gpio, int value);
++
++/*
++ * Routine to enable or disable CKEN
++ */
++static inline void __deprecated pxa_set_cken(int clock, int enable)
++{
++ extern void __pxa_set_cken(int clock, int enable);
++ __pxa_set_cken(clock, enable);
++}
++
++/*
++ * return current memory and LCD clock frequency in units of 10kHz
++ */
++extern unsigned int get_memclk_frequency_10khz(void);
++
++#endif
++
++#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
++#define PCIBIOS_MIN_IO 0
++#define PCIBIOS_MIN_MEM 0
++#define pcibios_assign_all_busses() 1
++#endif
++
++#endif /* _ASM_ARCH_HARDWARE_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/i2c.h linux-2.6.25-rc4/include/asm-arm/arch/i2c.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/i2c.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/i2c.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,77 @@
++/*
++ * i2c_pxa.h
++ *
++ * Copyright (C) 2002 Intrinsyc Software Inc.
++ *
++ * 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 _I2C_PXA_H_
++#define _I2C_PXA_H_
++
++#if 0
++#define DEF_TIMEOUT 3
++#else
++/* need a longer timeout if we're dealing with the fact we may well be
++ * looking at a multi-master environment
++*/
++#define DEF_TIMEOUT 32
++#endif
++
++#define BUS_ERROR (-EREMOTEIO)
++#define XFER_NAKED (-ECONNREFUSED)
++#define I2C_RETRY (-2000) /* an error has occurred retry transmit */
++
++/* ICR initialize bit values
++*
++* 15. FM 0 (100 Khz operation)
++* 14. UR 0 (No unit reset)
++* 13. SADIE 0 (Disables the unit from interrupting on slave addresses
++* matching its slave address)
++* 12. ALDIE 0 (Disables the unit from interrupt when it loses arbitration
++* in master mode)
++* 11. SSDIE 0 (Disables interrupts from a slave stop detected, in slave mode)
++* 10. BEIE 1 (Enable interrupts from detected bus errors, no ACK sent)
++* 9. IRFIE 1 (Enable interrupts from full buffer received)
++* 8. ITEIE 1 (Enables the I2C unit to interrupt when transmit buffer empty)
++* 7. GCD 1 (Disables i2c unit response to general call messages as a slave)
++* 6. IUE 0 (Disable unit until we change settings)
++* 5. SCLE 1 (Enables the i2c clock output for master mode (drives SCL)
++* 4. MA 0 (Only send stop with the ICR stop bit)
++* 3. TB 0 (We are not transmitting a byte initially)
++* 2. ACKNAK 0 (Send an ACK after the unit receives a byte)
++* 1. STOP 0 (Do not send a STOP)
++* 0. START 0 (Do not send a START)
++*
++*/
++#define I2C_ICR_INIT (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE)
++
++/* I2C status register init values
++ *
++ * 10. BED 1 (Clear bus error detected)
++ * 9. SAD 1 (Clear slave address detected)
++ * 7. IRF 1 (Clear IDBR Receive Full)
++ * 6. ITE 1 (Clear IDBR Transmit Empty)
++ * 5. ALD 1 (Clear Arbitration Loss Detected)
++ * 4. SSD 1 (Clear Slave Stop Detected)
++ */
++#define I2C_ISR_INIT 0x7FF /* status register init */
++
++struct i2c_slave_client;
++
++struct i2c_pxa_platform_data {
++ unsigned int slave_addr;
++ struct i2c_slave_client *slave;
++ unsigned int class;
++ int use_pio;
++};
++
++extern void pxa_set_i2c_info(struct i2c_pxa_platform_data *info);
++
++#ifdef CONFIG_PXA27x
++extern void pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info);
++#endif
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/idp.h linux-2.6.25-rc4/include/asm-arm/arch/idp.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/idp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/idp.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,199 @@
++/*
++ * linux/include/asm-arm/arch-pxa/idp.h
++ *
++ * 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.
++ *
++ * Copyright (c) 2001 Cliff Brake, Accelent Systems Inc.
++ *
++ * 2001-09-13: Cliff Brake <cbrake@accelent.com>
++ * Initial code
++ *
++ * 2005-02-15: Cliff Brake <cliff.brake@gmail.com>
++ * <http://www.vibren.com> <http://bec-systems.com>
++ * Changes for 2.6 kernel.
++ */
++
++
++/*
++ * Note: this file must be safe to include in assembly files
++ *
++ * Support for the Vibren PXA255 IDP requires rev04 or later
++ * IDP hardware.
++ */
++
++
++#define IDP_FLASH_PHYS (PXA_CS0_PHYS)
++#define IDP_ALT_FLASH_PHYS (PXA_CS1_PHYS)
++#define IDP_MEDIAQ_PHYS (PXA_CS3_PHYS)
++#define IDP_IDE_PHYS (PXA_CS5_PHYS + 0x03000000)
++#define IDP_ETH_PHYS (PXA_CS5_PHYS + 0x03400000)
++#define IDP_COREVOLT_PHYS (PXA_CS5_PHYS + 0x03800000)
++#define IDP_CPLD_PHYS (PXA_CS5_PHYS + 0x03C00000)
++
++
++/*
++ * virtual memory map
++ */
++
++#define IDP_COREVOLT_VIRT (0xf0000000)
++#define IDP_COREVOLT_SIZE (1*1024*1024)
++
++#define IDP_CPLD_VIRT (IDP_COREVOLT_VIRT + IDP_COREVOLT_SIZE)
++#define IDP_CPLD_SIZE (1*1024*1024)
++
++#if (IDP_CPLD_VIRT + IDP_CPLD_SIZE) > 0xfc000000
++#error Your custom IO space is getting a bit large !!
++#endif
++
++#define CPLD_P2V(x) ((x) - IDP_CPLD_PHYS + IDP_CPLD_VIRT)
++#define CPLD_V2P(x) ((x) - IDP_CPLD_VIRT + IDP_CPLD_PHYS)
++
++#ifndef __ASSEMBLY__
++# define __CPLD_REG(x) (*((volatile unsigned long *)CPLD_P2V(x)))
++#else
++# define __CPLD_REG(x) CPLD_P2V(x)
++#endif
++
++/* board level registers in the CPLD: (offsets from CPLD_VIRT) */
++
++#define _IDP_CPLD_REV (IDP_CPLD_PHYS + 0x00)
++#define _IDP_CPLD_PERIPH_PWR (IDP_CPLD_PHYS + 0x04)
++#define _IDP_CPLD_LED_CONTROL (IDP_CPLD_PHYS + 0x08)
++#define _IDP_CPLD_KB_COL_HIGH (IDP_CPLD_PHYS + 0x0C)
++#define _IDP_CPLD_KB_COL_LOW (IDP_CPLD_PHYS + 0x10)
++#define _IDP_CPLD_PCCARD_EN (IDP_CPLD_PHYS + 0x14)
++#define _IDP_CPLD_GPIOH_DIR (IDP_CPLD_PHYS + 0x18)
++#define _IDP_CPLD_GPIOH_VALUE (IDP_CPLD_PHYS + 0x1C)
++#define _IDP_CPLD_GPIOL_DIR (IDP_CPLD_PHYS + 0x20)
++#define _IDP_CPLD_GPIOL_VALUE (IDP_CPLD_PHYS + 0x24)
++#define _IDP_CPLD_PCCARD_PWR (IDP_CPLD_PHYS + 0x28)
++#define _IDP_CPLD_MISC_CTRL (IDP_CPLD_PHYS + 0x2C)
++#define _IDP_CPLD_LCD (IDP_CPLD_PHYS + 0x30)
++#define _IDP_CPLD_FLASH_WE (IDP_CPLD_PHYS + 0x34)
++
++#define _IDP_CPLD_KB_ROW (IDP_CPLD_PHYS + 0x50)
++#define _IDP_CPLD_PCCARD0_STATUS (IDP_CPLD_PHYS + 0x54)
++#define _IDP_CPLD_PCCARD1_STATUS (IDP_CPLD_PHYS + 0x58)
++#define _IDP_CPLD_MISC_STATUS (IDP_CPLD_PHYS + 0x5C)
++
++/* FPGA register virtual addresses */
++
++#define IDP_CPLD_REV __CPLD_REG(_IDP_CPLD_REV)
++#define IDP_CPLD_PERIPH_PWR __CPLD_REG(_IDP_CPLD_PERIPH_PWR)
++#define IDP_CPLD_LED_CONTROL __CPLD_REG(_IDP_CPLD_LED_CONTROL)
++#define IDP_CPLD_KB_COL_HIGH __CPLD_REG(_IDP_CPLD_KB_COL_HIGH)
++#define IDP_CPLD_KB_COL_LOW __CPLD_REG(_IDP_CPLD_KB_COL_LOW)
++#define IDP_CPLD_PCCARD_EN __CPLD_REG(_IDP_CPLD_PCCARD_EN)
++#define IDP_CPLD_GPIOH_DIR __CPLD_REG(_IDP_CPLD_GPIOH_DIR)
++#define IDP_CPLD_GPIOH_VALUE __CPLD_REG(_IDP_CPLD_GPIOH_VALUE)
++#define IDP_CPLD_GPIOL_DIR __CPLD_REG(_IDP_CPLD_GPIOL_DIR)
++#define IDP_CPLD_GPIOL_VALUE __CPLD_REG(_IDP_CPLD_GPIOL_VALUE)
++#define IDP_CPLD_PCCARD_PWR __CPLD_REG(_IDP_CPLD_PCCARD_PWR)
++#define IDP_CPLD_MISC_CTRL __CPLD_REG(_IDP_CPLD_MISC_CTRL)
++#define IDP_CPLD_LCD __CPLD_REG(_IDP_CPLD_LCD)
++#define IDP_CPLD_FLASH_WE __CPLD_REG(_IDP_CPLD_FLASH_WE)
++
++#define IDP_CPLD_KB_ROW __CPLD_REG(_IDP_CPLD_KB_ROW)
++#define IDP_CPLD_PCCARD0_STATUS __CPLD_REG(_IDP_CPLD_PCCARD0_STATUS)
++#define IDP_CPLD_PCCARD1_STATUS __CPLD_REG(_IDP_CPLD_PCCARD1_STATUS)
++#define IDP_CPLD_MISC_STATUS __CPLD_REG(_IDP_CPLD_MISC_STATUS)
++
++
++/*
++ * Bit masks for various registers
++ */
++
++// IDP_CPLD_PCCARD_PWR
++#define PCC0_PWR0 (1 << 0)
++#define PCC0_PWR1 (1 << 1)
++#define PCC0_PWR2 (1 << 2)
++#define PCC0_PWR3 (1 << 3)
++#define PCC1_PWR0 (1 << 4)
++#define PCC1_PWR1 (1 << 5)
++#define PCC1_PWR2 (1 << 6)
++#define PCC1_PWR3 (1 << 7)
++
++// IDP_CPLD_PCCARD_EN
++#define PCC0_RESET (1 << 6)
++#define PCC1_RESET (1 << 7)
++#define PCC0_ENABLE (1 << 0)
++#define PCC1_ENABLE (1 << 1)
++
++// IDP_CPLD_PCCARDx_STATUS
++#define _PCC_WRPROT (1 << 7) // 7-4 read as low true
++#define _PCC_RESET (1 << 6)
++#define _PCC_IRQ (1 << 5)
++#define _PCC_INPACK (1 << 4)
++#define PCC_BVD2 (1 << 3)
++#define PCC_BVD1 (1 << 2)
++#define PCC_VS2 (1 << 1)
++#define PCC_VS1 (1 << 0)
++
++#define PCC_DETECT(x) (GPLR(7 + (x)) & GPIO_bit(7 + (x)))
++
++/* A listing of interrupts used by external hardware devices */
++
++#define TOUCH_PANEL_IRQ IRQ_GPIO(5)
++#define IDE_IRQ IRQ_GPIO(21)
++
++#define TOUCH_PANEL_IRQ_EDGE IRQT_FALLING
++
++#define ETHERNET_IRQ IRQ_GPIO(4)
++#define ETHERNET_IRQ_EDGE IRQT_RISING
++
++#define IDE_IRQ_EDGE IRQT_RISING
++
++#define PCMCIA_S0_CD_VALID IRQ_GPIO(7)
++#define PCMCIA_S0_CD_VALID_EDGE IRQT_BOTHEDGE
++
++#define PCMCIA_S1_CD_VALID IRQ_GPIO(8)
++#define PCMCIA_S1_CD_VALID_EDGE IRQT_BOTHEDGE
++
++#define PCMCIA_S0_RDYINT IRQ_GPIO(19)
++#define PCMCIA_S1_RDYINT IRQ_GPIO(22)
++
++
++/*
++ * Macros for LED Driver
++ */
++
++/* leds 0 = ON */
++#define IDP_HB_LED (1<<5)
++#define IDP_BUSY_LED (1<<6)
++
++#define IDP_LEDS_MASK (IDP_HB_LED | IDP_BUSY_LED)
++
++/*
++ * macros for MTD driver
++ */
++
++#define FLASH_WRITE_PROTECT_DISABLE() ((IDP_CPLD_FLASH_WE) &= ~(0x1))
++#define FLASH_WRITE_PROTECT_ENABLE() ((IDP_CPLD_FLASH_WE) |= (0x1))
++
++/*
++ * macros for matrix keyboard driver
++ */
++
++#define KEYBD_MATRIX_NUMBER_INPUTS 7
++#define KEYBD_MATRIX_NUMBER_OUTPUTS 14
++
++#define KEYBD_MATRIX_INVERT_OUTPUT_LOGIC FALSE
++#define KEYBD_MATRIX_INVERT_INPUT_LOGIC FALSE
++
++#define KEYBD_MATRIX_SETTLING_TIME_US 100
++#define KEYBD_MATRIX_KEYSTATE_DEBOUNCE_CONSTANT 2
++
++#define KEYBD_MATRIX_SET_OUTPUTS(outputs) \
++{\
++ IDP_CPLD_KB_COL_LOW = outputs;\
++ IDP_CPLD_KB_COL_HIGH = outputs >> 7;\
++}
++
++#define KEYBD_MATRIX_GET_INPUTS(inputs) \
++{\
++ inputs = (IDP_CPLD_KB_ROW & 0x7f);\
++}
++
++
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/io.h linux-2.6.25-rc4/include/asm-arm/arch/io.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/io.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/io.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,20 @@
++/*
++ * linux/include/asm-arm/arch-pxa/io.h
++ *
++ * Copied from asm/arch/sa1100/io.h
++ */
++#ifndef __ASM_ARM_ARCH_IO_H
++#define __ASM_ARM_ARCH_IO_H
++
++#include <asm/hardware.h>
++
++#define IO_SPACE_LIMIT 0xffffffff
++
++/*
++ * We don't actually have real ISA nor PCI buses, but there is so many
++ * drivers out there that might just work if we fake them...
++ */
++#define __io(a) ((void __iomem *)(a))
++#define __mem_pci(a) (a)
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/irda.h linux-2.6.25-rc4/include/asm-arm/arch/irda.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/irda.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/irda.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,17 @@
++#ifndef ASMARM_ARCH_IRDA_H
++#define ASMARM_ARCH_IRDA_H
++
++/* board specific transceiver capabilities */
++
++#define IR_OFF 1
++#define IR_SIRMODE 2
++#define IR_FIRMODE 4
++
++struct pxaficp_platform_data {
++ int transceiver_cap;
++ void (*transceiver_mode)(struct device *dev, int mode);
++};
++
++extern void pxa_set_ficp_info(struct pxaficp_platform_data *info);
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/irqs.h linux-2.6.25-rc4/include/asm-arm/arch/irqs.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/irqs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/irqs.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,257 @@
++/*
++ * linux/include/asm-arm/arch-pxa/irqs.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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.
++ */
++
++
++#define PXA_IRQ(x) (x)
++
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
++#define IRQ_SSP3 PXA_IRQ(0) /* SSP3 service request */
++#define IRQ_MSL PXA_IRQ(1) /* MSL Interface interrupt */
++#define IRQ_USBH2 PXA_IRQ(2) /* USB Host interrupt 1 (OHCI) */
++#define IRQ_USBH1 PXA_IRQ(3) /* USB Host interrupt 2 (non-OHCI) */
++#define IRQ_KEYPAD PXA_IRQ(4) /* Key pad controller */
++#define IRQ_MEMSTK PXA_IRQ(5) /* Memory Stick interrupt */
++#define IRQ_PWRI2C PXA_IRQ(6) /* Power I2C interrupt */
++#endif
++
++#define IRQ_HWUART PXA_IRQ(7) /* HWUART Transmit/Receive/Error (PXA26x) */
++#define IRQ_OST_4_11 PXA_IRQ(7) /* OS timer 4-11 matches (PXA27x) */
++#define IRQ_GPIO0 PXA_IRQ(8) /* GPIO0 Edge Detect */
++#define IRQ_GPIO1 PXA_IRQ(9) /* GPIO1 Edge Detect */
++#define IRQ_GPIO_2_x PXA_IRQ(10) /* GPIO[2-x] Edge Detect */
++#define IRQ_USB PXA_IRQ(11) /* USB Service */
++#define IRQ_PMU PXA_IRQ(12) /* Performance Monitoring Unit */
++#define IRQ_I2S PXA_IRQ(13) /* I2S Interrupt */
++#define IRQ_AC97 PXA_IRQ(14) /* AC97 Interrupt */
++#define IRQ_ASSP PXA_IRQ(15) /* Audio SSP Service Request (PXA25x) */
++#define IRQ_USIM PXA_IRQ(15) /* Smart Card interface interrupt (PXA27x) */
++#define IRQ_NSSP PXA_IRQ(16) /* Network SSP Service Request (PXA25x) */
++#define IRQ_SSP2 PXA_IRQ(16) /* SSP2 interrupt (PXA27x) */
++#define IRQ_LCD PXA_IRQ(17) /* LCD Controller Service Request */
++#define IRQ_I2C PXA_IRQ(18) /* I2C Service Request */
++#define IRQ_ICP PXA_IRQ(19) /* ICP Transmit/Receive/Error */
++#define IRQ_STUART PXA_IRQ(20) /* STUART Transmit/Receive/Error */
++#define IRQ_BTUART PXA_IRQ(21) /* BTUART Transmit/Receive/Error */
++#define IRQ_FFUART PXA_IRQ(22) /* FFUART Transmit/Receive/Error*/
++#define IRQ_MMC PXA_IRQ(23) /* MMC Status/Error Detection */
++#define IRQ_SSP PXA_IRQ(24) /* SSP Service Request */
++#define IRQ_DMA PXA_IRQ(25) /* DMA Channel Service Request */
++#define IRQ_OST0 PXA_IRQ(26) /* OS Timer match 0 */
++#define IRQ_OST1 PXA_IRQ(27) /* OS Timer match 1 */
++#define IRQ_OST2 PXA_IRQ(28) /* OS Timer match 2 */
++#define IRQ_OST3 PXA_IRQ(29) /* OS Timer match 3 */
++#define IRQ_RTC1Hz PXA_IRQ(30) /* RTC HZ Clock Tick */
++#define IRQ_RTCAlrm PXA_IRQ(31) /* RTC Alarm */
++
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
++#define IRQ_TPM PXA_IRQ(32) /* TPM interrupt */
++#define IRQ_CAMERA PXA_IRQ(33) /* Camera Interface */
++#endif
++
++#ifdef CONFIG_PXA3xx
++#define IRQ_SSP4 PXA_IRQ(13) /* SSP4 service request */
++#define IRQ_CIR PXA_IRQ(34) /* Consumer IR */
++#define IRQ_TSI PXA_IRQ(36) /* Touch Screen Interface (PXA320) */
++#define IRQ_USIM2 PXA_IRQ(38) /* USIM2 Controller */
++#define IRQ_GRPHICS PXA_IRQ(39) /* Graphics Controller */
++#define IRQ_MMC2 PXA_IRQ(41) /* MMC2 Controller */
++#define IRQ_1WIRE PXA_IRQ(44) /* 1-Wire Controller */
++#define IRQ_NAND PXA_IRQ(45) /* NAND Controller */
++#define IRQ_USB2 PXA_IRQ(46) /* USB 2.0 Device Controller */
++#define IRQ_WAKEUP0 PXA_IRQ(49) /* EXT_WAKEUP0 */
++#define IRQ_WAKEUP1 PXA_IRQ(50) /* EXT_WAKEUP1 */
++#define IRQ_DMEMC PXA_IRQ(51) /* Dynamic Memory Controller */
++#define IRQ_MMC3 PXA_IRQ(55) /* MMC3 Controller (PXA310) */
++#endif
++
++#define PXA_GPIO_IRQ_BASE (64)
++#define PXA_GPIO_IRQ_NUM (128)
++
++#define GPIO_2_x_TO_IRQ(x) (PXA_GPIO_IRQ_BASE + (x))
++#define IRQ_GPIO(x) (((x) < 2) ? (IRQ_GPIO0 + (x)) : GPIO_2_x_TO_IRQ(x))
++
++#define IRQ_TO_GPIO_2_x(i) ((i) - PXA_GPIO_IRQ_BASE)
++#define IRQ_TO_GPIO(i) (((i) < IRQ_GPIO(2)) ? ((i) - IRQ_GPIO0) : IRQ_TO_GPIO_2_x(i))
++
++/*
++ * The next 16 interrupts are for board specific purposes. Since
++ * the kernel can only run on one machine at a time, we can re-use
++ * these. If you need more, increase IRQ_BOARD_END, but keep it
++ * within sensible limits.
++ */
++#define IRQ_BOARD_START (PXA_GPIO_IRQ_BASE + PXA_GPIO_IRQ_NUM)
++#define IRQ_BOARD_END (IRQ_BOARD_START + 16)
++
++#define IRQ_SA1111_START (IRQ_BOARD_END)
++#define IRQ_GPAIN0 (IRQ_BOARD_END + 0)
++#define IRQ_GPAIN1 (IRQ_BOARD_END + 1)
++#define IRQ_GPAIN2 (IRQ_BOARD_END + 2)
++#define IRQ_GPAIN3 (IRQ_BOARD_END + 3)
++#define IRQ_GPBIN0 (IRQ_BOARD_END + 4)
++#define IRQ_GPBIN1 (IRQ_BOARD_END + 5)
++#define IRQ_GPBIN2 (IRQ_BOARD_END + 6)
++#define IRQ_GPBIN3 (IRQ_BOARD_END + 7)
++#define IRQ_GPBIN4 (IRQ_BOARD_END + 8)
++#define IRQ_GPBIN5 (IRQ_BOARD_END + 9)
++#define IRQ_GPCIN0 (IRQ_BOARD_END + 10)
++#define IRQ_GPCIN1 (IRQ_BOARD_END + 11)
++#define IRQ_GPCIN2 (IRQ_BOARD_END + 12)
++#define IRQ_GPCIN3 (IRQ_BOARD_END + 13)
++#define IRQ_GPCIN4 (IRQ_BOARD_END + 14)
++#define IRQ_GPCIN5 (IRQ_BOARD_END + 15)
++#define IRQ_GPCIN6 (IRQ_BOARD_END + 16)
++#define IRQ_GPCIN7 (IRQ_BOARD_END + 17)
++#define IRQ_MSTXINT (IRQ_BOARD_END + 18)
++#define IRQ_MSRXINT (IRQ_BOARD_END + 19)
++#define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20)
++#define IRQ_TPTXINT (IRQ_BOARD_END + 21)
++#define IRQ_TPRXINT (IRQ_BOARD_END + 22)
++#define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23)
++#define SSPXMTINT (IRQ_BOARD_END + 24)
++#define SSPRCVINT (IRQ_BOARD_END + 25)
++#define SSPROR (IRQ_BOARD_END + 26)
++#define AUDXMTDMADONEA (IRQ_BOARD_END + 32)
++#define AUDRCVDMADONEA (IRQ_BOARD_END + 33)
++#define AUDXMTDMADONEB (IRQ_BOARD_END + 34)
++#define AUDRCVDMADONEB (IRQ_BOARD_END + 35)
++#define AUDTFSR (IRQ_BOARD_END + 36)
++#define AUDRFSR (IRQ_BOARD_END + 37)
++#define AUDTUR (IRQ_BOARD_END + 38)
++#define AUDROR (IRQ_BOARD_END + 39)
++#define AUDDTS (IRQ_BOARD_END + 40)
++#define AUDRDD (IRQ_BOARD_END + 41)
++#define AUDSTO (IRQ_BOARD_END + 42)
++#define IRQ_USBPWR (IRQ_BOARD_END + 43)
++#define IRQ_HCIM (IRQ_BOARD_END + 44)
++#define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45)
++#define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46)
++#define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47)
++#define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48)
++#define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49)
++#define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50)
++#define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51)
++#define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52)
++#define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53)
++#define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54)
++
++#define IRQ_LOCOMO_START (IRQ_BOARD_END)
++#define IRQ_LOCOMO_KEY (IRQ_BOARD_END + 0)
++#define IRQ_LOCOMO_GPIO0 (IRQ_BOARD_END + 1)
++#define IRQ_LOCOMO_GPIO1 (IRQ_BOARD_END + 2)
++#define IRQ_LOCOMO_GPIO2 (IRQ_BOARD_END + 3)
++#define IRQ_LOCOMO_GPIO3 (IRQ_BOARD_END + 4)
++#define IRQ_LOCOMO_GPIO4 (IRQ_BOARD_END + 5)
++#define IRQ_LOCOMO_GPIO5 (IRQ_BOARD_END + 6)
++#define IRQ_LOCOMO_GPIO6 (IRQ_BOARD_END + 7)
++#define IRQ_LOCOMO_GPIO7 (IRQ_BOARD_END + 8)
++#define IRQ_LOCOMO_GPIO8 (IRQ_BOARD_END + 9)
++#define IRQ_LOCOMO_GPIO9 (IRQ_BOARD_END + 10)
++#define IRQ_LOCOMO_GPIO10 (IRQ_BOARD_END + 11)
++#define IRQ_LOCOMO_GPIO11 (IRQ_BOARD_END + 12)
++#define IRQ_LOCOMO_GPIO12 (IRQ_BOARD_END + 13)
++#define IRQ_LOCOMO_GPIO13 (IRQ_BOARD_END + 14)
++#define IRQ_LOCOMO_GPIO14 (IRQ_BOARD_END + 15)
++#define IRQ_LOCOMO_GPIO15 (IRQ_BOARD_END + 16)
++#define IRQ_LOCOMO_LT (IRQ_BOARD_END + 17)
++#define IRQ_LOCOMO_SPI_RFR (IRQ_BOARD_END + 18)
++#define IRQ_LOCOMO_SPI_RFW (IRQ_BOARD_END + 19)
++#define IRQ_LOCOMO_SPI_OVRN (IRQ_BOARD_END + 20)
++#define IRQ_LOCOMO_SPI_TEND (IRQ_BOARD_END + 21)
++
++/*
++ * Figure out the MAX IRQ number.
++ *
++ * If we have an SA1111, the max IRQ is S1_BVD1_STSCHG+1.
++ * If we have an LoCoMo, the max IRQ is IRQ_LOCOMO_SPI_TEND+1
++ * Otherwise, we have the standard IRQs only.
++ */
++#ifdef CONFIG_SA1111
++#define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1)
++#elif defined(CONFIG_SHARP_LOCOMO)
++#define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
++#elif defined(CONFIG_ARCH_LUBBOCK) || \
++ defined(CONFIG_MACH_LOGICPD_PXA270) || \
++ defined(CONFIG_MACH_MAINSTONE) || \
++ defined(CONFIG_MACH_PCM027)
++#define NR_IRQS (IRQ_BOARD_END)
++#else
++#define NR_IRQS (IRQ_BOARD_START)
++#endif
++
++/*
++ * Board specific IRQs. Define them here.
++ * Do not surround them with ifdefs.
++ */
++#define LUBBOCK_IRQ(x) (IRQ_BOARD_START + (x))
++#define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0)
++#define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1)
++#define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */
++#define LUBBOCK_ETH_IRQ LUBBOCK_IRQ(3)
++#define LUBBOCK_UCB1400_IRQ LUBBOCK_IRQ(4)
++#define LUBBOCK_BB_IRQ LUBBOCK_IRQ(5)
++#define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */
++#define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6)
++
++#define LPD270_IRQ(x) (IRQ_BOARD_START + (x))
++#define LPD270_USBC_IRQ LPD270_IRQ(2)
++#define LPD270_ETHERNET_IRQ LPD270_IRQ(3)
++#define LPD270_AC97_IRQ LPD270_IRQ(4)
++
++#define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x))
++#define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0)
++#define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1)
++#define MAINSTONE_USBC_IRQ MAINSTONE_IRQ(2)
++#define MAINSTONE_ETHERNET_IRQ MAINSTONE_IRQ(3)
++#define MAINSTONE_AC97_IRQ MAINSTONE_IRQ(4)
++#define MAINSTONE_PEN_IRQ MAINSTONE_IRQ(5)
++#define MAINSTONE_MSINS_IRQ MAINSTONE_IRQ(6)
++#define MAINSTONE_EXBRD_IRQ MAINSTONE_IRQ(7)
++#define MAINSTONE_S0_CD_IRQ MAINSTONE_IRQ(9)
++#define MAINSTONE_S0_STSCHG_IRQ MAINSTONE_IRQ(10)
++#define MAINSTONE_S0_IRQ MAINSTONE_IRQ(11)
++#define MAINSTONE_S1_CD_IRQ MAINSTONE_IRQ(13)
++#define MAINSTONE_S1_STSCHG_IRQ MAINSTONE_IRQ(14)
++#define MAINSTONE_S1_IRQ MAINSTONE_IRQ(15)
++
++/* LoCoMo Interrupts (CONFIG_SHARP_LOCOMO) */
++#define IRQ_LOCOMO_KEY_BASE (IRQ_BOARD_START + 0)
++#define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
++#define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
++#define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)
++
++/* phyCORE-PXA270 (PCM027) Interrupts */
++#define PCM027_IRQ(x) (IRQ_BOARD_START + (x))
++#define PCM027_BTDET_IRQ PCM027_IRQ(0)
++#define PCM027_FF_RI_IRQ PCM027_IRQ(1)
++#define PCM027_MMCDET_IRQ PCM027_IRQ(2)
++#define PCM027_PM_5V_IRQ PCM027_IRQ(3)
++
++/* ITE8152 irqs */
++/* add IT8152 IRQs beyond BOARD_END */
++#ifdef CONFIG_PCI_HOST_ITE8152
++#define IT8152_IRQ(x) (IRQ_GPIO(IRQ_BOARD_END) + 1 + (x))
++
++/* IRQ-sources in 3 groups - local devices, LPC (serial), and external PCI */
++#define IT8152_LD_IRQ_COUNT 9
++#define IT8152_LP_IRQ_COUNT 16
++#define IT8152_PD_IRQ_COUNT 15
++
++/* Priorities: */
++#define IT8152_PD_IRQ(i) IT8152_IRQ(i)
++#define IT8152_LP_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT)
++#define IT8152_LD_IRQ(i) (IT8152_IRQ(i) + IT8152_PD_IRQ_COUNT + IT8152_LP_IRQ_COUNT)
++
++#define IT8152_LAST_IRQ IT8152_LD_IRQ(IT8152_LD_IRQ_COUNT - 1)
++
++#undef NR_IRQS
++#define NR_IRQS (IT8152_LAST_IRQ+1)
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/littleton.h linux-2.6.25-rc4/include/asm-arm/arch/littleton.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/littleton.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/littleton.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,6 @@
++#ifndef __ASM_ARCH_ZYLONITE_H
++#define __ASM_ARCH_ZYLONITE_H
++
++#define LITTLETON_ETH_PHYS 0x30000000
++
++#endif /* __ASM_ARCH_ZYLONITE_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/lpd270.h linux-2.6.25-rc4/include/asm-arm/arch/lpd270.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/lpd270.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/lpd270.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,38 @@
++/*
++ * include/asm-arm/arch-pxa/lpd270.h
++ *
++ * Author: Lennert Buytenhek
++ * Created: Feb 10, 2006
++ *
++ * 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_ARCH_LPD270_H
++#define __ASM_ARCH_LPD270_H
++
++#define LPD270_CPLD_PHYS PXA_CS2_PHYS
++#define LPD270_CPLD_VIRT 0xf0000000
++#define LPD270_CPLD_SIZE 0x00100000
++
++#define LPD270_ETH_PHYS (PXA_CS2_PHYS + 0x01000000)
++
++/* CPLD registers */
++#define LPD270_CPLD_REG(x) ((unsigned long)(LPD270_CPLD_VIRT + (x)))
++#define LPD270_CONTROL LPD270_CPLD_REG(0x00)
++#define LPD270_PERIPHERAL0 LPD270_CPLD_REG(0x04)
++#define LPD270_PERIPHERAL1 LPD270_CPLD_REG(0x08)
++#define LPD270_CPLD_REVISION LPD270_CPLD_REG(0x14)
++#define LPD270_EEPROM_SPI_ITF LPD270_CPLD_REG(0x20)
++#define LPD270_MODE_PINS LPD270_CPLD_REG(0x24)
++#define LPD270_EGPIO LPD270_CPLD_REG(0x30)
++#define LPD270_INT_MASK LPD270_CPLD_REG(0x40)
++#define LPD270_INT_STATUS LPD270_CPLD_REG(0x50)
++
++#define LPD270_INT_AC97 (1 << 4) /* AC'97 CODEC IRQ */
++#define LPD270_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */
++#define LPD270_INT_USBC (1 << 2) /* USB client cable detection IRQ */
++
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/lubbock.h linux-2.6.25-rc4/include/asm-arm/arch/lubbock.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/lubbock.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/lubbock.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,40 @@
++/*
++ * linux/include/asm-arm/arch-pxa/lubbock.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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.
++ */
++
++#define LUBBOCK_ETH_PHYS PXA_CS3_PHYS
++
++#define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS
++#define LUBBOCK_FPGA_VIRT (0xf0000000)
++#define LUB_P2V(x) ((x) - LUBBOCK_FPGA_PHYS + LUBBOCK_FPGA_VIRT)
++#define LUB_V2P(x) ((x) - LUBBOCK_FPGA_VIRT + LUBBOCK_FPGA_PHYS)
++
++#ifndef __ASSEMBLY__
++# define __LUB_REG(x) (*((volatile unsigned long *)LUB_P2V(x)))
++#else
++# define __LUB_REG(x) LUB_P2V(x)
++#endif
++
++/* FPGA register virtual addresses */
++#define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
++#define LUB_HEXLED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x010)
++#define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
++#define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
++#define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
++#define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
++#define LUB_MISC_RD __LUB_REG(LUBBOCK_FPGA_PHYS + 0x090)
++#define LUB_IRQ_MASK_EN __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0c0)
++#define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0)
++#define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
++
++#ifndef __ASSEMBLY__
++extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/magician.h linux-2.6.25-rc4/include/asm-arm/arch/magician.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/magician.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/magician.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,111 @@
++/*
++ * GPIO and IRQ definitions for HTC Magician PDA phones
++ *
++ * Copyright (c) 2007 Philipp Zabel
++ *
++ * 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 _MAGICIAN_H_
++#define _MAGICIAN_H_
++
++#include <asm/arch/pxa-regs.h>
++
++/*
++ * PXA GPIOs
++ */
++
++#define GPIO0_MAGICIAN_KEY_POWER 0
++#define GPIO9_MAGICIAN_UNKNOWN 9
++#define GPIO10_MAGICIAN_GSM_IRQ 10
++#define GPIO11_MAGICIAN_GSM_OUT1 11
++#define GPIO13_MAGICIAN_CPLD_IRQ 13
++#define GPIO18_MAGICIAN_UNKNOWN 18
++#define GPIO22_MAGICIAN_VIBRA_EN 22
++#define GPIO26_MAGICIAN_GSM_POWER 26
++#define GPIO27_MAGICIAN_USBC_PUEN 27
++#define GPIO30_MAGICIAN_nCHARGE_EN 30
++#define GPIO37_MAGICIAN_KEY_HANGUP 37
++#define GPIO38_MAGICIAN_KEY_CONTACTS 38
++#define GPIO40_MAGICIAN_GSM_OUT2 40
++#define GPIO48_MAGICIAN_UNKNOWN 48
++#define GPIO56_MAGICIAN_UNKNOWN 56
++#define GPIO57_MAGICIAN_CAM_RESET 57
++#define GPIO83_MAGICIAN_nIR_EN 83
++#define GPIO86_MAGICIAN_GSM_RESET 86
++#define GPIO87_MAGICIAN_GSM_SELECT 87
++#define GPIO90_MAGICIAN_KEY_CALENDAR 90
++#define GPIO91_MAGICIAN_KEY_CAMERA 91
++#define GPIO93_MAGICIAN_KEY_UP 93
++#define GPIO94_MAGICIAN_KEY_DOWN 94
++#define GPIO95_MAGICIAN_KEY_LEFT 95
++#define GPIO96_MAGICIAN_KEY_RIGHT 96
++#define GPIO97_MAGICIAN_KEY_ENTER 97
++#define GPIO98_MAGICIAN_KEY_RECORD 98
++#define GPIO99_MAGICIAN_HEADPHONE_IN 99
++#define GPIO100_MAGICIAN_KEY_VOL_UP 100
++#define GPIO101_MAGICIAN_KEY_VOL_DOWN 101
++#define GPIO102_MAGICIAN_KEY_PHONE 102
++#define GPIO103_MAGICIAN_LED_KP 103
++#define GPIO104_MAGICIAN_LCD_POWER_1 104
++#define GPIO105_MAGICIAN_LCD_POWER_2 105
++#define GPIO106_MAGICIAN_LCD_POWER_3 106
++#define GPIO107_MAGICIAN_DS1WM_IRQ 107
++#define GPIO108_MAGICIAN_GSM_READY 108
++#define GPIO114_MAGICIAN_UNKNOWN 114
++#define GPIO115_MAGICIAN_nPEN_IRQ 115
++#define GPIO116_MAGICIAN_nCAM_EN 116
++#define GPIO119_MAGICIAN_UNKNOWN 119
++#define GPIO120_MAGICIAN_UNKNOWN 120
++
++/*
++ * PXA GPIO alternate function mode & direction
++ */
++
++#define GPIO0_MAGICIAN_KEY_POWER_MD (0 | GPIO_IN)
++#define GPIO9_MAGICIAN_UNKNOWN_MD (9 | GPIO_IN)
++#define GPIO10_MAGICIAN_GSM_IRQ_MD (10 | GPIO_IN)
++#define GPIO11_MAGICIAN_GSM_OUT1_MD (11 | GPIO_OUT)
++#define GPIO13_MAGICIAN_CPLD_IRQ_MD (13 | GPIO_IN)
++#define GPIO18_MAGICIAN_UNKNOWN_MD (18 | GPIO_OUT)
++#define GPIO22_MAGICIAN_VIBRA_EN_MD (22 | GPIO_OUT)
++#define GPIO26_MAGICIAN_GSM_POWER_MD (26 | GPIO_OUT)
++#define GPIO27_MAGICIAN_USBC_PUEN_MD (27 | GPIO_OUT)
++#define GPIO30_MAGICIAN_nCHARGE_EN_MD (30 | GPIO_OUT)
++#define GPIO37_MAGICIAN_KEY_HANGUP_MD (37 | GPIO_OUT)
++#define GPIO38_MAGICIAN_KEY_CONTACTS_MD (38 | GPIO_OUT)
++#define GPIO40_MAGICIAN_GSM_OUT2_MD (40 | GPIO_OUT)
++#define GPIO48_MAGICIAN_UNKNOWN_MD (48 | GPIO_OUT)
++#define GPIO56_MAGICIAN_UNKNOWN_MD (56 | GPIO_OUT)
++#define GPIO57_MAGICIAN_CAM_RESET_MD (57 | GPIO_OUT)
++#define GPIO83_MAGICIAN_nIR_EN_MD (83 | GPIO_OUT)
++#define GPIO86_MAGICIAN_GSM_RESET_MD (86 | GPIO_OUT)
++#define GPIO87_MAGICIAN_GSM_SELECT_MD (87 | GPIO_OUT)
++#define GPIO90_MAGICIAN_KEY_CALENDAR_MD (90 | GPIO_OUT)
++#define GPIO91_MAGICIAN_KEY_CAMERA_MD (91 | GPIO_OUT)
++#define GPIO93_MAGICIAN_KEY_UP_MD (93 | GPIO_IN)
++#define GPIO94_MAGICIAN_KEY_DOWN_MD (94 | GPIO_IN)
++#define GPIO95_MAGICIAN_KEY_LEFT_MD (95 | GPIO_IN)
++#define GPIO96_MAGICIAN_KEY_RIGHT_MD (96 | GPIO_IN)
++#define GPIO97_MAGICIAN_KEY_ENTER_MD (97 | GPIO_IN)
++#define GPIO98_MAGICIAN_KEY_RECORD_MD (98 | GPIO_IN)
++#define GPIO99_MAGICIAN_HEADPHONE_IN_MD (99 | GPIO_IN)
++#define GPIO100_MAGICIAN_KEY_VOL_UP_MD (100 | GPIO_IN)
++#define GPIO101_MAGICIAN_KEY_VOL_DOWN_MD (101 | GPIO_IN)
++#define GPIO102_MAGICIAN_KEY_PHONE_MD (102 | GPIO_IN)
++#define GPIO103_MAGICIAN_LED_KP_MD (103 | GPIO_OUT)
++#define GPIO104_MAGICIAN_LCD_POWER_1_MD (104 | GPIO_OUT)
++#define GPIO105_MAGICIAN_LCD_POWER_2_MD (105 | GPIO_OUT)
++#define GPIO106_MAGICIAN_LCD_POWER_3_MD (106 | GPIO_OUT)
++#define GPIO107_MAGICIAN_DS1WM_IRQ_MD (107 | GPIO_IN)
++#define GPIO108_MAGICIAN_GSM_READY_MD (108 | GPIO_IN)
++#define GPIO114_MAGICIAN_UNKNOWN_MD (114 | GPIO_OUT)
++#define GPIO115_MAGICIAN_nPEN_IRQ_MD (115 | GPIO_IN)
++#define GPIO116_MAGICIAN_nCAM_EN_MD (116 | GPIO_OUT)
++#define GPIO119_MAGICIAN_UNKNOWN_MD (119 | GPIO_OUT)
++#define GPIO120_MAGICIAN_UNKNOWN_MD (120 | GPIO_OUT)
++
++#endif /* _MAGICIAN_H_ */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/mainstone.h linux-2.6.25-rc4/include/asm-arm/arch/mainstone.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/mainstone.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/mainstone.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,120 @@
++/*
++ * linux/include/asm-arm/arch-pxa/mainstone.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Nov 14, 2002
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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_ARCH_MAINSTONE_H
++#define ASM_ARCH_MAINSTONE_H
++
++#define MST_ETH_PHYS PXA_CS4_PHYS
++
++#define MST_FPGA_PHYS PXA_CS2_PHYS
++#define MST_FPGA_VIRT (0xf0000000)
++#define MST_P2V(x) ((x) - MST_FPGA_PHYS + MST_FPGA_VIRT)
++#define MST_V2P(x) ((x) - MST_FPGA_VIRT + MST_FPGA_PHYS)
++
++#ifndef __ASSEMBLY__
++# define __MST_REG(x) (*((volatile unsigned long *)MST_P2V(x)))
++#else
++# define __MST_REG(x) MST_P2V(x)
++#endif
++
++/* board level registers in the FPGA */
++
++#define MST_LEDDAT1 __MST_REG(0x08000010)
++#define MST_LEDDAT2 __MST_REG(0x08000014)
++#define MST_LEDCTRL __MST_REG(0x08000040)
++#define MST_GPSWR __MST_REG(0x08000060)
++#define MST_MSCWR1 __MST_REG(0x08000080)
++#define MST_MSCWR2 __MST_REG(0x08000084)
++#define MST_MSCWR3 __MST_REG(0x08000088)
++#define MST_MSCRD __MST_REG(0x08000090)
++#define MST_INTMSKENA __MST_REG(0x080000c0)
++#define MST_INTSETCLR __MST_REG(0x080000d0)
++#define MST_PCMCIA0 __MST_REG(0x080000e0)
++#define MST_PCMCIA1 __MST_REG(0x080000e4)
++
++#define MST_MSCWR1_CAMERA_ON (1 << 15) /* Camera interface power control */
++#define MST_MSCWR1_CAMERA_SEL (1 << 14) /* Camera interface mux control */
++#define MST_MSCWR1_LCD_CTL (1 << 13) /* General-purpose LCD control */
++#define MST_MSCWR1_MS_ON (1 << 12) /* Memory Stick power control */
++#define MST_MSCWR1_MMC_ON (1 << 11) /* MultiMediaCard* power control */
++#define MST_MSCWR1_MS_SEL (1 << 10) /* SD/MS multiplexer control */
++#define MST_MSCWR1_BB_SEL (1 << 9) /* PCMCIA/Baseband multiplexer */
++#define MST_MSCWR1_BT_ON (1 << 8) /* Bluetooth UART transceiver */
++#define MST_MSCWR1_BTDTR (1 << 7) /* Bluetooth UART DTR */
++
++#define MST_MSCWR1_IRDA_MASK (3 << 5) /* IrDA transceiver mode */
++#define MST_MSCWR1_IRDA_FULL (0 << 5) /* full distance power */
++#define MST_MSCWR1_IRDA_OFF (1 << 5) /* shutdown */
++#define MST_MSCWR1_IRDA_MED (2 << 5) /* 2/3 distance power */
++#define MST_MSCWR1_IRDA_LOW (3 << 5) /* 1/3 distance power */
++
++#define MST_MSCWR1_IRDA_FIR (1 << 4) /* IrDA transceiver SIR/FIR */
++#define MST_MSCWR1_GREENLED (1 << 3) /* LED D1 control */
++#define MST_MSCWR1_PDC_CTL (1 << 2) /* reserved */
++#define MST_MSCWR1_MTR_ON (1 << 1) /* Silent alert motor */
++#define MST_MSCWR1_SYSRESET (1 << 0) /* System reset */
++
++#define MST_MSCWR2_USB_OTG_RST (1 << 6) /* USB On The Go reset */
++#define MST_MSCWR2_USB_OTG_SEL (1 << 5) /* USB On The Go control */
++#define MST_MSCWR2_nUSBC_SC (1 << 4) /* USB client soft connect control */
++#define MST_MSCWR2_I2S_SPKROFF (1 << 3) /* I2S CODEC amplifier control */
++#define MST_MSCWR2_AC97_SPKROFF (1 << 2) /* AC97 CODEC amplifier control */
++#define MST_MSCWR2_RADIO_PWR (1 << 1) /* Radio module power control */
++#define MST_MSCWR2_RADIO_WAKE (1 << 0) /* Radio module wake-up signal */
++
++#define MST_MSCWR3_GPIO_RESET_EN (1 << 2) /* Enable GPIO Reset */
++#define MST_MSCWR3_GPIO_RESET (1 << 1) /* Initiate a GPIO Reset */
++#define MST_MSCWR3_COMMS_SW_RESET (1 << 0) /* Communications Processor Reset Control */
++
++#define MST_MSCRD_nPENIRQ (1 << 9) /* ADI7873* nPENIRQ signal */
++#define MST_MSCRD_nMEMSTK_CD (1 << 8) /* Memory Stick detection signal */
++#define MST_MSCRD_nMMC_CD (1 << 7) /* SD/MMC card detection signal */
++#define MST_MSCRD_nUSIM_CD (1 << 6) /* USIM card detection signal */
++#define MST_MSCRD_USB_CBL (1 << 5) /* USB client cable status */
++#define MST_MSCRD_TS_BUSY (1 << 4) /* ADI7873 busy */
++#define MST_MSCRD_BTDSR (1 << 3) /* Bluetooth UART DSR */
++#define MST_MSCRD_BTRI (1 << 2) /* Bluetooth UART Ring Indicator */
++#define MST_MSCRD_BTDCD (1 << 1) /* Bluetooth UART DCD */
++#define MST_MSCRD_nMMC_WP (1 << 0) /* SD/MMC write-protect status */
++
++#define MST_INT_S1_IRQ (1 << 15) /* PCMCIA socket 1 IRQ */
++#define MST_INT_S1_STSCHG (1 << 14) /* PCMCIA socket 1 status changed */
++#define MST_INT_S1_CD (1 << 13) /* PCMCIA socket 1 card detection */
++#define MST_INT_S0_IRQ (1 << 11) /* PCMCIA socket 0 IRQ */
++#define MST_INT_S0_STSCHG (1 << 10) /* PCMCIA socket 0 status changed */
++#define MST_INT_S0_CD (1 << 9) /* PCMCIA socket 0 card detection */
++#define MST_INT_nEXBRD_INT (1 << 7) /* Expansion board IRQ */
++#define MST_INT_MSINS (1 << 6) /* Memory Stick* detection */
++#define MST_INT_PENIRQ (1 << 5) /* ADI7873* touch-screen IRQ */
++#define MST_INT_AC97 (1 << 4) /* AC'97 CODEC IRQ */
++#define MST_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */
++#define MST_INT_USBC (1 << 2) /* USB client cable detection IRQ */
++#define MST_INT_USIM (1 << 1) /* USIM card detection IRQ */
++#define MST_INT_MMC (1 << 0) /* MMC/SD card detection IRQ */
++
++#define MST_PCMCIA_nIRQ (1 << 10) /* IRQ / ready signal */
++#define MST_PCMCIA_nSPKR_BVD2 (1 << 9) /* VDD sense / digital speaker */
++#define MST_PCMCIA_nSTSCHG_BVD1 (1 << 8) /* VDD sense / card status changed */
++#define MST_PCMCIA_nVS2 (1 << 7) /* VSS voltage sense */
++#define MST_PCMCIA_nVS1 (1 << 6) /* VSS voltage sense */
++#define MST_PCMCIA_nCD (1 << 5) /* Card detection signal */
++#define MST_PCMCIA_RESET (1 << 4) /* Card reset signal */
++#define MST_PCMCIA_PWR_MASK (0x000f) /* MAX1602 power-supply controls */
++
++#define MST_PCMCIA_PWR_VPP_0 0x0 /* voltage VPP = 0V */
++#define MST_PCMCIA_PWR_VPP_120 0x2 /* voltage VPP = 12V*/
++#define MST_PCMCIA_PWR_VPP_VCC 0x1 /* voltage VPP = VCC */
++#define MST_PCMCIA_PWR_VCC_0 0x0 /* voltage VCC = 0V */
++#define MST_PCMCIA_PWR_VCC_33 0x8 /* voltage VCC = 3.3V */
++#define MST_PCMCIA_PWR_VCC_50 0x4 /* voltage VCC = 5.0V */
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/memory.h linux-2.6.25-rc4/include/asm-arm/arch/memory.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/memory.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/memory.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,52 @@
++/*
++ * linux/include/asm-arm/arch-pxa/memory.h
++ *
++ * Author: Nicolas Pitre
++ * Copyright: (C) 2001 MontaVista Software Inc.
++ *
++ * 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_ARCH_MEMORY_H
++#define __ASM_ARCH_MEMORY_H
++
++/*
++ * Physical DRAM offset.
++ */
++#define PHYS_OFFSET UL(0xa0000000)
++
++/*
++ * Virtual view <-> DMA view memory address translations
++ * virt_to_bus: Used to translate the virtual address to an
++ * address suitable to be passed to set_dma_addr
++ * bus_to_virt: Used to convert an address for DMA operations
++ * to an address that the kernel can use.
++ */
++#define __virt_to_bus(x) __virt_to_phys(x)
++#define __bus_to_virt(x) __phys_to_virt(x)
++
++/*
++ * The nodes are matched with the physical SDRAM banks as follows:
++ *
++ * node 0: 0xa0000000-0xa3ffffff --> 0xc0000000-0xc3ffffff
++ * node 1: 0xa4000000-0xa7ffffff --> 0xc4000000-0xc7ffffff
++ * node 2: 0xa8000000-0xabffffff --> 0xc8000000-0xcbffffff
++ * node 3: 0xac000000-0xafffffff --> 0xcc000000-0xcfffffff
++ *
++ * This needs a node mem size of 26 bits.
++ */
++#define NODE_MEM_SIZE_BITS 26
++
++#if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
++void cmx270_pci_adjust_zones(int node, unsigned long *size,
++ unsigned long *holes);
++
++#define arch_adjust_zones(node, size, holes) \
++ cmx270_pci_adjust_zones(node, size, holes)
++
++#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1)
++#endif
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/mfp.h linux-2.6.25-rc4/include/asm-arm/arch/mfp.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/mfp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/mfp.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,311 @@
++/*
++ * linux/include/asm-arm/arch-pxa/mfp.h
++ *
++ * Multi-Function Pin Definitions
++ *
++ * Copyright (C) 2007 Marvell International Ltd.
++ *
++ * 2007-8-21: eric miao <eric.miao@marvell.com>
++ * initial version
++ *
++ * 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_ARCH_MFP_H
++#define __ASM_ARCH_MFP_H
++
++#define mfp_to_gpio(m) ((m) % 128)
++
++/* list of all the configurable MFP pins */
++enum {
++ MFP_PIN_INVALID = -1,
++
++ MFP_PIN_GPIO0 = 0,
++ MFP_PIN_GPIO1,
++ MFP_PIN_GPIO2,
++ MFP_PIN_GPIO3,
++ MFP_PIN_GPIO4,
++ MFP_PIN_GPIO5,
++ MFP_PIN_GPIO6,
++ MFP_PIN_GPIO7,
++ MFP_PIN_GPIO8,
++ MFP_PIN_GPIO9,
++ MFP_PIN_GPIO10,
++ MFP_PIN_GPIO11,
++ MFP_PIN_GPIO12,
++ MFP_PIN_GPIO13,
++ MFP_PIN_GPIO14,
++ MFP_PIN_GPIO15,
++ MFP_PIN_GPIO16,
++ MFP_PIN_GPIO17,
++ MFP_PIN_GPIO18,
++ MFP_PIN_GPIO19,
++ MFP_PIN_GPIO20,
++ MFP_PIN_GPIO21,
++ MFP_PIN_GPIO22,
++ MFP_PIN_GPIO23,
++ MFP_PIN_GPIO24,
++ MFP_PIN_GPIO25,
++ MFP_PIN_GPIO26,
++ MFP_PIN_GPIO27,
++ MFP_PIN_GPIO28,
++ MFP_PIN_GPIO29,
++ MFP_PIN_GPIO30,
++ MFP_PIN_GPIO31,
++ MFP_PIN_GPIO32,
++ MFP_PIN_GPIO33,
++ MFP_PIN_GPIO34,
++ MFP_PIN_GPIO35,
++ MFP_PIN_GPIO36,
++ MFP_PIN_GPIO37,
++ MFP_PIN_GPIO38,
++ MFP_PIN_GPIO39,
++ MFP_PIN_GPIO40,
++ MFP_PIN_GPIO41,
++ MFP_PIN_GPIO42,
++ MFP_PIN_GPIO43,
++ MFP_PIN_GPIO44,
++ MFP_PIN_GPIO45,
++ MFP_PIN_GPIO46,
++ MFP_PIN_GPIO47,
++ MFP_PIN_GPIO48,
++ MFP_PIN_GPIO49,
++ MFP_PIN_GPIO50,
++ MFP_PIN_GPIO51,
++ MFP_PIN_GPIO52,
++ MFP_PIN_GPIO53,
++ MFP_PIN_GPIO54,
++ MFP_PIN_GPIO55,
++ MFP_PIN_GPIO56,
++ MFP_PIN_GPIO57,
++ MFP_PIN_GPIO58,
++ MFP_PIN_GPIO59,
++ MFP_PIN_GPIO60,
++ MFP_PIN_GPIO61,
++ MFP_PIN_GPIO62,
++ MFP_PIN_GPIO63,
++ MFP_PIN_GPIO64,
++ MFP_PIN_GPIO65,
++ MFP_PIN_GPIO66,
++ MFP_PIN_GPIO67,
++ MFP_PIN_GPIO68,
++ MFP_PIN_GPIO69,
++ MFP_PIN_GPIO70,
++ MFP_PIN_GPIO71,
++ MFP_PIN_GPIO72,
++ MFP_PIN_GPIO73,
++ MFP_PIN_GPIO74,
++ MFP_PIN_GPIO75,
++ MFP_PIN_GPIO76,
++ MFP_PIN_GPIO77,
++ MFP_PIN_GPIO78,
++ MFP_PIN_GPIO79,
++ MFP_PIN_GPIO80,
++ MFP_PIN_GPIO81,
++ MFP_PIN_GPIO82,
++ MFP_PIN_GPIO83,
++ MFP_PIN_GPIO84,
++ MFP_PIN_GPIO85,
++ MFP_PIN_GPIO86,
++ MFP_PIN_GPIO87,
++ MFP_PIN_GPIO88,
++ MFP_PIN_GPIO89,
++ MFP_PIN_GPIO90,
++ MFP_PIN_GPIO91,
++ MFP_PIN_GPIO92,
++ MFP_PIN_GPIO93,
++ MFP_PIN_GPIO94,
++ MFP_PIN_GPIO95,
++ MFP_PIN_GPIO96,
++ MFP_PIN_GPIO97,
++ MFP_PIN_GPIO98,
++ MFP_PIN_GPIO99,
++ MFP_PIN_GPIO100,
++ MFP_PIN_GPIO101,
++ MFP_PIN_GPIO102,
++ MFP_PIN_GPIO103,
++ MFP_PIN_GPIO104,
++ MFP_PIN_GPIO105,
++ MFP_PIN_GPIO106,
++ MFP_PIN_GPIO107,
++ MFP_PIN_GPIO108,
++ MFP_PIN_GPIO109,
++ MFP_PIN_GPIO110,
++ MFP_PIN_GPIO111,
++ MFP_PIN_GPIO112,
++ MFP_PIN_GPIO113,
++ MFP_PIN_GPIO114,
++ MFP_PIN_GPIO115,
++ MFP_PIN_GPIO116,
++ MFP_PIN_GPIO117,
++ MFP_PIN_GPIO118,
++ MFP_PIN_GPIO119,
++ MFP_PIN_GPIO120,
++ MFP_PIN_GPIO121,
++ MFP_PIN_GPIO122,
++ MFP_PIN_GPIO123,
++ MFP_PIN_GPIO124,
++ MFP_PIN_GPIO125,
++ MFP_PIN_GPIO126,
++ MFP_PIN_GPIO127,
++ MFP_PIN_GPIO0_2,
++ MFP_PIN_GPIO1_2,
++ MFP_PIN_GPIO2_2,
++ MFP_PIN_GPIO3_2,
++ MFP_PIN_GPIO4_2,
++ MFP_PIN_GPIO5_2,
++ MFP_PIN_GPIO6_2,
++ MFP_PIN_GPIO7_2,
++ MFP_PIN_GPIO8_2,
++ MFP_PIN_GPIO9_2,
++ MFP_PIN_GPIO10_2,
++ MFP_PIN_GPIO11_2,
++ MFP_PIN_GPIO12_2,
++ MFP_PIN_GPIO13_2,
++ MFP_PIN_GPIO14_2,
++ MFP_PIN_GPIO15_2,
++ MFP_PIN_GPIO16_2,
++ MFP_PIN_GPIO17_2,
++
++ MFP_PIN_ULPI_STP,
++ MFP_PIN_ULPI_NXT,
++ MFP_PIN_ULPI_DIR,
++
++ MFP_PIN_nXCVREN,
++ MFP_PIN_DF_CLE_nOE,
++ MFP_PIN_DF_nADV1_ALE,
++ MFP_PIN_DF_SCLK_E,
++ MFP_PIN_DF_SCLK_S,
++ MFP_PIN_nBE0,
++ MFP_PIN_nBE1,
++ MFP_PIN_DF_nADV2_ALE,
++ MFP_PIN_DF_INT_RnB,
++ MFP_PIN_DF_nCS0,
++ MFP_PIN_DF_nCS1,
++ MFP_PIN_nLUA,
++ MFP_PIN_nLLA,
++ MFP_PIN_DF_nWE,
++ MFP_PIN_DF_ALE_nWE,
++ MFP_PIN_DF_nRE_nOE,
++ MFP_PIN_DF_ADDR0,
++ MFP_PIN_DF_ADDR1,
++ MFP_PIN_DF_ADDR2,
++ MFP_PIN_DF_ADDR3,
++ MFP_PIN_DF_IO0,
++ MFP_PIN_DF_IO1,
++ MFP_PIN_DF_IO2,
++ MFP_PIN_DF_IO3,
++ MFP_PIN_DF_IO4,
++ MFP_PIN_DF_IO5,
++ MFP_PIN_DF_IO6,
++ MFP_PIN_DF_IO7,
++ MFP_PIN_DF_IO8,
++ MFP_PIN_DF_IO9,
++ MFP_PIN_DF_IO10,
++ MFP_PIN_DF_IO11,
++ MFP_PIN_DF_IO12,
++ MFP_PIN_DF_IO13,
++ MFP_PIN_DF_IO14,
++ MFP_PIN_DF_IO15,
++
++ MFP_PIN_MAX,
++};
++
++/*
++ * a possible MFP configuration is represented by a 32-bit integer
++ *
++ * bit 0.. 9 - MFP Pin Number (1024 Pins Maximum)
++ * bit 10..12 - Alternate Function Selection
++ * bit 13..15 - Drive Strength
++ * bit 16..18 - Low Power Mode State
++ * bit 19..20 - Low Power Mode Edge Detection
++ * bit 21..22 - Run Mode Pull State
++ *
++ * to facilitate the definition, the following macros are provided
++ *
++ * MFP_CFG_DEFAULT - default MFP configuration value, with
++ * alternate function = 0,
++ * drive strength = fast 3mA (MFP_DS03X)
++ * low power mode = default
++ * edge detection = none
++ *
++ * MFP_CFG - default MFPR value with alternate function
++ * MFP_CFG_DRV - default MFPR value with alternate function and
++ * pin drive strength
++ * MFP_CFG_LPM - default MFPR value with alternate function and
++ * low power mode
++ * MFP_CFG_X - default MFPR value with alternate function,
++ * pin drive strength and low power mode
++ */
++
++typedef unsigned long mfp_cfg_t;
++
++#define MFP_PIN(x) ((x) & 0x3ff)
++
++#define MFP_AF0 (0x0 << 10)
++#define MFP_AF1 (0x1 << 10)
++#define MFP_AF2 (0x2 << 10)
++#define MFP_AF3 (0x3 << 10)
++#define MFP_AF4 (0x4 << 10)
++#define MFP_AF5 (0x5 << 10)
++#define MFP_AF6 (0x6 << 10)
++#define MFP_AF7 (0x7 << 10)
++#define MFP_AF_MASK (0x7 << 10)
++#define MFP_AF(x) (((x) >> 10) & 0x7)
++
++#define MFP_DS01X (0x0 << 13)
++#define MFP_DS02X (0x1 << 13)
++#define MFP_DS03X (0x2 << 13)
++#define MFP_DS04X (0x3 << 13)
++#define MFP_DS06X (0x4 << 13)
++#define MFP_DS08X (0x5 << 13)
++#define MFP_DS10X (0x6 << 13)
++#define MFP_DS13X (0x7 << 13)
++#define MFP_DS_MASK (0x7 << 13)
++#define MFP_DS(x) (((x) >> 13) & 0x7)
++
++#define MFP_LPM_INPUT (0x0 << 16)
++#define MFP_LPM_DRIVE_LOW (0x1 << 16)
++#define MFP_LPM_DRIVE_HIGH (0x2 << 16)
++#define MFP_LPM_PULL_LOW (0x3 << 16)
++#define MFP_LPM_PULL_HIGH (0x4 << 16)
++#define MFP_LPM_FLOAT (0x5 << 16)
++#define MFP_LPM_STATE_MASK (0x7 << 16)
++#define MFP_LPM_STATE(x) (((x) >> 16) & 0x7)
++
++#define MFP_LPM_EDGE_NONE (0x0 << 19)
++#define MFP_LPM_EDGE_RISE (0x1 << 19)
++#define MFP_LPM_EDGE_FALL (0x2 << 19)
++#define MFP_LPM_EDGE_BOTH (0x3 << 19)
++#define MFP_LPM_EDGE_MASK (0x3 << 19)
++#define MFP_LPM_EDGE(x) (((x) >> 19) & 0x3)
++
++#define MFP_PULL_NONE (0x0 << 21)
++#define MFP_PULL_LOW (0x1 << 21)
++#define MFP_PULL_HIGH (0x2 << 21)
++#define MFP_PULL_BOTH (0x3 << 21)
++#define MFP_PULL_MASK (0x3 << 21)
++#define MFP_PULL(x) (((x) >> 21) & 0x3)
++
++#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_INPUT |\
++ MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
++
++#define MFP_CFG(pin, af) \
++ ((MFP_CFG_DEFAULT & ~MFP_AF_MASK) |\
++ (MFP_PIN(MFP_PIN_##pin) | MFP_##af))
++
++#define MFP_CFG_DRV(pin, af, drv) \
++ ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK)) |\
++ (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv))
++
++#define MFP_CFG_LPM(pin, af, lpm) \
++ ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_LPM_STATE_MASK)) |\
++ (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_LPM_##lpm))
++
++#define MFP_CFG_X(pin, af, drv, lpm) \
++ ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DS_MASK | MFP_LPM_STATE_MASK)) |\
++ (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_##drv | MFP_LPM_##lpm))
++
++#endif /* __ASM_ARCH_MFP_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/mfp-pxa300.h linux-2.6.25-rc4/include/asm-arm/arch/mfp-pxa300.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/mfp-pxa300.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/mfp-pxa300.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,575 @@
++/*
++ * linux/include/asm-arm/arch-pxa/mfp-pxa300.h
++ *
++ * PXA300/PXA310 specific MFP configuration definitions
++ *
++ * Copyright (C) 2007 Marvell International Ltd.
++ * 2007-08-21: eric miao <eric.miao@marvell.com>
++ * initial version
++ *
++ * 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_ARCH_MFP_PXA300_H
++#define __ASM_ARCH_MFP_PXA300_H
++
++#include <asm/arch/mfp.h>
++#include <asm/arch/mfp-pxa3xx.h>
++
++/* GPIO */
++#define GPIO46_GPIO MFP_CFG(GPIO46, AF1)
++#define GPIO49_GPIO MFP_CFG(GPIO49, AF3)
++#define GPIO50_GPIO MFP_CFG(GPIO50, AF2)
++#define GPIO51_GPIO MFP_CFG(GPIO51, AF3)
++#define GPIO52_GPIO MFP_CFG(GPIO52, AF3)
++#define GPIO56_GPIO MFP_CFG(GPIO56, AF0)
++#define GPIO58_GPIO MFP_CFG(GPIO58, AF0)
++#define GPIO59_GPIO MFP_CFG(GPIO59, AF0)
++#define GPIO60_GPIO MFP_CFG(GPIO60, AF0)
++#define GPIO61_GPIO MFP_CFG(GPIO61, AF0)
++#define GPIO62_GPIO MFP_CFG(GPIO62, AF0)
++
++#ifdef CONFIG_CPU_PXA310
++#define GPIO7_2_GPIO MFP_CFG(GPIO7_2, AF0)
++#define GPIO8_2_GPIO MFP_CFG(GPIO8_2, AF0)
++#define GPIO9_2_GPIO MFP_CFG(GPIO9_2, AF0)
++#define GPIO10_2_GPIO MFP_CFG(GPIO10_2, AF0)
++#define GPIO11_2_GPIO MFP_CFG(GPIO11_2, AF0)
++#define GPIO12_2_GPIO MFP_CFG(GPIO12_2, AF0)
++#endif
++
++/* Chip Select */
++#define GPIO2_nCS3 MFP_CFG(GPIO2, AF1)
++
++/* AC97 */
++#define GPIO23_AC97_nACRESET MFP_CFG(GPIO23, AF1)
++#define GPIO24_AC97_SYSCLK MFP_CFG(GPIO24, AF1)
++#define GPIO29_AC97_BITCLK MFP_CFG(GPIO29, AF1)
++#define GPIO25_AC97_SDATA_IN_0 MFP_CFG(GPIO25, AF1)
++#define GPIO26_AC97_SDATA_IN_1 MFP_CFG(GPIO26, AF1)
++#define GPIO17_AC97_SDATA_IN_2 MFP_CFG(GPIO17, AF3)
++#define GPIO21_AC97_SDATA_IN_2 MFP_CFG(GPIO21, AF2)
++#define GPIO18_AC97_SDATA_IN_3 MFP_CFG(GPIO18, AF3)
++#define GPIO22_AC97_SDATA_IN_3 MFP_CFG(GPIO22, AF2)
++#define GPIO27_AC97_SDATA_OUT MFP_CFG(GPIO27, AF1)
++#define GPIO28_AC97_SYNC MFP_CFG(GPIO28, AF1)
++
++/* I2C */
++#define GPIO21_I2C_SCL MFP_CFG_LPM(GPIO21, AF1, PULL_HIGH)
++#define GPIO22_I2C_SDA MFP_CFG_LPM(GPIO22, AF1, PULL_HIGH)
++
++/* QCI */
++#define GPIO39_CI_DD_0 MFP_CFG_DRV(GPIO39, AF1, DS04X)
++#define GPIO40_CI_DD_1 MFP_CFG_DRV(GPIO40, AF1, DS04X)
++#define GPIO41_CI_DD_2 MFP_CFG_DRV(GPIO41, AF1, DS04X)
++#define GPIO42_CI_DD_3 MFP_CFG_DRV(GPIO42, AF1, DS04X)
++#define GPIO43_CI_DD_4 MFP_CFG_DRV(GPIO43, AF1, DS04X)
++#define GPIO44_CI_DD_5 MFP_CFG_DRV(GPIO44, AF1, DS04X)
++#define GPIO45_CI_DD_6 MFP_CFG_DRV(GPIO45, AF1, DS04X)
++#define GPIO46_CI_DD_7 MFP_CFG_DRV(GPIO46, AF0, DS04X)
++#define GPIO47_CI_DD_8 MFP_CFG_DRV(GPIO47, AF1, DS04X)
++#define GPIO48_CI_DD_9 MFP_CFG_DRV(GPIO48, AF1, DS04X)
++#define GPIO52_CI_HSYNC MFP_CFG_DRV(GPIO52, AF0, DS04X)
++#define GPIO51_CI_VSYNC MFP_CFG_DRV(GPIO51, AF0, DS04X)
++#define GPIO49_CI_MCLK MFP_CFG_DRV(GPIO49, AF0, DS04X)
++#define GPIO50_CI_PCLK MFP_CFG_DRV(GPIO50, AF0, DS04X)
++
++/* KEYPAD */
++#define GPIO3_KP_DKIN_6 MFP_CFG_LPM(GPIO3, AF2, FLOAT)
++#define GPIO4_KP_DKIN_7 MFP_CFG_LPM(GPIO4, AF2, FLOAT)
++#define GPIO16_KP_DKIN_6 MFP_CFG_LPM(GPIO16, AF6, FLOAT)
++#define GPIO83_KP_DKIN_2 MFP_CFG_LPM(GPIO83, AF5, FLOAT)
++#define GPIO84_KP_DKIN_1 MFP_CFG_LPM(GPIO84, AF5, FLOAT)
++#define GPIO85_KP_DKIN_0 MFP_CFG_LPM(GPIO85, AF3, FLOAT)
++#define GPIO86_KP_DKIN_1 MFP_CFG_LPM(GPIO86, AF3, FLOAT)
++#define GPIO87_KP_DKIN_2 MFP_CFG_LPM(GPIO87, AF3, FLOAT)
++#define GPIO88_KP_DKIN_3 MFP_CFG_LPM(GPIO88, AF3, FLOAT)
++#define GPIO89_KP_DKIN_3 MFP_CFG_LPM(GPIO89, AF3, FLOAT)
++#define GPIO107_KP_DKIN_0 MFP_CFG_LPM(GPIO107, AF2, FLOAT)
++#define GPIO108_KP_DKIN_1 MFP_CFG_LPM(GPIO108, AF2, FLOAT)
++#define GPIO109_KP_DKIN_2 MFP_CFG_LPM(GPIO109, AF2, FLOAT)
++#define GPIO110_KP_DKIN_3 MFP_CFG_LPM(GPIO110, AF2, FLOAT)
++#define GPIO111_KP_DKIN_4 MFP_CFG_LPM(GPIO111, AF2, FLOAT)
++#define GPIO112_KP_DKIN_5 MFP_CFG_LPM(GPIO112, AF2, FLOAT)
++#define GPIO113_KP_DKIN_6 MFP_CFG_LPM(GPIO113, AF2, FLOAT)
++#define GPIO114_KP_DKIN_7 MFP_CFG_LPM(GPIO114, AF2, FLOAT)
++#define GPIO115_KP_DKIN_0 MFP_CFG_LPM(GPIO115, AF2, FLOAT)
++#define GPIO116_KP_DKIN_1 MFP_CFG_LPM(GPIO116, AF2, FLOAT)
++#define GPIO117_KP_DKIN_2 MFP_CFG_LPM(GPIO117, AF2, FLOAT)
++#define GPIO118_KP_DKIN_3 MFP_CFG_LPM(GPIO118, AF2, FLOAT)
++#define GPIO119_KP_DKIN_4 MFP_CFG_LPM(GPIO119, AF2, FLOAT)
++#define GPIO120_KP_DKIN_5 MFP_CFG_LPM(GPIO120, AF2, FLOAT)
++#define GPIO121_KP_DKIN_6 MFP_CFG_LPM(GPIO121, AF2, FLOAT)
++#define GPIO122_KP_DKIN_5 MFP_CFG_LPM(GPIO122, AF2, FLOAT)
++#define GPIO123_KP_DKIN_4 MFP_CFG_LPM(GPIO123, AF2, FLOAT)
++#define GPIO124_KP_DKIN_3 MFP_CFG_LPM(GPIO124, AF2, FLOAT)
++#define GPIO127_KP_DKIN_0 MFP_CFG_LPM(GPIO127, AF5, FLOAT)
++#define GPIO0_2_KP_DKIN_0 MFP_CFG_LPM(GPIO0_2, AF2, FLOAT)
++#define GPIO1_2_KP_DKIN_1 MFP_CFG_LPM(GPIO1_2, AF2, FLOAT)
++#define GPIO2_2_KP_DKIN_6 MFP_CFG_LPM(GPIO2_2, AF2, FLOAT)
++#define GPIO3_2_KP_DKIN_7 MFP_CFG_LPM(GPIO3_2, AF2, FLOAT)
++#define GPIO4_2_KP_DKIN_1 MFP_CFG_LPM(GPIO4_2, AF2, FLOAT)
++#define GPIO5_2_KP_DKIN_0 MFP_CFG_LPM(GPIO5_2, AF2, FLOAT)
++
++#define GPIO5_KP_MKIN_0 MFP_CFG_LPM(GPIO5, AF2, FLOAT)
++#define GPIO6_KP_MKIN_1 MFP_CFG_LPM(GPIO6, AF2, FLOAT)
++#define GPIO9_KP_MKIN_6 MFP_CFG_LPM(GPIO9, AF3, FLOAT)
++#define GPIO10_KP_MKIN_7 MFP_CFG_LPM(GPIO10, AF3, FLOAT)
++#define GPIO70_KP_MKIN_6 MFP_CFG_LPM(GPIO70, AF3, FLOAT)
++#define GPIO71_KP_MKIN_7 MFP_CFG_LPM(GPIO71, AF3, FLOAT)
++#define GPIO100_KP_MKIN_6 MFP_CFG_LPM(GPIO100, AF7, FLOAT)
++#define GPIO101_KP_MKIN_7 MFP_CFG_LPM(GPIO101, AF7, FLOAT)
++#define GPIO112_KP_MKIN_6 MFP_CFG_LPM(GPIO112, AF4, FLOAT)
++#define GPIO113_KP_MKIN_7 MFP_CFG_LPM(GPIO113, AF4, FLOAT)
++#define GPIO115_KP_MKIN_0 MFP_CFG_LPM(GPIO115, AF1, FLOAT)
++#define GPIO116_KP_MKIN_1 MFP_CFG_LPM(GPIO116, AF1, FLOAT)
++#define GPIO117_KP_MKIN_2 MFP_CFG_LPM(GPIO117, AF1, FLOAT)
++#define GPIO118_KP_MKIN_3 MFP_CFG_LPM(GPIO118, AF1, FLOAT)
++#define GPIO119_KP_MKIN_4 MFP_CFG_LPM(GPIO119, AF1, FLOAT)
++#define GPIO120_KP_MKIN_5 MFP_CFG_LPM(GPIO120, AF1, FLOAT)
++#define GPIO125_KP_MKIN_2 MFP_CFG_LPM(GPIO125, AF2, FLOAT)
++#define GPIO2_2_KP_MKIN_6 MFP_CFG_LPM(GPIO2_2, AF1, FLOAT)
++#define GPIO3_2_KP_MKIN_7 MFP_CFG_LPM(GPIO3_2, AF1, FLOAT)
++
++#define GPIO7_KP_MKOUT_5 MFP_CFG_LPM(GPIO7, AF1, DRIVE_HIGH)
++#define GPIO11_KP_MKOUT_5 MFP_CFG_LPM(GPIO11, AF3, DRIVE_HIGH)
++#define GPIO12_KP_MKOUT_6 MFP_CFG_LPM(GPIO12, AF3, DRIVE_HIGH)
++#define GPIO13_KP_MKOUT_7 MFP_CFG_LPM(GPIO13, AF3, DRIVE_HIGH)
++#define GPIO19_KP_MKOUT_4 MFP_CFG_LPM(GPIO19, AF3, DRIVE_HIGH)
++#define GPIO20_KP_MKOUT_5 MFP_CFG_LPM(GPIO20, AF3, DRIVE_HIGH)
++#define GPIO38_KP_MKOUT_5 MFP_CFG_LPM(GPIO38, AF5, DRIVE_HIGH)
++#define GPIO53_KP_MKOUT_6 MFP_CFG_LPM(GPIO53, AF5, DRIVE_HIGH)
++#define GPIO78_KP_MKOUT_7 MFP_CFG_LPM(GPIO78, AF5, DRIVE_HIGH)
++#define GPIO85_KP_MKOUT_0 MFP_CFG_LPM(GPIO85, AF2, DRIVE_HIGH)
++#define GPIO86_KP_MKOUT_1 MFP_CFG_LPM(GPIO86, AF2, DRIVE_HIGH)
++#define GPIO87_KP_MKOUT_2 MFP_CFG_LPM(GPIO87, AF2, DRIVE_HIGH)
++#define GPIO88_KP_MKOUT_3 MFP_CFG_LPM(GPIO88, AF2, DRIVE_HIGH)
++#define GPIO104_KP_MKOUT_6 MFP_CFG_LPM(GPIO104, AF5, DRIVE_HIGH)
++#define GPIO105_KP_MKOUT_7 MFP_CFG_LPM(GPIO105, AF5, DRIVE_HIGH)
++#define GPIO121_KP_MKOUT_0 MFP_CFG_LPM(GPIO121, AF1, DRIVE_HIGH)
++#define GPIO122_KP_MKOUT_1 MFP_CFG_LPM(GPIO122, AF1, DRIVE_HIGH)
++#define GPIO123_KP_MKOUT_2 MFP_CFG_LPM(GPIO123, AF1, DRIVE_HIGH)
++#define GPIO124_KP_MKOUT_3 MFP_CFG_LPM(GPIO124, AF1, DRIVE_HIGH)
++#define GPIO125_KP_MKOUT_4 MFP_CFG_LPM(GPIO125, AF1, DRIVE_HIGH)
++#define GPIO126_KP_MKOUT_7 MFP_CFG_LPM(GPIO126, AF4, DRIVE_HIGH)
++#define GPIO5_2_KP_MKOUT_6 MFP_CFG_LPM(GPIO5_2, AF1, DRIVE_HIGH)
++#define GPIO4_2_KP_MKOUT_5 MFP_CFG_LPM(GPIO4_2, AF1, DRIVE_HIGH)
++#define GPIO6_2_KP_MKOUT_7 MFP_CFG_LPM(GPIO6_2, AF1, DRIVE_HIGH)
++
++/* LCD */
++#define GPIO54_LCD_LDD_0 MFP_CFG_DRV(GPIO54, AF1, DS01X)
++#define GPIO55_LCD_LDD_1 MFP_CFG_DRV(GPIO55, AF1, DS01X)
++#define GPIO56_LCD_LDD_2 MFP_CFG_DRV(GPIO56, AF1, DS01X)
++#define GPIO57_LCD_LDD_3 MFP_CFG_DRV(GPIO57, AF1, DS01X)
++#define GPIO58_LCD_LDD_4 MFP_CFG_DRV(GPIO58, AF1, DS01X)
++#define GPIO59_LCD_LDD_5 MFP_CFG_DRV(GPIO59, AF1, DS01X)
++#define GPIO60_LCD_LDD_6 MFP_CFG_DRV(GPIO60, AF1, DS01X)
++#define GPIO61_LCD_LDD_7 MFP_CFG_DRV(GPIO61, AF1, DS01X)
++#define GPIO62_LCD_LDD_8 MFP_CFG_DRV(GPIO62, AF1, DS01X)
++#define GPIO63_LCD_LDD_9 MFP_CFG_DRV(GPIO63, AF1, DS01X)
++#define GPIO64_LCD_LDD_10 MFP_CFG_DRV(GPIO64, AF1, DS01X)
++#define GPIO65_LCD_LDD_11 MFP_CFG_DRV(GPIO65, AF1, DS01X)
++#define GPIO66_LCD_LDD_12 MFP_CFG_DRV(GPIO66, AF1, DS01X)
++#define GPIO67_LCD_LDD_13 MFP_CFG_DRV(GPIO67, AF1, DS01X)
++#define GPIO68_LCD_LDD_14 MFP_CFG_DRV(GPIO68, AF1, DS01X)
++#define GPIO69_LCD_LDD_15 MFP_CFG_DRV(GPIO69, AF1, DS01X)
++#define GPIO70_LCD_LDD_16 MFP_CFG_DRV(GPIO70, AF1, DS01X)
++#define GPIO71_LCD_LDD_17 MFP_CFG_DRV(GPIO71, AF1, DS01X)
++#define GPIO62_LCD_CS_N MFP_CFG_DRV(GPIO62, AF2, DS01X)
++#define GPIO72_LCD_FCLK MFP_CFG_DRV(GPIO72, AF1, DS01X)
++#define GPIO73_LCD_LCLK MFP_CFG_DRV(GPIO73, AF1, DS01X)
++#define GPIO74_LCD_PCLK MFP_CFG_DRV(GPIO74, AF1, DS02X)
++#define GPIO75_LCD_BIAS MFP_CFG_DRV(GPIO75, AF1, DS01X)
++#define GPIO76_LCD_VSYNC MFP_CFG_DRV(GPIO76, AF2, DS01X)
++
++#define GPIO15_LCD_CS_N MFP_CFG_DRV(GPIO15, AF2, DS01X)
++#define GPIO127_LCD_CS_N MFP_CFG_DRV(GPIO127, AF1, DS01X)
++#define GPIO63_LCD_VSYNC MFP_CFG_DRV(GPIO63, AF2, DS01X)
++
++/* Mini-LCD */
++#define GPIO72_MLCD_FCLK MFP_CFG_DRV(GPIO72, AF7, DS08X)
++#define GPIO73_MLCD_LCLK MFP_CFG_DRV(GPIO73, AF7, DS08X)
++#define GPIO54_MLCD_LDD_0 MFP_CFG_DRV(GPIO54, AF7, DS08X)
++#define GPIO55_MLCD_LDD_1 MFP_CFG_DRV(GPIO55, AF7, DS08X)
++#define GPIO56_MLCD_LDD_2 MFP_CFG_DRV(GPIO56, AF7, DS08X)
++#define GPIO57_MLCD_LDD_3 MFP_CFG_DRV(GPIO57, AF7, DS08X)
++#define GPIO58_MLCD_LDD_4 MFP_CFG_DRV(GPIO58, AF7, DS08X)
++#define GPIO59_MLCD_LDD_5 MFP_CFG_DRV(GPIO59, AF7, DS08X)
++#define GPIO60_MLCD_LDD_6 MFP_CFG_DRV(GPIO60, AF7, DS08X)
++#define GPIO61_MLCD_LDD_7 MFP_CFG_DRV(GPIO61, AF7, DS08X)
++#define GPIO62_MLCD_LDD_8 MFP_CFG_DRV(GPIO62, AF7, DS08X)
++#define GPIO63_MLCD_LDD_9 MFP_CFG_DRV(GPIO63, AF7, DS08X)
++#define GPIO64_MLCD_LDD_10 MFP_CFG_DRV(GPIO64, AF7, DS08X)
++#define GPIO65_MLCD_LDD_11 MFP_CFG_DRV(GPIO65, AF7, DS08X)
++#define GPIO66_MLCD_LDD_12 MFP_CFG_DRV(GPIO66, AF7, DS08X)
++#define GPIO67_MLCD_LDD_13 MFP_CFG_DRV(GPIO67, AF7, DS08X)
++#define GPIO68_MLCD_LDD_14 MFP_CFG_DRV(GPIO68, AF7, DS08X)
++#define GPIO69_MLCD_LDD_15 MFP_CFG_DRV(GPIO69, AF7, DS08X)
++#define GPIO74_MLCD_PCLK MFP_CFG_DRV(GPIO74, AF7, DS08X)
++#define GPIO75_MLCD_BIAS MFP_CFG_DRV(GPIO75, AF2, DS08X)
++
++/* MMC1 */
++#define GPIO7_MMC1_CLK MFP_CFG_LPM(GPIO7, AF4, DRIVE_HIGH)
++#define GPIO8_MMC1_CMD MFP_CFG_LPM(GPIO8, AF4, DRIVE_HIGH)
++#define GPIO14_MMC1_CMD MFP_CFG_LPM(GPIO14, AF5, DRIVE_HIGH)
++#define GPIO15_MMC1_CMD MFP_CFG_LPM(GPIO15, AF5, DRIVE_HIGH)
++#define GPIO3_MMC1_DAT0 MFP_CFG_LPM(GPIO3, AF4, DRIVE_HIGH)
++#define GPIO4_MMC1_DAT1 MFP_CFG_LPM(GPIO4, AF4, DRIVE_HIGH)
++#define GPIO5_MMC1_DAT2 MFP_CFG_LPM(GPIO5, AF4, DRIVE_HIGH)
++#define GPIO6_MMC1_DAT3 MFP_CFG_LPM(GPIO6, AF4, DRIVE_HIGH)
++
++/* MMC2 */
++#define GPIO9_MMC2_DAT0 MFP_CFG_LPM(GPIO9, AF4, PULL_HIGH)
++#define GPIO10_MMC2_DAT1 MFP_CFG_LPM(GPIO10, AF4, PULL_HIGH)
++#define GPIO11_MMC2_DAT2 MFP_CFG_LPM(GPIO11, AF4, PULL_HIGH)
++#define GPIO12_MMC2_DAT3 MFP_CFG_LPM(GPIO12, AF4, PULL_HIGH)
++#define GPIO13_MMC2_CLK MFP_CFG_LPM(GPIO13, AF4, PULL_HIGH)
++#define GPIO14_MMC2_CMD MFP_CFG_LPM(GPIO14, AF4, PULL_HIGH)
++#define GPIO77_MMC2_DAT0 MFP_CFG_LPM(GPIO77, AF4, PULL_HIGH)
++#define GPIO78_MMC2_DAT1 MFP_CFG_LPM(GPIO78, AF4, PULL_HIGH)
++#define GPIO79_MMC2_DAT2 MFP_CFG_LPM(GPIO79, AF4, PULL_HIGH)
++#define GPIO80_MMC2_DAT3 MFP_CFG_LPM(GPIO80, AF4, PULL_HIGH)
++#define GPIO81_MMC2_CLK MFP_CFG_LPM(GPIO81, AF4, PULL_HIGH)
++#define GPIO82_MMC2_CMD MFP_CFG_LPM(GPIO82, AF4, PULL_HIGH)
++
++/* SSP1 */
++#define GPIO89_SSP1_EXTCLK MFP_CFG(GPIO89, AF1)
++#define GPIO90_SSP1_SYSCLK MFP_CFG(GPIO90, AF1)
++#define GPIO15_SSP1_SCLK MFP_CFG(GPIO15, AF6)
++#define GPIO16_SSP1_FRM MFP_CFG(GPIO16, AF2)
++#define GPIO33_SSP1_SCLK MFP_CFG(GPIO33, AF5)
++#define GPIO34_SSP1_FRM MFP_CFG(GPIO34, AF5)
++#define GPIO85_SSP1_SCLK MFP_CFG(GPIO85, AF1)
++#define GPIO86_SSP1_FRM MFP_CFG(GPIO86, AF1)
++#define GPIO18_SSP1_TXD MFP_CFG(GPIO18, AF7)
++#define GPIO18_SSP1_RXD MFP_CFG(GPIO18, AF2)
++#define GPIO20_SSP1_TXD MFP_CFG(GPIO20, AF2)
++#define GPIO20_SSP1_RXD MFP_CFG(GPIO20, AF7)
++#define GPIO35_SSP1_TXD MFP_CFG(GPIO35, AF5)
++#define GPIO35_SSP1_RXD MFP_CFG(GPIO35, AF4)
++#define GPIO36_SSP1_TXD MFP_CFG(GPIO36, AF5)
++#define GPIO36_SSP1_RXD MFP_CFG(GPIO36, AF6)
++#define GPIO87_SSP1_TXD MFP_CFG(GPIO87, AF1)
++#define GPIO87_SSP1_RXD MFP_CFG(GPIO87, AF6)
++#define GPIO88_SSP1_TXD MFP_CFG(GPIO88, AF6)
++#define GPIO88_SSP1_RXD MFP_CFG(GPIO88, AF1)
++
++/* SSP2 */
++#define GPIO29_SSP2_EXTCLK MFP_CFG(GPIO29, AF2)
++#define GPIO23_SSP2_SCLK MFP_CFG(GPIO23, AF2)
++#define GPIO17_SSP2_FRM MFP_CFG(GPIO17, AF2)
++#define GPIO25_SSP2_SCLK MFP_CFG(GPIO25, AF2)
++#define GPIO26_SSP2_FRM MFP_CFG(GPIO26, AF2)
++#define GPIO33_SSP2_SCLK MFP_CFG(GPIO33, AF6)
++#define GPIO34_SSP2_FRM MFP_CFG(GPIO34, AF6)
++#define GPIO64_SSP2_SCLK MFP_CFG(GPIO64, AF2)
++#define GPIO65_SSP2_FRM MFP_CFG(GPIO65, AF2)
++#define GPIO19_SSP2_TXD MFP_CFG(GPIO19, AF2)
++#define GPIO19_SSP2_RXD MFP_CFG(GPIO19, AF7)
++#define GPIO24_SSP2_TXD MFP_CFG(GPIO24, AF5)
++#define GPIO24_SSP2_RXD MFP_CFG(GPIO24, AF4)
++#define GPIO27_SSP2_TXD MFP_CFG(GPIO27, AF2)
++#define GPIO27_SSP2_RXD MFP_CFG(GPIO27, AF5)
++#define GPIO28_SSP2_TXD MFP_CFG(GPIO28, AF5)
++#define GPIO28_SSP2_RXD MFP_CFG(GPIO28, AF2)
++#define GPIO35_SSP2_TXD MFP_CFG(GPIO35, AF7)
++#define GPIO35_SSP2_RXD MFP_CFG(GPIO35, AF6)
++#define GPIO66_SSP2_TXD MFP_CFG(GPIO66, AF4)
++#define GPIO66_SSP2_RXD MFP_CFG(GPIO66, AF2)
++#define GPIO67_SSP2_TXD MFP_CFG(GPIO67, AF2)
++#define GPIO67_SSP2_RXD MFP_CFG(GPIO67, AF4)
++#define GPIO36_SSP2_TXD MFP_CFG(GPIO36, AF7)
++
++/* SSP3 */
++#define GPIO69_SSP3_FRM MFP_CFG_X(GPIO69, AF2, DS08X, DRIVE_LOW)
++#define GPIO68_SSP3_SCLK MFP_CFG_X(GPIO68, AF2, DS08X, FLOAT)
++#define GPIO92_SSP3_FRM MFP_CFG_X(GPIO92, AF1, DS08X, DRIVE_LOW)
++#define GPIO91_SSP3_SCLK MFP_CFG_X(GPIO91, AF1, DS08X, FLOAT)
++#define GPIO70_SSP3_TXD MFP_CFG_X(GPIO70, AF2, DS08X, DRIVE_LOW)
++#define GPIO70_SSP3_RXD MFP_CFG_X(GPIO70, AF5, DS08X, FLOAT)
++#define GPIO71_SSP3_TXD MFP_CFG_X(GPIO71, AF5, DS08X, DRIVE_LOW)
++#define GPIO71_SSP3_RXD MFP_CFG_X(GPIO71, AF2, DS08X, FLOAT)
++#define GPIO93_SSP3_TXD MFP_CFG_X(GPIO93, AF1, DS08X, DRIVE_LOW)
++#define GPIO93_SSP3_RXD MFP_CFG_X(GPIO93, AF5, DS08X, FLOAT)
++#define GPIO94_SSP3_TXD MFP_CFG_X(GPIO94, AF5, DS08X, DRIVE_LOW)
++#define GPIO94_SSP3_RXD MFP_CFG_X(GPIO94, AF1, DS08X, FLOAT)
++
++/* SSP4 */
++#define GPIO95_SSP4_SCLK MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH)
++#define GPIO96_SSP4_FRM MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH)
++#define GPIO97_SSP4_TXD MFP_CFG_LPM(GPIO97, AF1, PULL_HIGH)
++#define GPIO97_SSP4_RXD MFP_CFG_LPM(GPIO97, AF5, PULL_HIGH)
++#define GPIO98_SSP4_TXD MFP_CFG_LPM(GPIO98, AF5, PULL_HIGH)
++#define GPIO98_SSP4_RXD MFP_CFG_LPM(GPIO98, AF1, PULL_HIGH)
++
++/* UART1 */
++#define GPIO32_UART1_CTS MFP_CFG_LPM(GPIO32, AF2, FLOAT)
++#define GPIO37_UART1_CTS MFP_CFG_LPM(GPIO37, AF4, FLOAT)
++#define GPIO79_UART1_CTS MFP_CFG_LPM(GPIO79, AF1, FLOAT)
++#define GPIO84_UART1_CTS MFP_CFG_LPM(GPIO84, AF3, FLOAT)
++#define GPIO101_UART1_CTS MFP_CFG_LPM(GPIO101, AF1, FLOAT)
++#define GPIO106_UART1_CTS MFP_CFG_LPM(GPIO106, AF6, FLOAT)
++
++#define GPIO32_UART1_RTS MFP_CFG_LPM(GPIO32, AF4, FLOAT)
++#define GPIO37_UART1_RTS MFP_CFG_LPM(GPIO37, AF2, FLOAT)
++#define GPIO79_UART1_RTS MFP_CFG_LPM(GPIO79, AF3, FLOAT)
++#define GPIO84_UART1_RTS MFP_CFG_LPM(GPIO84, AF1, FLOAT)
++#define GPIO101_UART1_RTS MFP_CFG_LPM(GPIO101, AF6, FLOAT)
++#define GPIO106_UART1_RTS MFP_CFG_LPM(GPIO106, AF1, FLOAT)
++
++#define GPIO34_UART1_DSR MFP_CFG_LPM(GPIO34, AF2, FLOAT)
++#define GPIO36_UART1_DSR MFP_CFG_LPM(GPIO36, AF4, FLOAT)
++#define GPIO81_UART1_DSR MFP_CFG_LPM(GPIO81, AF1, FLOAT)
++#define GPIO83_UART1_DSR MFP_CFG_LPM(GPIO83, AF3, FLOAT)
++#define GPIO103_UART1_DSR MFP_CFG_LPM(GPIO103, AF1, FLOAT)
++#define GPIO105_UART1_DSR MFP_CFG_LPM(GPIO105, AF6, FLOAT)
++
++#define GPIO34_UART1_DTR MFP_CFG_LPM(GPIO34, AF4, FLOAT)
++#define GPIO36_UART1_DTR MFP_CFG_LPM(GPIO36, AF2, FLOAT)
++#define GPIO81_UART1_DTR MFP_CFG_LPM(GPIO81, AF3, FLOAT)
++#define GPIO83_UART1_DTR MFP_CFG_LPM(GPIO83, AF1, FLOAT)
++#define GPIO103_UART1_DTR MFP_CFG_LPM(GPIO103, AF6, FLOAT)
++#define GPIO105_UART1_DTR MFP_CFG_LPM(GPIO105, AF1, FLOAT)
++
++#define GPIO35_UART1_RI MFP_CFG_LPM(GPIO35, AF2, FLOAT)
++#define GPIO82_UART1_RI MFP_CFG_LPM(GPIO82, AF1, FLOAT)
++#define GPIO104_UART1_RI MFP_CFG_LPM(GPIO104, AF1, FLOAT)
++
++#define GPIO33_UART1_DCD MFP_CFG_LPM(GPIO33, AF2, FLOAT)
++#define GPIO80_UART1_DCD MFP_CFG_LPM(GPIO80, AF1, FLOAT)
++#define GPIO102_UART1_DCD MFP_CFG_LPM(GPIO102, AF1, FLOAT)
++
++#define GPIO30_UART1_RXD MFP_CFG_LPM(GPIO30, AF2, FLOAT)
++#define GPIO31_UART1_RXD MFP_CFG_LPM(GPIO31, AF4, FLOAT)
++#define GPIO77_UART1_RXD MFP_CFG_LPM(GPIO77, AF1, FLOAT)
++#define GPIO78_UART1_RXD MFP_CFG_LPM(GPIO78, AF3, FLOAT)
++#define GPIO99_UART1_RXD MFP_CFG_LPM(GPIO99, AF1, FLOAT)
++#define GPIO100_UART1_RXD MFP_CFG_LPM(GPIO100, AF6, FLOAT)
++#define GPIO102_UART1_RXD MFP_CFG_LPM(GPIO102, AF6, FLOAT)
++#define GPIO104_UART1_RXD MFP_CFG_LPM(GPIO104, AF4, FLOAT)
++
++#define GPIO30_UART1_TXD MFP_CFG_LPM(GPIO30, AF4, FLOAT)
++#define GPIO31_UART1_TXD MFP_CFG_LPM(GPIO31, AF2, FLOAT)
++#define GPIO77_UART1_TXD MFP_CFG_LPM(GPIO77, AF3, FLOAT)
++#define GPIO78_UART1_TXD MFP_CFG_LPM(GPIO78, AF1, FLOAT)
++#define GPIO99_UART1_TXD MFP_CFG_LPM(GPIO99, AF6, FLOAT)
++#define GPIO100_UART1_TXD MFP_CFG_LPM(GPIO100, AF1, FLOAT)
++#define GPIO102_UART1_TXD MFP_CFG_LPM(GPIO102, AF4, FLOAT)
++
++/* UART2 */
++#define GPIO15_UART2_CTS MFP_CFG_LPM(GPIO15, AF3, FLOAT)
++#define GPIO16_UART2_CTS MFP_CFG_LPM(GPIO16, AF5, FLOAT)
++#define GPIO111_UART2_CTS MFP_CFG_LPM(GPIO111, AF3, FLOAT)
++#define GPIO114_UART2_CTS MFP_CFG_LPM(GPIO114, AF1, FLOAT)
++
++#define GPIO15_UART2_RTS MFP_CFG_LPM(GPIO15, AF4, FLOAT)
++#define GPIO16_UART2_RTS MFP_CFG_LPM(GPIO16, AF4, FLOAT)
++#define GPIO114_UART2_RTS MFP_CFG_LPM(GPIO114, AF3, FLOAT)
++#define GPIO111_UART2_RTS MFP_CFG_LPM(GPIO111, AF1, FLOAT)
++
++#define GPIO18_UART2_RXD MFP_CFG_LPM(GPIO18, AF5, FLOAT)
++#define GPIO19_UART2_RXD MFP_CFG_LPM(GPIO19, AF4, FLOAT)
++#define GPIO112_UART2_RXD MFP_CFG_LPM(GPIO112, AF1, FLOAT)
++#define GPIO113_UART2_RXD MFP_CFG_LPM(GPIO113, AF3, FLOAT)
++
++#define GPIO18_UART2_TXD MFP_CFG_LPM(GPIO18, AF4, FLOAT)
++#define GPIO19_UART2_TXD MFP_CFG_LPM(GPIO19, AF5, FLOAT)
++#define GPIO112_UART2_TXD MFP_CFG_LPM(GPIO112, AF3, FLOAT)
++#define GPIO113_UART2_TXD MFP_CFG_LPM(GPIO113, AF1, FLOAT)
++
++/* UART3 */
++#define GPIO91_UART3_CTS MFP_CFG_LPM(GPIO91, AF2, FLOAT)
++#define GPIO92_UART3_CTS MFP_CFG_LPM(GPIO92, AF4, FLOAT)
++#define GPIO107_UART3_CTS MFP_CFG_LPM(GPIO107, AF1, FLOAT)
++#define GPIO108_UART3_CTS MFP_CFG_LPM(GPIO108, AF3, FLOAT)
++
++#define GPIO91_UART3_RTS MFP_CFG_LPM(GPIO91, AF4, FLOAT)
++#define GPIO92_UART3_RTS MFP_CFG_LPM(GPIO92, AF2, FLOAT)
++#define GPIO107_UART3_RTS MFP_CFG_LPM(GPIO107, AF3, FLOAT)
++#define GPIO108_UART3_RTS MFP_CFG_LPM(GPIO108, AF1, FLOAT)
++
++#define GPIO7_UART3_RXD MFP_CFG_LPM(GPIO7, AF2, FLOAT)
++#define GPIO8_UART3_RXD MFP_CFG_LPM(GPIO8, AF6, FLOAT)
++#define GPIO93_UART3_RXD MFP_CFG_LPM(GPIO93, AF4, FLOAT)
++#define GPIO94_UART3_RXD MFP_CFG_LPM(GPIO94, AF2, FLOAT)
++#define GPIO109_UART3_RXD MFP_CFG_LPM(GPIO109, AF3, FLOAT)
++#define GPIO110_UART3_RXD MFP_CFG_LPM(GPIO110, AF1, FLOAT)
++
++#define GPIO7_UART3_TXD MFP_CFG_LPM(GPIO7, AF6, FLOAT)
++#define GPIO8_UART3_TXD MFP_CFG_LPM(GPIO8, AF2, FLOAT)
++#define GPIO93_UART3_TXD MFP_CFG_LPM(GPIO93, AF2, FLOAT)
++#define GPIO94_UART3_TXD MFP_CFG_LPM(GPIO94, AF4, FLOAT)
++#define GPIO109_UART3_TXD MFP_CFG_LPM(GPIO109, AF1, FLOAT)
++#define GPIO110_UART3_TXD MFP_CFG_LPM(GPIO110, AF3, FLOAT)
++
++/* USB Host */
++#define GPIO0_2_USBH_PEN MFP_CFG(GPIO0_2, AF1)
++#define GPIO1_2_USBH_PWR MFP_CFG(GPIO1_2, AF1)
++
++/* USB P3 */
++#define GPIO77_USB_P3_1 MFP_CFG(GPIO77, AF2)
++#define GPIO78_USB_P3_2 MFP_CFG(GPIO78, AF2)
++#define GPIO79_USB_P3_3 MFP_CFG(GPIO79, AF2)
++#define GPIO80_USB_P3_4 MFP_CFG(GPIO80, AF2)
++#define GPIO81_USB_P3_5 MFP_CFG(GPIO81, AF2)
++#define GPIO82_USB_P3_6 MFP_CFG(GPIO82, AF2)
++
++/* PWM */
++#define GPIO17_PWM0_OUT MFP_CFG(GPIO17, AF1)
++#define GPIO18_PWM1_OUT MFP_CFG(GPIO18, AF1)
++#define GPIO19_PWM2_OUT MFP_CFG(GPIO19, AF1)
++#define GPIO20_PWM3_OUT MFP_CFG(GPIO20, AF1)
++
++/* CIR */
++#define GPIO8_CIR_OUT MFP_CFG(GPIO8, AF5)
++#define GPIO16_CIR_OUT MFP_CFG(GPIO16, AF3)
++
++#define GPIO20_OW_DQ_IN MFP_CFG(GPIO20, AF5)
++#define GPIO126_OW_DQ MFP_CFG(GPIO126, AF2)
++
++#define GPIO0_DF_RDY MFP_CFG(GPIO0, AF1)
++#define GPIO7_CLK_BYPASS_XSC MFP_CFG(GPIO7, AF7)
++#define GPIO17_EXT_SYNC_MVT_0 MFP_CFG(GPIO17, AF6)
++#define GPIO18_EXT_SYNC_MVT_1 MFP_CFG(GPIO18, AF6)
++#define GPIO19_OST_CHOUT_MVT_0 MFP_CFG(GPIO19, AF6)
++#define GPIO20_OST_CHOUT_MVT_1 MFP_CFG(GPIO20, AF6)
++#define GPIO49_48M_CLK MFP_CFG(GPIO49, AF2)
++#define GPIO126_EXT_CLK MFP_CFG(GPIO126, AF3)
++#define GPIO127_CLK_BYPASS_GB MFP_CFG(GPIO127, AF7)
++#define GPIO71_EXT_MATCH_MVT MFP_CFG(GPIO71, AF6)
++
++#define GPIO3_uIO_IN MFP_CFG(GPIO3, AF1)
++
++#define GPIO4_uSIM_CARD_STATE MFP_CFG(GPIO4, AF1)
++#define GPIO5_uSIM_uCLK MFP_CFG(GPIO5, AF1)
++#define GPIO6_uSIM_uRST MFP_CFG(GPIO6, AF1)
++#define GPIO16_uSIM_UVS_0 MFP_CFG(GPIO16, AF1)
++
++#define GPIO9_SCIO MFP_CFG(GPIO9, AF1)
++#define GPIO20_RTC_MVT MFP_CFG(GPIO20, AF4)
++#define GPIO126_RTC_MVT MFP_CFG(GPIO126, AF1)
++
++/*
++ * PXA300 specific MFP configurations
++ */
++#ifdef CONFIG_CPU_PXA300
++#define GPIO99_USB_P2_2 MFP_CFG(GPIO99, AF2)
++#define GPIO99_USB_P2_5 MFP_CFG(GPIO99, AF3)
++#define GPIO99_USB_P2_6 MFP_CFG(GPIO99, AF4)
++#define GPIO100_USB_P2_2 MFP_CFG(GPIO100, AF4)
++#define GPIO100_USB_P2_5 MFP_CFG(GPIO100, AF5)
++#define GPIO101_USB_P2_1 MFP_CFG(GPIO101, AF2)
++#define GPIO102_USB_P2_4 MFP_CFG(GPIO102, AF2)
++#define GPIO104_USB_P2_3 MFP_CFG(GPIO104, AF2)
++#define GPIO105_USB_P2_5 MFP_CFG(GPIO105, AF2)
++#define GPIO100_USB_P2_6 MFP_CFG(GPIO100, AF2)
++#define GPIO106_USB_P2_7 MFP_CFG(GPIO106, AF2)
++#define GPIO103_USB_P2_8 MFP_CFG(GPIO103, AF2)
++
++/* U2D UTMI */
++#define GPIO38_UTM_CLK MFP_CFG(GPIO38, AF1)
++#define GPIO26_U2D_RXERROR MFP_CFG(GPIO26, AF3)
++#define GPIO50_U2D_RXERROR MFP_CFG(GPIO50, AF1)
++#define GPIO89_U2D_RXERROR MFP_CFG(GPIO89, AF5)
++#define GPIO24_UTM_RXVALID MFP_CFG(GPIO24, AF3)
++#define GPIO48_UTM_RXVALID MFP_CFG(GPIO48, AF2)
++#define GPIO87_UTM_RXVALID MFP_CFG(GPIO87, AF5)
++#define GPIO25_UTM_RXACTIVE MFP_CFG(GPIO25, AF3)
++#define GPIO47_UTM_RXACTIVE MFP_CFG(GPIO47, AF2)
++#define GPIO49_UTM_RXACTIVE MFP_CFG(GPIO49, AF1)
++#define GPIO88_UTM_RXACTIVE MFP_CFG(GPIO88, AF5)
++#define GPIO53_UTM_TXREADY MFP_CFG(GPIO53, AF1)
++#define GPIO67_UTM_LINESTATE_0 MFP_CFG(GPIO67, AF3)
++#define GPIO92_UTM_LINESTATE_0 MFP_CFG(GPIO92, AF3)
++#define GPIO104_UTM_LINESTATE_0 MFP_CFG(GPIO104, AF3)
++#define GPIO109_UTM_LINESTATE_0 MFP_CFG(GPIO109, AF4)
++#define GPIO68_UTM_LINESTATE_1 MFP_CFG(GPIO68, AF3)
++#define GPIO93_UTM_LINESTATE_1 MFP_CFG(GPIO93, AF3)
++#define GPIO105_UTM_LINESTATE_1 MFP_CFG(GPIO105, AF3)
++#define GPIO27_U2D_OPMODE_0 MFP_CFG(GPIO27, AF4)
++#define GPIO51_U2D_OPMODE_0 MFP_CFG(GPIO51, AF2)
++#define GPIO90_U2D_OPMODE_0 MFP_CFG(GPIO90, AF7)
++#define GPIO28_U2D_OPMODE_1 MFP_CFG(GPIO28, AF4)
++#define GPIO52_U2D_OPMODE_1 MFP_CFG(GPIO52, AF2)
++#define GPIO106_U2D_OPMODE_1 MFP_CFG(GPIO106, AF3)
++#define GPIO110_U2D_OPMODE_1 MFP_CFG(GPIO110, AF5)
++#define GPIO76_U2D_RESET MFP_CFG(GPIO76, AF1)
++#define GPIO95_U2D_RESET MFP_CFG(GPIO95, AF2)
++#define GPIO100_U2D_RESET MFP_CFG(GPIO100, AF3)
++#define GPIO66_U2D_SUSPEND MFP_CFG(GPIO66, AF3)
++#define GPIO98_U2D_SUSPEND MFP_CFG(GPIO98, AF2)
++#define GPIO103_U2D_SUSPEND MFP_CFG(GPIO103, AF3)
++#define GPIO65_U2D_TERM_SEL MFP_CFG(GPIO65, AF5)
++#define GPIO97_U2D_TERM_SEL MFP_CFG(GPIO97, AF3)
++#define GPIO102_U2D_TERM_SEL MFP_CFG(GPIO102, AF5)
++#define GPIO29_U2D_TXVALID MFP_CFG(GPIO29, AF3)
++#define GPIO52_U2D_TXVALID MFP_CFG(GPIO52, AF4)
++#define GPIO69_U2D_TXVALID MFP_CFG(GPIO69, AF3)
++#define GPIO85_U2D_TXVALID MFP_CFG(GPIO85, AF7)
++#define GPIO64_U2D_XCVR_SEL MFP_CFG(GPIO64, AF5)
++#define GPIO96_U2D_XCVR_SEL MFP_CFG(GPIO96, AF3)
++#define GPIO101_U2D_XCVR_SEL MFP_CFG(GPIO101, AF5)
++#define GPIO30_UTM_PHYDATA_0 MFP_CFG(GPIO30, AF3)
++#define GPIO31_UTM_PHYDATA_1 MFP_CFG(GPIO31, AF3)
++#define GPIO32_UTM_PHYDATA_2 MFP_CFG(GPIO32, AF3)
++#define GPIO33_UTM_PHYDATA_3 MFP_CFG(GPIO33, AF3)
++#define GPIO34_UTM_PHYDATA_4 MFP_CFG(GPIO34, AF3)
++#define GPIO35_UTM_PHYDATA_5 MFP_CFG(GPIO35, AF3)
++#define GPIO36_UTM_PHYDATA_6 MFP_CFG(GPIO36, AF3)
++#define GPIO37_UTM_PHYDATA_7 MFP_CFG(GPIO37, AF3)
++#define GPIO39_UTM_PHYDATA_0 MFP_CFG(GPIO39, AF3)
++#define GPIO40_UTM_PHYDATA_1 MFP_CFG(GPIO40, AF3)
++#define GPIO41_UTM_PHYDATA_2 MFP_CFG(GPIO41, AF3)
++#define GPIO42_UTM_PHYDATA_3 MFP_CFG(GPIO42, AF3)
++#define GPIO43_UTM_PHYDATA_4 MFP_CFG(GPIO43, AF3)
++#define GPIO44_UTM_PHYDATA_5 MFP_CFG(GPIO44, AF3)
++#define GPIO45_UTM_PHYDATA_6 MFP_CFG(GPIO45, AF3)
++#define GPIO46_UTM_PHYDATA_7 MFP_CFG(GPIO46, AF3)
++#endif /* CONFIG_CPU_PXA300 */
++
++/*
++ * PXA310 specific MFP configurations
++ */
++#ifdef CONFIG_CPU_PXA310
++/* USB P2 */
++#define GPIO36_USB_P2_1 MFP_CFG(GPIO36, AF1)
++#define GPIO30_USB_P2_2 MFP_CFG(GPIO30, AF1)
++#define GPIO35_USB_P2_3 MFP_CFG(GPIO35, AF1)
++#define GPIO32_USB_P2_4 MFP_CFG(GPIO32, AF1)
++#define GPIO34_USB_P2_5 MFP_CFG(GPIO34, AF1)
++#define GPIO31_USB_P2_6 MFP_CFG(GPIO31, AF1)
++
++/* MMC1 */
++#define GPIO24_MMC1_CMD MFP_CFG(GPIO24, AF3)
++#define GPIO29_MMC1_DAT0 MFP_CFG(GPIO29, AF3)
++
++/* MMC3 */
++#define GPIO103_MMC3_CLK MFP_CFG(GPIO103, AF2)
++#define GPIO105_MMC3_CMD MFP_CFG(GPIO105, AF2)
++#define GPIO11_2_MMC3_CLK MFP_CFG(GPIO11_2, AF1)
++#define GPIO12_2_MMC3_CMD MFP_CFG(GPIO12_2, AF1)
++#define GPIO7_2_MMC3_DAT0 MFP_CFG(GPIO7_2, AF1)
++#define GPIO8_2_MMC3_DAT1 MFP_CFG(GPIO8_2, AF1)
++#define GPIO9_2_MMC3_DAT2 MFP_CFG(GPIO9_2, AF1)
++#define GPIO10_2_MMC3_DAT3 MFP_CFG(GPIO10_2, AF1)
++
++/* ULPI */
++#define GPIO38_ULPI_CLK MFP_CFG(GPIO38, AF1)
++#define GPIO30_ULPI_DATA_OUT_0 MFP_CFG(GPIO30, AF3)
++#define GPIO31_ULPI_DATA_OUT_1 MFP_CFG(GPIO31, AF3)
++#define GPIO32_ULPI_DATA_OUT_2 MFP_CFG(GPIO32, AF3)
++#define GPIO33_ULPI_DATA_OUT_3 MFP_CFG(GPIO33, AF3)
++#define GPIO34_ULPI_DATA_OUT_4 MFP_CFG(GPIO34, AF3)
++#define GPIO35_ULPI_DATA_OUT_5 MFP_CFG(GPIO35, AF3)
++#define GPIO36_ULPI_DATA_OUT_6 MFP_CFG(GPIO36, AF3)
++#define GPIO37_ULPI_DATA_OUT_7 MFP_CFG(GPIO37, AF3)
++#define GPIO33_ULPI_OTG_INTR MFP_CFG(GPIO33, AF1)
++
++#define ULPI_DIR MFP_CFG_DRV(ULPI_DIR, MFP_AF0, MFP_DS01X)
++#define ULPI_NXT MFP_CFG_DRV(ULPI_NXT, MFP_AF0, MFP_DS01X)
++#define ULPI_STP MFP_CFG_DRV(ULPI_STP, MFP_AF0, MFP_DS01X)
++#endif /* CONFIG_CPU_PXA310 */
++
++#endif /* __ASM_ARCH_MFP_PXA300_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/mfp-pxa320.h linux-2.6.25-rc4/include/asm-arm/arch/mfp-pxa320.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/mfp-pxa320.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/mfp-pxa320.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,447 @@
++/*
++ * linux/include/asm-arm/arch-pxa/mfp-pxa320.h
++ *
++ * PXA320 specific MFP configuration definitions
++ *
++ * Copyright (C) 2007 Marvell International Ltd.
++ * 2007-08-21: eric miao <eric.miao@marvell.com>
++ * initial version
++ *
++ * 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_ARCH_MFP_PXA320_H
++#define __ASM_ARCH_MFP_PXA320_H
++
++#include <asm/arch/mfp.h>
++#include <asm/arch/mfp-pxa3xx.h>
++
++/* GPIO */
++#define GPIO46_GPIO MFP_CFG(GPIO46, AF0)
++#define GPIO49_GPIO MFP_CFG(GPIO49, AF0)
++#define GPIO50_GPIO MFP_CFG(GPIO50, AF0)
++#define GPIO51_GPIO MFP_CFG(GPIO51, AF0)
++#define GPIO52_GPIO MFP_CFG(GPIO52, AF0)
++
++#define GPIO7_2_GPIO MFP_CFG(GPIO7_2, AF0)
++#define GPIO8_2_GPIO MFP_CFG(GPIO8_2, AF0)
++#define GPIO9_2_GPIO MFP_CFG(GPIO9_2, AF0)
++#define GPIO10_2_GPIO MFP_CFG(GPIO10_2, AF0)
++#define GPIO11_2_GPIO MFP_CFG(GPIO11_2, AF0)
++#define GPIO12_2_GPIO MFP_CFG(GPIO12_2, AF0)
++#define GPIO13_2_GPIO MFP_CFG(GPIO13_2, AF0)
++#define GPIO14_2_GPIO MFP_CFG(GPIO14_2, AF0)
++#define GPIO15_2_GPIO MFP_CFG(GPIO15_2, AF0)
++#define GPIO16_2_GPIO MFP_CFG(GPIO16_2, AF0)
++#define GPIO17_2_GPIO MFP_CFG(GPIO17_2, AF0)
++
++/* Chip Select */
++#define GPIO4_nCS3 MFP_CFG(GPIO4, AF1)
++
++/* AC97 */
++#define GPIO34_AC97_SYSCLK MFP_CFG(GPIO34, AF1)
++#define GPIO39_AC97_BITCLK MFP_CFG(GPIO39, AF1)
++#define GPIO40_AC97_nACRESET MFP_CFG(GPIO40, AF1)
++#define GPIO35_AC97_SDATA_IN_0 MFP_CFG(GPIO35, AF1)
++#define GPIO36_AC97_SDATA_IN_1 MFP_CFG(GPIO36, AF1)
++#define GPIO32_AC97_SDATA_IN_2 MFP_CFG(GPIO32, AF2)
++#define GPIO33_AC97_SDATA_IN_3 MFP_CFG(GPIO33, AF2)
++#define GPIO11_AC97_SDATA_IN_2 MFP_CFG(GPIO11, AF3)
++#define GPIO12_AC97_SDATA_IN_3 MFP_CFG(GPIO12, AF3)
++#define GPIO37_AC97_SDATA_OUT MFP_CFG(GPIO37, AF1)
++#define GPIO38_AC97_SYNC MFP_CFG(GPIO38, AF1)
++
++/* I2C */
++#define GPIO32_I2C_SCL MFP_CFG_LPM(GPIO32, AF1, PULL_HIGH)
++#define GPIO33_I2C_SDA MFP_CFG_LPM(GPIO33, AF1, PULL_HIGH)
++
++/* QCI */
++#define GPIO49_CI_DD_0 MFP_CFG_DRV(GPIO49, AF1, DS04X)
++#define GPIO50_CI_DD_1 MFP_CFG_DRV(GPIO50, AF1, DS04X)
++#define GPIO51_CI_DD_2 MFP_CFG_DRV(GPIO51, AF1, DS04X)
++#define GPIO52_CI_DD_3 MFP_CFG_DRV(GPIO52, AF1, DS04X)
++#define GPIO53_CI_DD_4 MFP_CFG_DRV(GPIO53, AF1, DS04X)
++#define GPIO54_CI_DD_5 MFP_CFG_DRV(GPIO54, AF1, DS04X)
++#define GPIO55_CI_DD_6 MFP_CFG_DRV(GPIO55, AF1, DS04X)
++#define GPIO56_CI_DD_7 MFP_CFG_DRV(GPIO56, AF0, DS04X)
++#define GPIO57_CI_DD_8 MFP_CFG_DRV(GPIO57, AF1, DS04X)
++#define GPIO58_CI_DD_9 MFP_CFG_DRV(GPIO58, AF1, DS04X)
++#define GPIO59_CI_MCLK MFP_CFG_DRV(GPIO59, AF0, DS04X)
++#define GPIO60_CI_PCLK MFP_CFG_DRV(GPIO60, AF0, DS04X)
++#define GPIO61_CI_HSYNC MFP_CFG_DRV(GPIO61, AF0, DS04X)
++#define GPIO62_CI_VSYNC MFP_CFG_DRV(GPIO62, AF0, DS04X)
++
++#define GPIO31_CIR_OUT MFP_CFG(GPIO31, AF5)
++
++#define GPIO0_2_CLK_EXT MFP_CFG(GPIO0_2, AF3)
++#define GPIO0_DRQ MFP_CFG(GPIO0, AF2)
++#define GPIO11_EXT_SYNC0 MFP_CFG(GPIO11, AF5)
++#define GPIO12_EXT_SYNC1 MFP_CFG(GPIO12, AF6)
++#define GPIO0_2_HZ_CLK MFP_CFG(GPIO0_2, AF1)
++#define GPIO14_HZ_CLK MFP_CFG(GPIO14, AF4)
++#define GPIO30_ICP_RXD MFP_CFG(GPIO30, AF1)
++#define GPIO31_ICP_TXD MFP_CFG(GPIO31, AF1)
++
++#define GPIO83_KP_DKIN_0 MFP_CFG_LPM(GPIO83, AF3, FLOAT)
++#define GPIO84_KP_DKIN_1 MFP_CFG_LPM(GPIO84, AF3, FLOAT)
++#define GPIO85_KP_DKIN_2 MFP_CFG_LPM(GPIO85, AF3, FLOAT)
++#define GPIO86_KP_DKIN_3 MFP_CFG_LPM(GPIO86, AF3, FLOAT)
++
++#define GPIO105_KP_DKIN_0 MFP_CFG_LPM(GPIO105, AF2, FLOAT)
++#define GPIO106_KP_DKIN_1 MFP_CFG_LPM(GPIO106, AF2, FLOAT)
++#define GPIO107_KP_DKIN_2 MFP_CFG_LPM(GPIO107, AF2, FLOAT)
++#define GPIO108_KP_DKIN_3 MFP_CFG_LPM(GPIO108, AF2, FLOAT)
++#define GPIO109_KP_DKIN_4 MFP_CFG_LPM(GPIO109, AF2, FLOAT)
++#define GPIO110_KP_DKIN_5 MFP_CFG_LPM(GPIO110, AF2, FLOAT)
++#define GPIO111_KP_DKIN_6 MFP_CFG_LPM(GPIO111, AF2, FLOAT)
++#define GPIO112_KP_DKIN_7 MFP_CFG_LPM(GPIO112, AF2, FLOAT)
++
++#define GPIO113_KP_DKIN_0 MFP_CFG_LPM(GPIO113, AF2, FLOAT)
++#define GPIO114_KP_DKIN_1 MFP_CFG_LPM(GPIO114, AF2, FLOAT)
++#define GPIO115_KP_DKIN_2 MFP_CFG_LPM(GPIO115, AF2, FLOAT)
++#define GPIO116_KP_DKIN_3 MFP_CFG_LPM(GPIO116, AF2, FLOAT)
++#define GPIO117_KP_DKIN_4 MFP_CFG_LPM(GPIO117, AF2, FLOAT)
++#define GPIO118_KP_DKIN_5 MFP_CFG_LPM(GPIO118, AF2, FLOAT)
++#define GPIO119_KP_DKIN_6 MFP_CFG_LPM(GPIO119, AF2, FLOAT)
++#define GPIO120_KP_DKIN_7 MFP_CFG_LPM(GPIO120, AF2, FLOAT)
++
++#define GPIO127_KP_DKIN_0 MFP_CFG_LPM(GPIO127, AF2, FLOAT)
++#define GPIO126_KP_DKIN_1 MFP_CFG_LPM(GPIO126, AF2, FLOAT)
++
++#define GPIO2_2_KP_DKIN_0 MFP_CFG_LPM(GPIO2_2, AF2, FLOAT)
++#define GPIO3_2_KP_DKIN_1 MFP_CFG_LPM(GPIO3_2, AF2, FLOAT)
++#define GPIO125_KP_DKIN_2 MFP_CFG_LPM(GPIO125, AF2, FLOAT)
++#define GPIO124_KP_DKIN_3 MFP_CFG_LPM(GPIO124, AF2, FLOAT)
++#define GPIO123_KP_DKIN_4 MFP_CFG_LPM(GPIO123, AF2, FLOAT)
++#define GPIO122_KP_DKIN_5 MFP_CFG_LPM(GPIO122, AF2, FLOAT)
++#define GPIO121_KP_DKIN_6 MFP_CFG_LPM(GPIO121, AF2, FLOAT)
++#define GPIO4_2_KP_DKIN_7 MFP_CFG_LPM(GPIO4_2, AF2, FLOAT)
++
++#define GPIO113_KP_MKIN_0 MFP_CFG_LPM(GPIO113, AF1, FLOAT)
++#define GPIO114_KP_MKIN_1 MFP_CFG_LPM(GPIO114, AF1, FLOAT)
++#define GPIO115_KP_MKIN_2 MFP_CFG_LPM(GPIO115, AF1, FLOAT)
++#define GPIO116_KP_MKIN_3 MFP_CFG_LPM(GPIO116, AF1, FLOAT)
++#define GPIO117_KP_MKIN_4 MFP_CFG_LPM(GPIO117, AF1, FLOAT)
++#define GPIO118_KP_MKIN_5 MFP_CFG_LPM(GPIO118, AF1, FLOAT)
++#define GPIO119_KP_MKIN_6 MFP_CFG_LPM(GPIO119, AF1, FLOAT)
++#define GPIO120_KP_MKIN_7 MFP_CFG_LPM(GPIO120, AF1, FLOAT)
++
++#define GPIO83_KP_MKOUT_0 MFP_CFG_LPM(GPIO83, AF2, DRIVE_HIGH)
++#define GPIO84_KP_MKOUT_1 MFP_CFG_LPM(GPIO84, AF2, DRIVE_HIGH)
++#define GPIO85_KP_MKOUT_2 MFP_CFG_LPM(GPIO85, AF2, DRIVE_HIGH)
++#define GPIO86_KP_MKOUT_3 MFP_CFG_LPM(GPIO86, AF2, DRIVE_HIGH)
++#define GPIO13_KP_MKOUT_4 MFP_CFG_LPM(GPIO13, AF3, DRIVE_HIGH)
++#define GPIO14_KP_MKOUT_5 MFP_CFG_LPM(GPIO14, AF3, DRIVE_HIGH)
++
++#define GPIO121_KP_MKOUT_0 MFP_CFG_LPM(GPIO121, AF1, DRIVE_HIGH)
++#define GPIO122_KP_MKOUT_1 MFP_CFG_LPM(GPIO122, AF1, DRIVE_HIGH)
++#define GPIO123_KP_MKOUT_2 MFP_CFG_LPM(GPIO123, AF1, DRIVE_HIGH)
++#define GPIO124_KP_MKOUT_3 MFP_CFG_LPM(GPIO124, AF1, DRIVE_HIGH)
++#define GPIO125_KP_MKOUT_4 MFP_CFG_LPM(GPIO125, AF1, DRIVE_HIGH)
++#define GPIO126_KP_MKOUT_5 MFP_CFG_LPM(GPIO126, AF1, DRIVE_HIGH)
++#define GPIO127_KP_MKOUT_6 MFP_CFG_LPM(GPIO127, AF1, DRIVE_HIGH)
++#define GPIO5_2_KP_MKOUT_7 MFP_CFG_LPM(GPIO5_2, AF1, DRIVE_HIGH)
++
++/* LCD */
++#define GPIO6_2_LCD_LDD_0 MFP_CFG_DRV(GPIO6_2, AF1, DS01X)
++#define GPIO7_2_LCD_LDD_1 MFP_CFG_DRV(GPIO7_2, AF1, DS01X)
++#define GPIO8_2_LCD_LDD_2 MFP_CFG_DRV(GPIO8_2, AF1, DS01X)
++#define GPIO9_2_LCD_LDD_3 MFP_CFG_DRV(GPIO9_2, AF1, DS01X)
++#define GPIO10_2_LCD_LDD_4 MFP_CFG_DRV(GPIO10_2, AF1, DS01X)
++#define GPIO11_2_LCD_LDD_5 MFP_CFG_DRV(GPIO11_2, AF1, DS01X)
++#define GPIO12_2_LCD_LDD_6 MFP_CFG_DRV(GPIO12_2, AF1, DS01X)
++#define GPIO13_2_LCD_LDD_7 MFP_CFG_DRV(GPIO13_2, AF1, DS01X)
++#define GPIO63_LCD_LDD_8 MFP_CFG_DRV(GPIO63, AF1, DS01X)
++#define GPIO64_LCD_LDD_9 MFP_CFG_DRV(GPIO64, AF1, DS01X)
++#define GPIO65_LCD_LDD_10 MFP_CFG_DRV(GPIO65, AF1, DS01X)
++#define GPIO66_LCD_LDD_11 MFP_CFG_DRV(GPIO66, AF1, DS01X)
++#define GPIO67_LCD_LDD_12 MFP_CFG_DRV(GPIO67, AF1, DS01X)
++#define GPIO68_LCD_LDD_13 MFP_CFG_DRV(GPIO68, AF1, DS01X)
++#define GPIO69_LCD_LDD_14 MFP_CFG_DRV(GPIO69, AF1, DS01X)
++#define GPIO70_LCD_LDD_15 MFP_CFG_DRV(GPIO70, AF1, DS01X)
++#define GPIO71_LCD_LDD_16 MFP_CFG_DRV(GPIO71, AF1, DS01X)
++#define GPIO72_LCD_LDD_17 MFP_CFG_DRV(GPIO72, AF1, DS01X)
++#define GPIO73_LCD_CS_N MFP_CFG_DRV(GPIO73, AF2, DS01X)
++#define GPIO74_LCD_VSYNC MFP_CFG_DRV(GPIO74, AF2, DS01X)
++#define GPIO14_2_LCD_FCLK MFP_CFG_DRV(GPIO14_2, AF1, DS01X)
++#define GPIO15_2_LCD_LCLK MFP_CFG_DRV(GPIO15_2, AF1, DS01X)
++#define GPIO16_2_LCD_PCLK MFP_CFG_DRV(GPIO16_2, AF1, DS01X)
++#define GPIO17_2_LCD_BIAS MFP_CFG_DRV(GPIO17_2, AF1, DS01X)
++#define GPIO64_LCD_VSYNC MFP_CFG_DRV(GPIO64, AF2, DS01X)
++#define GPIO63_LCD_CS_N MFP_CFG_DRV(GPIO63, AF2, DS01X)
++
++#define GPIO6_2_MLCD_DD_0 MFP_CFG_DRV(GPIO6_2, AF7, DS08X)
++#define GPIO7_2_MLCD_DD_1 MFP_CFG_DRV(GPIO7_2, AF7, DS08X)
++#define GPIO8_2_MLCD_DD_2 MFP_CFG_DRV(GPIO8_2, AF7, DS08X)
++#define GPIO9_2_MLCD_DD_3 MFP_CFG_DRV(GPIO9_2, AF7, DS08X)
++#define GPIO10_2_MLCD_DD_4 MFP_CFG_DRV(GPIO10_2, AF7, DS08X)
++#define GPIO11_2_MLCD_DD_5 MFP_CFG_DRV(GPIO11_2, AF7, DS08X)
++#define GPIO12_2_MLCD_DD_6 MFP_CFG_DRV(GPIO12_2, AF7, DS08X)
++#define GPIO13_2_MLCD_DD_7 MFP_CFG_DRV(GPIO13_2, AF7, DS08X)
++#define GPIO63_MLCD_DD_8 MFP_CFG_DRV(GPIO63, AF7, DS08X)
++#define GPIO64_MLCD_DD_9 MFP_CFG_DRV(GPIO64, AF7, DS08X)
++#define GPIO65_MLCD_DD_10 MFP_CFG_DRV(GPIO65, AF7, DS08X)
++#define GPIO66_MLCD_DD_11 MFP_CFG_DRV(GPIO66, AF7, DS08X)
++#define GPIO67_MLCD_DD_12 MFP_CFG_DRV(GPIO67, AF7, DS08X)
++#define GPIO68_MLCD_DD_13 MFP_CFG_DRV(GPIO68, AF7, DS08X)
++#define GPIO69_MLCD_DD_14 MFP_CFG_DRV(GPIO69, AF7, DS08X)
++#define GPIO70_MLCD_DD_15 MFP_CFG_DRV(GPIO70, AF7, DS08X)
++#define GPIO71_MLCD_DD_16 MFP_CFG_DRV(GPIO71, AF7, DS08X)
++#define GPIO72_MLCD_DD_17 MFP_CFG_DRV(GPIO72, AF7, DS08X)
++#define GPIO73_MLCD_CS MFP_CFG_DRV(GPIO73, AF7, DS08X)
++#define GPIO74_MLCD_VSYNC MFP_CFG_DRV(GPIO74, AF7, DS08X)
++#define GPIO14_2_MLCD_FCLK MFP_CFG_DRV(GPIO14_2, AF7, DS08X)
++#define GPIO15_2_MLCD_LCLK MFP_CFG_DRV(GPIO15_2, AF7, DS08X)
++#define GPIO16_2_MLCD_PCLK MFP_CFG_DRV(GPIO16_2, AF7, DS08X)
++#define GPIO17_2_MLCD_BIAS MFP_CFG_DRV(GPIO17_2, AF7, DS08X)
++
++/* MMC1 */
++#define GPIO9_MMC1_CMD MFP_CFG_LPM(GPIO9, AF4, DRIVE_HIGH)
++#define GPIO22_MMC1_CLK MFP_CFG_LPM(GPIO22, AF4, DRIVE_HIGH)
++#define GPIO23_MMC1_CMD MFP_CFG_LPM(GPIO23, AF4, DRIVE_HIGH)
++#define GPIO30_MMC1_CLK MFP_CFG_LPM(GPIO30, AF4, DRIVE_HIGH)
++#define GPIO31_MMC1_CMD MFP_CFG_LPM(GPIO31, AF4, DRIVE_HIGH)
++#define GPIO5_MMC1_DAT0 MFP_CFG_LPM(GPIO5, AF4, DRIVE_HIGH)
++#define GPIO6_MMC1_DAT1 MFP_CFG_LPM(GPIO6, AF4, DRIVE_HIGH)
++#define GPIO7_MMC1_DAT2 MFP_CFG_LPM(GPIO7, AF4, DRIVE_HIGH)
++#define GPIO8_MMC1_DAT3 MFP_CFG_LPM(GPIO8, AF4, DRIVE_HIGH)
++#define GPIO18_MMC1_DAT0 MFP_CFG_LPM(GPIO18, AF4, DRIVE_HIGH)
++#define GPIO19_MMC1_DAT1 MFP_CFG_LPM(GPIO19, AF4, DRIVE_HIGH)
++#define GPIO20_MMC1_DAT2 MFP_CFG_LPM(GPIO20, AF4, DRIVE_HIGH)
++#define GPIO21_MMC1_DAT3 MFP_CFG_LPM(GPIO21, AF4, DRIVE_HIGH)
++
++#define GPIO28_MMC2_CLK MFP_CFG_LPM(GPIO28, AF4, PULL_HIGH)
++#define GPIO29_MMC2_CMD MFP_CFG_LPM(GPIO29, AF4, PULL_HIGH)
++#define GPIO30_MMC2_CLK MFP_CFG_LPM(GPIO30, AF3, PULL_HIGH)
++#define GPIO31_MMC2_CMD MFP_CFG_LPM(GPIO31, AF3, PULL_HIGH)
++#define GPIO79_MMC2_CLK MFP_CFG_LPM(GPIO79, AF4, PULL_HIGH)
++#define GPIO80_MMC2_CMD MFP_CFG_LPM(GPIO80, AF4, PULL_HIGH)
++
++#define GPIO5_MMC2_DAT0 MFP_CFG_LPM(GPIO5, AF2, PULL_HIGH)
++#define GPIO6_MMC2_DAT1 MFP_CFG_LPM(GPIO6, AF2, PULL_HIGH)
++#define GPIO7_MMC2_DAT2 MFP_CFG_LPM(GPIO7, AF2, PULL_HIGH)
++#define GPIO8_MMC2_DAT3 MFP_CFG_LPM(GPIO8, AF2, PULL_HIGH)
++#define GPIO24_MMC2_DAT0 MFP_CFG_LPM(GPIO24, AF4, PULL_HIGH)
++#define GPIO75_MMC2_DAT0 MFP_CFG_LPM(GPIO75, AF4, PULL_HIGH)
++#define GPIO25_MMC2_DAT1 MFP_CFG_LPM(GPIO25, AF4, PULL_HIGH)
++#define GPIO76_MMC2_DAT1 MFP_CFG_LPM(GPIO76, AF4, PULL_HIGH)
++#define GPIO26_MMC2_DAT2 MFP_CFG_LPM(GPIO26, AF4, PULL_HIGH)
++#define GPIO77_MMC2_DAT2 MFP_CFG_LPM(GPIO77, AF4, PULL_HIGH)
++#define GPIO27_MMC2_DAT3 MFP_CFG_LPM(GPIO27, AF4, PULL_HIGH)
++#define GPIO78_MMC2_DAT3 MFP_CFG_LPM(GPIO78, AF4, PULL_HIGH)
++
++/* 1-Wire */
++#define GPIO14_ONE_WIRE MFP_CFG_LPM(GPIO14, AF5, FLOAT)
++#define GPIO0_2_ONE_WIRE MFP_CFG_LPM(GPIO0_2, AF2, FLOAT)
++
++/* SSP1 */
++#define GPIO87_SSP1_EXTCLK MFP_CFG(GPIO87, AF1)
++#define GPIO88_SSP1_SYSCLK MFP_CFG(GPIO88, AF1)
++#define GPIO83_SSP1_SCLK MFP_CFG(GPIO83, AF1)
++#define GPIO84_SSP1_SFRM MFP_CFG(GPIO84, AF1)
++#define GPIO85_SSP1_RXD MFP_CFG(GPIO85, AF6)
++#define GPIO85_SSP1_TXD MFP_CFG(GPIO85, AF1)
++#define GPIO86_SSP1_RXD MFP_CFG(GPIO86, AF1)
++#define GPIO86_SSP1_TXD MFP_CFG(GPIO86, AF6)
++
++/* SSP2 */
++#define GPIO39_SSP2_EXTCLK MFP_CFG(GPIO39, AF2)
++#define GPIO40_SSP2_SYSCLK MFP_CFG(GPIO40, AF2)
++#define GPIO12_SSP2_SCLK MFP_CFG(GPIO12, AF2)
++#define GPIO35_SSP2_SCLK MFP_CFG(GPIO35, AF2)
++#define GPIO36_SSP2_SFRM MFP_CFG(GPIO36, AF2)
++#define GPIO37_SSP2_RXD MFP_CFG(GPIO37, AF5)
++#define GPIO37_SSP2_TXD MFP_CFG(GPIO37, AF2)
++#define GPIO38_SSP2_RXD MFP_CFG(GPIO38, AF2)
++#define GPIO38_SSP2_TXD MFP_CFG(GPIO38, AF5)
++
++#define GPIO69_SSP3_SCLK MFP_CFG(GPIO69, AF2, DS08X, FLOAT)
++#define GPIO70_SSP3_FRM MFP_CFG(GPIO70, AF2, DS08X, DRIVE_LOW)
++#define GPIO89_SSP3_SCLK MFP_CFG(GPIO89, AF1, DS08X, FLOAT)
++#define GPIO90_SSP3_FRM MFP_CFG(GPIO90, AF1, DS08X, DRIVE_LOW)
++#define GPIO71_SSP3_RXD MFP_CFG_X(GPIO71, AF5, DS08X, FLOAT)
++#define GPIO71_SSP3_TXD MFP_CFG_X(GPIO71, AF2, DS08X, DRIVE_LOW)
++#define GPIO72_SSP3_RXD MFP_CFG_X(GPIO72, AF2, DS08X, FLOAT)
++#define GPIO72_SSP3_TXD MFP_CFG_X(GPIO72, AF5, DS08X, DRIVE_LOW)
++#define GPIO91_SSP3_RXD MFP_CFG_X(GPIO91, AF5, DS08X, FLOAT)
++#define GPIO91_SSP3_TXD MFP_CFG_X(GPIO91, AF1, DS08X, DRIVE_LOW)
++#define GPIO92_SSP3_RXD MFP_CFG_X(GPIO92, AF1, DS08X, FLOAT)
++#define GPIO92_SSP3_TXD MFP_CFG_X(GPIO92, AF5, DS08X, DRIVE_LOW)
++
++#define GPIO93_SSP4_SCLK MFP_CFG_LPM(GPIO93, AF1, PULL_HIGH)
++#define GPIO94_SSP4_FRM MFP_CFG_LPM(GPIO94, AF1, PULL_HIGH)
++#define GPIO94_SSP4_RXD MFP_CFG_LPM(GPIO94, AF5, PULL_HIGH)
++#define GPIO95_SSP4_RXD MFP_CFG_LPM(GPIO95, AF5, PULL_HIGH)
++#define GPIO95_SSP4_TXD MFP_CFG_LPM(GPIO95, AF1, PULL_HIGH)
++#define GPIO96_SSP4_RXD MFP_CFG_LPM(GPIO96, AF1, PULL_HIGH)
++#define GPIO96_SSP4_TXD MFP_CFG_LPM(GPIO96, AF5, PULL_HIGH)
++
++/* UART1 */
++#define GPIO41_UART1_RXD MFP_CFG_LPM(GPIO41, AF2, FLOAT)
++#define GPIO41_UART1_TXD MFP_CFG_LPM(GPIO41, AF4, FLOAT)
++#define GPIO42_UART1_RXD MFP_CFG_LPM(GPIO42, AF4, FLOAT)
++#define GPIO42_UART1_TXD MFP_CFG_LPM(GPIO42, AF2, FLOAT)
++#define GPIO97_UART1_RXD MFP_CFG_LPM(GPIO97, AF1, FLOAT)
++#define GPIO97_UART1_TXD MFP_CFG_LPM(GPIO97, AF6, FLOAT)
++#define GPIO98_UART1_RXD MFP_CFG_LPM(GPIO98, AF6, FLOAT)
++#define GPIO98_UART1_TXD MFP_CFG_LPM(GPIO98, AF1, FLOAT)
++#define GPIO43_UART1_CTS MFP_CFG_LPM(GPIO43, AF2, FLOAT)
++#define GPIO43_UART1_RTS MFP_CFG_LPM(GPIO43, AF4, FLOAT)
++#define GPIO48_UART1_CTS MFP_CFG_LPM(GPIO48, AF4, FLOAT)
++#define GPIO48_UART1_RTS MFP_CFG_LPM(GPIO48, AF2, FLOAT)
++#define GPIO99_UART1_CTS MFP_CFG_LPM(GPIO99, AF1, FLOAT)
++#define GPIO99_UART1_RTS MFP_CFG_LPM(GPIO99, AF6, FLOAT)
++#define GPIO104_UART1_CTS MFP_CFG_LPM(GPIO104, AF6, FLOAT)
++#define GPIO104_UART1_RTS MFP_CFG_LPM(GPIO104, AF1, FLOAT)
++#define GPIO45_UART1_DTR MFP_CFG_LPM(GPIO45, AF4, FLOAT)
++#define GPIO45_UART1_DSR MFP_CFG_LPM(GPIO45, AF2, FLOAT)
++#define GPIO47_UART1_DTR MFP_CFG_LPM(GPIO47, AF2, FLOAT)
++#define GPIO47_UART1_DSR MFP_CFG_LPM(GPIO47, AF4, FLOAT)
++#define GPIO101_UART1_DTR MFP_CFG_LPM(GPIO101, AF6, FLOAT)
++#define GPIO101_UART1_DSR MFP_CFG_LPM(GPIO101, AF1, FLOAT)
++#define GPIO103_UART1_DTR MFP_CFG_LPM(GPIO103, AF1, FLOAT)
++#define GPIO103_UART1_DSR MFP_CFG_LPM(GPIO103, AF6, FLOAT)
++#define GPIO44_UART1_DCD MFP_CFG_LPM(GPIO44, AF2, FLOAT)
++#define GPIO100_UART1_DCD MFP_CFG_LPM(GPIO100, AF1, FLOAT)
++#define GPIO46_UART1_RI MFP_CFG_LPM(GPIO46, AF2, FLOAT)
++#define GPIO102_UART1_RI MFP_CFG_LPM(GPIO102, AF1, FLOAT)
++
++/* UART2 */
++#define GPIO109_UART2_CTS MFP_CFG_LPM(GPIO109, AF3, FLOAT)
++#define GPIO109_UART2_RTS MFP_CFG_LPM(GPIO109, AF1, FLOAT)
++#define GPIO112_UART2_CTS MFP_CFG_LPM(GPIO112, AF1, FLOAT)
++#define GPIO112_UART2_RTS MFP_CFG_LPM(GPIO112, AF3, FLOAT)
++#define GPIO110_UART2_RXD MFP_CFG_LPM(GPIO110, AF1, FLOAT)
++#define GPIO110_UART2_TXD MFP_CFG_LPM(GPIO110, AF3, FLOAT)
++#define GPIO111_UART2_RXD MFP_CFG_LPM(GPIO111, AF3, FLOAT)
++#define GPIO111_UART2_TXD MFP_CFG_LPM(GPIO111, AF1, FLOAT)
++
++/* UART3 */
++#define GPIO89_UART3_CTS MFP_CFG_LPM(GPIO89, AF2, FLOAT)
++#define GPIO89_UART3_RTS MFP_CFG_LPM(GPIO89, AF4, FLOAT)
++#define GPIO90_UART3_CTS MFP_CFG_LPM(GPIO90, AF4, FLOAT)
++#define GPIO90_UART3_RTS MFP_CFG_LPM(GPIO90, AF2, FLOAT)
++#define GPIO105_UART3_CTS MFP_CFG_LPM(GPIO105, AF1, FLOAT)
++#define GPIO105_UART3_RTS MFP_CFG_LPM(GPIO105, AF3, FLOAT)
++#define GPIO106_UART3_CTS MFP_CFG_LPM(GPIO106, AF3, FLOAT)
++#define GPIO106_UART3_RTS MFP_CFG_LPM(GPIO106, AF1, FLOAT)
++#define GPIO30_UART3_RXD MFP_CFG_LPM(GPIO30, AF2, FLOAT)
++#define GPIO30_UART3_TXD MFP_CFG_LPM(GPIO30, AF6, FLOAT)
++#define GPIO31_UART3_RXD MFP_CFG_LPM(GPIO31, AF6, FLOAT)
++#define GPIO31_UART3_TXD MFP_CFG_LPM(GPIO31, AF2, FLOAT)
++#define GPIO91_UART3_RXD MFP_CFG_LPM(GPIO91, AF4, FLOAT)
++#define GPIO91_UART3_TXD MFP_CFG_LPM(GPIO91, AF2, FLOAT)
++#define GPIO92_UART3_RXD MFP_CFG_LPM(GPIO92, AF2, FLOAT)
++#define GPIO92_UART3_TXD MFP_CFG_LPM(GPIO92, AF4, FLOAT)
++#define GPIO107_UART3_RXD MFP_CFG_LPM(GPIO107, AF3, FLOAT)
++#define GPIO107_UART3_TXD MFP_CFG_LPM(GPIO107, AF1, FLOAT)
++#define GPIO108_UART3_RXD MFP_CFG_LPM(GPIO108, AF1, FLOAT)
++#define GPIO108_UART3_TXD MFP_CFG_LPM(GPIO108, AF3, FLOAT)
++
++
++/* USB 2.0 UTMI */
++#define GPIO10_UTM_CLK MFP_CFG(GPIO10, AF1)
++#define GPIO36_U2D_RXERROR MFP_CFG(GPIO36, AF3)
++#define GPIO60_U2D_RXERROR MFP_CFG(GPIO60, AF1)
++#define GPIO87_U2D_RXERROR MFP_CFG(GPIO87, AF5)
++#define GPIO34_UTM_RXVALID MFP_CFG(GPIO34, AF3)
++#define GPIO58_UTM_RXVALID MFP_CFG(GPIO58, AF2)
++#define GPIO85_UTM_RXVALID MFP_CFG(GPIO85, AF5)
++#define GPIO35_UTM_RXACTIVE MFP_CFG(GPIO35, AF3)
++#define GPIO59_UTM_RXACTIVE MFP_CFG(GPIO59, AF1)
++#define GPIO86_UTM_RXACTIVE MFP_CFG(GPIO86, AF5)
++#define GPIO73_UTM_TXREADY MFP_CFG(GPIO73, AF1)
++#define GPIO68_UTM_LINESTATE_0 MFP_CFG(GPIO68, AF3)
++#define GPIO90_UTM_LINESTATE_0 MFP_CFG(GPIO90, AF3)
++#define GPIO102_UTM_LINESTATE_0 MFP_CFG(GPIO102, AF3)
++#define GPIO107_UTM_LINESTATE_0 MFP_CFG(GPIO107, AF4)
++#define GPIO69_UTM_LINESTATE_1 MFP_CFG(GPIO69, AF3)
++#define GPIO91_UTM_LINESTATE_1 MFP_CFG(GPIO91, AF3)
++#define GPIO103_UTM_LINESTATE_1 MFP_CFG(GPIO103, AF3)
++
++#define GPIO41_U2D_PHYDATA_0 MFP_CFG(GPIO41, AF3)
++#define GPIO42_U2D_PHYDATA_1 MFP_CFG(GPIO42, AF3)
++#define GPIO43_U2D_PHYDATA_2 MFP_CFG(GPIO43, AF3)
++#define GPIO44_U2D_PHYDATA_3 MFP_CFG(GPIO44, AF3)
++#define GPIO45_U2D_PHYDATA_4 MFP_CFG(GPIO45, AF3)
++#define GPIO46_U2D_PHYDATA_5 MFP_CFG(GPIO46, AF3)
++#define GPIO47_U2D_PHYDATA_6 MFP_CFG(GPIO47, AF3)
++#define GPIO48_U2D_PHYDATA_7 MFP_CFG(GPIO48, AF3)
++
++#define GPIO49_U2D_PHYDATA_0 MFP_CFG(GPIO49, AF3)
++#define GPIO50_U2D_PHYDATA_1 MFP_CFG(GPIO50, AF3)
++#define GPIO51_U2D_PHYDATA_2 MFP_CFG(GPIO51, AF3)
++#define GPIO52_U2D_PHYDATA_3 MFP_CFG(GPIO52, AF3)
++#define GPIO53_U2D_PHYDATA_4 MFP_CFG(GPIO53, AF3)
++#define GPIO54_U2D_PHYDATA_5 MFP_CFG(GPIO54, AF3)
++#define GPIO55_U2D_PHYDATA_6 MFP_CFG(GPIO55, AF3)
++#define GPIO56_U2D_PHYDATA_7 MFP_CFG(GPIO56, AF3)
++
++#define GPIO37_U2D_OPMODE0 MFP_CFG(GPIO37, AF4)
++#define GPIO61_U2D_OPMODE0 MFP_CFG(GPIO61, AF2)
++#define GPIO88_U2D_OPMODE0 MFP_CFG(GPIO88, AF7)
++
++#define GPIO38_U2D_OPMODE1 MFP_CFG(GPIO38, AF4)
++#define GPIO62_U2D_OPMODE1 MFP_CFG(GPIO62, AF2)
++#define GPIO104_U2D_OPMODE1 MFP_CFG(GPIO104, AF4)
++#define GPIO108_U2D_OPMODE1 MFP_CFG(GPIO108, AF5)
++
++#define GPIO74_U2D_RESET MFP_CFG(GPIO74, AF1)
++#define GPIO93_U2D_RESET MFP_CFG(GPIO93, AF2)
++#define GPIO98_U2D_RESET MFP_CFG(GPIO98, AF3)
++
++#define GPIO67_U2D_SUSPEND MFP_CFG(GPIO67, AF3)
++#define GPIO96_U2D_SUSPEND MFP_CFG(GPIO96, AF2)
++#define GPIO101_U2D_SUSPEND MFP_CFG(GPIO101, AF3)
++
++#define GPIO66_U2D_TERM_SEL MFP_CFG(GPIO66, AF5)
++#define GPIO95_U2D_TERM_SEL MFP_CFG(GPIO95, AF3)
++#define GPIO97_U2D_TERM_SEL MFP_CFG(GPIO97, AF7)
++#define GPIO100_U2D_TERM_SEL MFP_CFG(GPIO100, AF5)
++
++#define GPIO39_U2D_TXVALID MFP_CFG(GPIO39, AF4)
++#define GPIO70_U2D_TXVALID MFP_CFG(GPIO70, AF5)
++#define GPIO83_U2D_TXVALID MFP_CFG(GPIO83, AF7)
++
++#define GPIO65_U2D_XCVR_SEL MFP_CFG(GPIO65, AF5)
++#define GPIO94_U2D_XCVR_SEL MFP_CFG(GPIO94, AF3)
++#define GPIO99_U2D_XCVR_SEL MFP_CFG(GPIO99, AF5)
++
++/* USB Host 1.1 */
++#define GPIO2_2_USBH_PEN MFP_CFG(GPIO2_2, AF1)
++#define GPIO3_2_USBH_PWR MFP_CFG(GPIO3_2, AF1)
++
++/* USB P2 */
++#define GPIO97_USB_P2_2 MFP_CFG(GPIO97, AF2)
++#define GPIO97_USB_P2_6 MFP_CFG(GPIO97, AF4)
++#define GPIO98_USB_P2_2 MFP_CFG(GPIO98, AF4)
++#define GPIO98_USB_P2_6 MFP_CFG(GPIO98, AF2)
++#define GPIO99_USB_P2_1 MFP_CFG(GPIO99, AF2)
++#define GPIO100_USB_P2_4 MFP_CFG(GPIO100, AF2)
++#define GPIO101_USB_P2_8 MFP_CFG(GPIO101, AF2)
++#define GPIO102_USB_P2_3 MFP_CFG(GPIO102, AF2)
++#define GPIO103_USB_P2_5 MFP_CFG(GPIO103, AF2)
++#define GPIO104_USB_P2_7 MFP_CFG(GPIO104, AF2)
++
++/* USB P3 */
++#define GPIO75_USB_P3_1 MFP_CFG(GPIO75, AF2)
++#define GPIO76_USB_P3_2 MFP_CFG(GPIO76, AF2)
++#define GPIO77_USB_P3_3 MFP_CFG(GPIO77, AF2)
++#define GPIO78_USB_P3_4 MFP_CFG(GPIO78, AF2)
++#define GPIO79_USB_P3_5 MFP_CFG(GPIO79, AF2)
++#define GPIO80_USB_P3_6 MFP_CFG(GPIO80, AF2)
++
++#define GPIO13_CHOUT0 MFP_CFG(GPIO13, AF6)
++#define GPIO14_CHOUT1 MFP_CFG(GPIO14, AF6)
++
++#define GPIO2_RDY MFP_CFG(GPIO2, AF1)
++#define GPIO5_NPIOR MFP_CFG(GPIO5, AF3)
++
++#define GPIO11_PWM0_OUT MFP_CFG(GPIO11, AF1)
++#define GPIO12_PWM1_OUT MFP_CFG(GPIO12, AF1)
++#define GPIO13_PWM2_OUT MFP_CFG(GPIO13, AF1)
++#define GPIO14_PWM3_OUT MFP_CFG(GPIO14, AF1)
++
++#endif /* __ASM_ARCH_MFP_PXA320_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/mfp-pxa3xx.h linux-2.6.25-rc4/include/asm-arm/arch/mfp-pxa3xx.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/mfp-pxa3xx.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/mfp-pxa3xx.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,252 @@
++#ifndef __ASM_ARCH_MFP_PXA3XX_H
++#define __ASM_ARCH_MFP_PXA3XX_H
++
++#define MFPR_BASE (0x40e10000)
++#define MFPR_SIZE (PAGE_SIZE)
++
++/* MFPR register bit definitions */
++#define MFPR_PULL_SEL (0x1 << 15)
++#define MFPR_PULLUP_EN (0x1 << 14)
++#define MFPR_PULLDOWN_EN (0x1 << 13)
++#define MFPR_SLEEP_SEL (0x1 << 9)
++#define MFPR_SLEEP_OE_N (0x1 << 7)
++#define MFPR_EDGE_CLEAR (0x1 << 6)
++#define MFPR_EDGE_FALL_EN (0x1 << 5)
++#define MFPR_EDGE_RISE_EN (0x1 << 4)
++
++#define MFPR_SLEEP_DATA(x) ((x) << 8)
++#define MFPR_DRIVE(x) (((x) & 0x7) << 10)
++#define MFPR_AF_SEL(x) (((x) & 0x7) << 0)
++
++#define MFPR_EDGE_NONE (0)
++#define MFPR_EDGE_RISE (MFPR_EDGE_RISE_EN)
++#define MFPR_EDGE_FALL (MFPR_EDGE_FALL_EN)
++#define MFPR_EDGE_BOTH (MFPR_EDGE_RISE | MFPR_EDGE_FALL)
++
++/*
++ * Table that determines the low power modes outputs, with actual settings
++ * used in parentheses for don't-care values. Except for the float output,
++ * the configured driven and pulled levels match, so if there is a need for
++ * non-LPM pulled output, the same configuration could probably be used.
++ *
++ * Output value sleep_oe_n sleep_data pullup_en pulldown_en pull_sel
++ * (bit 7) (bit 8) (bit 14) (bit 13) (bit 15)
++ *
++ * Input 0 X(0) X(0) X(0) 0
++ * Drive 0 0 0 0 X(1) 0
++ * Drive 1 0 1 X(1) 0 0
++ * Pull hi (1) 1 X(1) 1 0 0
++ * Pull lo (0) 1 X(0) 0 1 0
++ * Z (float) 1 X(0) 0 0 0
++ */
++#define MFPR_LPM_INPUT (0)
++#define MFPR_LPM_DRIVE_LOW (MFPR_SLEEP_DATA(0) | MFPR_PULLDOWN_EN)
++#define MFPR_LPM_DRIVE_HIGH (MFPR_SLEEP_DATA(1) | MFPR_PULLUP_EN)
++#define MFPR_LPM_PULL_LOW (MFPR_LPM_DRIVE_LOW | MFPR_SLEEP_OE_N)
++#define MFPR_LPM_PULL_HIGH (MFPR_LPM_DRIVE_HIGH | MFPR_SLEEP_OE_N)
++#define MFPR_LPM_FLOAT (MFPR_SLEEP_OE_N)
++#define MFPR_LPM_MASK (0xe080)
++
++/*
++ * The pullup and pulldown state of the MFP pin at run mode is by default
++ * determined by the selected alternate function. In case that some buggy
++ * devices need to override this default behavior, the definitions below
++ * indicates the setting of corresponding MFPR bits
++ *
++ * Definition pull_sel pullup_en pulldown_en
++ * MFPR_PULL_NONE 0 0 0
++ * MFPR_PULL_LOW 1 0 1
++ * MFPR_PULL_HIGH 1 1 0
++ * MFPR_PULL_BOTH 1 1 1
++ */
++#define MFPR_PULL_NONE (0)
++#define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN)
++#define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN)
++#define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN)
++
++/* PXA3xx common MFP configurations - processor specific ones defined
++ * in mfp-pxa300.h and mfp-pxa320.h
++ */
++#define GPIO0_GPIO MFP_CFG(GPIO0, AF0)
++#define GPIO1_GPIO MFP_CFG(GPIO1, AF0)
++#define GPIO2_GPIO MFP_CFG(GPIO2, AF0)
++#define GPIO3_GPIO MFP_CFG(GPIO3, AF0)
++#define GPIO4_GPIO MFP_CFG(GPIO4, AF0)
++#define GPIO5_GPIO MFP_CFG(GPIO5, AF0)
++#define GPIO6_GPIO MFP_CFG(GPIO6, AF0)
++#define GPIO7_GPIO MFP_CFG(GPIO7, AF0)
++#define GPIO8_GPIO MFP_CFG(GPIO8, AF0)
++#define GPIO9_GPIO MFP_CFG(GPIO9, AF0)
++#define GPIO10_GPIO MFP_CFG(GPIO10, AF0)
++#define GPIO11_GPIO MFP_CFG(GPIO11, AF0)
++#define GPIO12_GPIO MFP_CFG(GPIO12, AF0)
++#define GPIO13_GPIO MFP_CFG(GPIO13, AF0)
++#define GPIO14_GPIO MFP_CFG(GPIO14, AF0)
++#define GPIO15_GPIO MFP_CFG(GPIO15, AF0)
++#define GPIO16_GPIO MFP_CFG(GPIO16, AF0)
++#define GPIO17_GPIO MFP_CFG(GPIO17, AF0)
++#define GPIO18_GPIO MFP_CFG(GPIO18, AF0)
++#define GPIO19_GPIO MFP_CFG(GPIO19, AF0)
++#define GPIO20_GPIO MFP_CFG(GPIO20, AF0)
++#define GPIO21_GPIO MFP_CFG(GPIO21, AF0)
++#define GPIO22_GPIO MFP_CFG(GPIO22, AF0)
++#define GPIO23_GPIO MFP_CFG(GPIO23, AF0)
++#define GPIO24_GPIO MFP_CFG(GPIO24, AF0)
++#define GPIO25_GPIO MFP_CFG(GPIO25, AF0)
++#define GPIO26_GPIO MFP_CFG(GPIO26, AF0)
++#define GPIO27_GPIO MFP_CFG(GPIO27, AF0)
++#define GPIO28_GPIO MFP_CFG(GPIO28, AF0)
++#define GPIO29_GPIO MFP_CFG(GPIO29, AF0)
++#define GPIO30_GPIO MFP_CFG(GPIO30, AF0)
++#define GPIO31_GPIO MFP_CFG(GPIO31, AF0)
++#define GPIO32_GPIO MFP_CFG(GPIO32, AF0)
++#define GPIO33_GPIO MFP_CFG(GPIO33, AF0)
++#define GPIO34_GPIO MFP_CFG(GPIO34, AF0)
++#define GPIO35_GPIO MFP_CFG(GPIO35, AF0)
++#define GPIO36_GPIO MFP_CFG(GPIO36, AF0)
++#define GPIO37_GPIO MFP_CFG(GPIO37, AF0)
++#define GPIO38_GPIO MFP_CFG(GPIO38, AF0)
++#define GPIO39_GPIO MFP_CFG(GPIO39, AF0)
++#define GPIO40_GPIO MFP_CFG(GPIO40, AF0)
++#define GPIO41_GPIO MFP_CFG(GPIO41, AF0)
++#define GPIO42_GPIO MFP_CFG(GPIO42, AF0)
++#define GPIO43_GPIO MFP_CFG(GPIO43, AF0)
++#define GPIO44_GPIO MFP_CFG(GPIO44, AF0)
++#define GPIO45_GPIO MFP_CFG(GPIO45, AF0)
++
++#define GPIO47_GPIO MFP_CFG(GPIO47, AF0)
++#define GPIO48_GPIO MFP_CFG(GPIO48, AF0)
++
++#define GPIO53_GPIO MFP_CFG(GPIO53, AF0)
++#define GPIO54_GPIO MFP_CFG(GPIO54, AF0)
++#define GPIO55_GPIO MFP_CFG(GPIO55, AF0)
++
++#define GPIO57_GPIO MFP_CFG(GPIO57, AF0)
++
++#define GPIO63_GPIO MFP_CFG(GPIO63, AF0)
++#define GPIO64_GPIO MFP_CFG(GPIO64, AF0)
++#define GPIO65_GPIO MFP_CFG(GPIO65, AF0)
++#define GPIO66_GPIO MFP_CFG(GPIO66, AF0)
++#define GPIO67_GPIO MFP_CFG(GPIO67, AF0)
++#define GPIO68_GPIO MFP_CFG(GPIO68, AF0)
++#define GPIO69_GPIO MFP_CFG(GPIO69, AF0)
++#define GPIO70_GPIO MFP_CFG(GPIO70, AF0)
++#define GPIO71_GPIO MFP_CFG(GPIO71, AF0)
++#define GPIO72_GPIO MFP_CFG(GPIO72, AF0)
++#define GPIO73_GPIO MFP_CFG(GPIO73, AF0)
++#define GPIO74_GPIO MFP_CFG(GPIO74, AF0)
++#define GPIO75_GPIO MFP_CFG(GPIO75, AF0)
++#define GPIO76_GPIO MFP_CFG(GPIO76, AF0)
++#define GPIO77_GPIO MFP_CFG(GPIO77, AF0)
++#define GPIO78_GPIO MFP_CFG(GPIO78, AF0)
++#define GPIO79_GPIO MFP_CFG(GPIO79, AF0)
++#define GPIO80_GPIO MFP_CFG(GPIO80, AF0)
++#define GPIO81_GPIO MFP_CFG(GPIO81, AF0)
++#define GPIO82_GPIO MFP_CFG(GPIO82, AF0)
++#define GPIO83_GPIO MFP_CFG(GPIO83, AF0)
++#define GPIO84_GPIO MFP_CFG(GPIO84, AF0)
++#define GPIO85_GPIO MFP_CFG(GPIO85, AF0)
++#define GPIO86_GPIO MFP_CFG(GPIO86, AF0)
++#define GPIO87_GPIO MFP_CFG(GPIO87, AF0)
++#define GPIO88_GPIO MFP_CFG(GPIO88, AF0)
++#define GPIO89_GPIO MFP_CFG(GPIO89, AF0)
++#define GPIO90_GPIO MFP_CFG(GPIO90, AF0)
++#define GPIO91_GPIO MFP_CFG(GPIO91, AF0)
++#define GPIO92_GPIO MFP_CFG(GPIO92, AF0)
++#define GPIO93_GPIO MFP_CFG(GPIO93, AF0)
++#define GPIO94_GPIO MFP_CFG(GPIO94, AF0)
++#define GPIO95_GPIO MFP_CFG(GPIO95, AF0)
++#define GPIO96_GPIO MFP_CFG(GPIO96, AF0)
++#define GPIO97_GPIO MFP_CFG(GPIO97, AF0)
++#define GPIO98_GPIO MFP_CFG(GPIO98, AF0)
++#define GPIO99_GPIO MFP_CFG(GPIO99, AF0)
++#define GPIO100_GPIO MFP_CFG(GPIO100, AF0)
++#define GPIO101_GPIO MFP_CFG(GPIO101, AF0)
++#define GPIO102_GPIO MFP_CFG(GPIO102, AF0)
++#define GPIO103_GPIO MFP_CFG(GPIO103, AF0)
++#define GPIO104_GPIO MFP_CFG(GPIO104, AF0)
++#define GPIO105_GPIO MFP_CFG(GPIO105, AF0)
++#define GPIO106_GPIO MFP_CFG(GPIO106, AF0)
++#define GPIO107_GPIO MFP_CFG(GPIO107, AF0)
++#define GPIO108_GPIO MFP_CFG(GPIO108, AF0)
++#define GPIO109_GPIO MFP_CFG(GPIO109, AF0)
++#define GPIO110_GPIO MFP_CFG(GPIO110, AF0)
++#define GPIO111_GPIO MFP_CFG(GPIO111, AF0)
++#define GPIO112_GPIO MFP_CFG(GPIO112, AF0)
++#define GPIO113_GPIO MFP_CFG(GPIO113, AF0)
++#define GPIO114_GPIO MFP_CFG(GPIO114, AF0)
++#define GPIO115_GPIO MFP_CFG(GPIO115, AF0)
++#define GPIO116_GPIO MFP_CFG(GPIO116, AF0)
++#define GPIO117_GPIO MFP_CFG(GPIO117, AF0)
++#define GPIO118_GPIO MFP_CFG(GPIO118, AF0)
++#define GPIO119_GPIO MFP_CFG(GPIO119, AF0)
++#define GPIO120_GPIO MFP_CFG(GPIO120, AF0)
++#define GPIO121_GPIO MFP_CFG(GPIO121, AF0)
++#define GPIO122_GPIO MFP_CFG(GPIO122, AF0)
++#define GPIO123_GPIO MFP_CFG(GPIO123, AF0)
++#define GPIO124_GPIO MFP_CFG(GPIO124, AF0)
++#define GPIO125_GPIO MFP_CFG(GPIO125, AF0)
++#define GPIO126_GPIO MFP_CFG(GPIO126, AF0)
++#define GPIO127_GPIO MFP_CFG(GPIO127, AF0)
++
++#define GPIO0_2_GPIO MFP_CFG(GPIO0_2, AF0)
++#define GPIO1_2_GPIO MFP_CFG(GPIO1_2, AF0)
++#define GPIO2_2_GPIO MFP_CFG(GPIO2_2, AF0)
++#define GPIO3_2_GPIO MFP_CFG(GPIO3_2, AF0)
++#define GPIO4_2_GPIO MFP_CFG(GPIO4_2, AF0)
++#define GPIO5_2_GPIO MFP_CFG(GPIO5_2, AF0)
++#define GPIO6_2_GPIO MFP_CFG(GPIO6_2, AF0)
++
++/*
++ * each MFP pin will have a MFPR register, since the offset of the
++ * register varies between processors, the processor specific code
++ * should initialize the pin offsets by pxa3xx_mfp_init_addr()
++ *
++ * pxa3xx_mfp_init_addr - accepts a table of "pxa3xx_mfp_addr_map"
++ * structure, which represents a range of MFP pins from "start" to
++ * "end", with the offset begining at "offset", to define a single
++ * pin, let "end" = -1
++ *
++ * use
++ *
++ * MFP_ADDR_X() to define a range of pins
++ * MFP_ADDR() to define a single pin
++ * MFP_ADDR_END to signal the end of pin offset definitions
++ */
++struct pxa3xx_mfp_addr_map {
++ unsigned int start;
++ unsigned int end;
++ unsigned long offset;
++};
++
++#define MFP_ADDR_X(start, end, offset) \
++ { MFP_PIN_##start, MFP_PIN_##end, offset }
++
++#define MFP_ADDR(pin, offset) \
++ { MFP_PIN_##pin, -1, offset }
++
++#define MFP_ADDR_END { MFP_PIN_INVALID, 0 }
++
++/*
++ * pxa3xx_mfp_read()/pxa3xx_mfp_write() - for direct read/write access
++ * to the MFPR register
++ */
++unsigned long pxa3xx_mfp_read(int mfp);
++void pxa3xx_mfp_write(int mfp, unsigned long mfpr_val);
++
++/*
++ * pxa3xx_mfp_config - configure the MFPR registers
++ *
++ * used by board specific initialization code
++ */
++void pxa3xx_mfp_config(unsigned long *mfp_cfgs, int num);
++
++/*
++ * pxa3xx_mfp_init_addr() - initialize the mapping between mfp pin
++ * index and MFPR register offset
++ *
++ * used by processor specific code
++ */
++void __init pxa3xx_mfp_init_addr(struct pxa3xx_mfp_addr_map *);
++void __init pxa3xx_init_mfp(void);
++#endif /* __ASM_ARCH_MFP_PXA3XX_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/mmc.h linux-2.6.25-rc4/include/asm-arm/arch/mmc.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/mmc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/mmc.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,23 @@
++#ifndef ASMARM_ARCH_MMC_H
++#define ASMARM_ARCH_MMC_H
++
++#include <linux/mmc/host.h>
++#include <linux/interrupt.h>
++
++struct device;
++struct mmc_host;
++
++struct pxamci_platform_data {
++ unsigned int ocr_mask; /* available voltages */
++ unsigned long detect_delay; /* delay in jiffies before detecting cards after interrupt */
++ int (*init)(struct device *, irq_handler_t , void *);
++ int (*get_ro)(struct device *);
++ void (*setpower)(struct device *, unsigned int);
++ void (*exit)(struct device *, void *);
++};
++
++extern void pxa_set_mci_info(struct pxamci_platform_data *info);
++extern void pxa3xx_set_mci2_info(struct pxamci_platform_data *info);
++extern void pxa3xx_set_mci3_info(struct pxamci_platform_data *info);
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/mtd-xip.h linux-2.6.25-rc4/include/asm-arm/arch/mtd-xip.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/mtd-xip.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/mtd-xip.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,37 @@
++/*
++ * MTD primitives for XIP support. Architecture specific functions
++ *
++ * Do not include this file directly. It's included from linux/mtd/xip.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Nov 2, 2004
++ * Copyright: (C) 2004 MontaVista Software, Inc.
++ *
++ * 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.
++ *
++ * $Id: xip.h,v 1.2 2004/12/01 15:49:10 nico Exp $
++ */
++
++#ifndef __ARCH_PXA_MTD_XIP_H__
++#define __ARCH_PXA_MTD_XIP_H__
++
++#include <asm/arch/pxa-regs.h>
++
++#define xip_irqpending() (ICIP & ICMR)
++
++/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
++#define xip_currtime() (OSCR)
++#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4)
++
++/*
++ * xip_cpu_idle() is used when waiting for a delay equal or larger than
++ * the system timer tick period. This should put the CPU into idle mode
++ * to save power and to be woken up only when some interrupts are pending.
++ * As above, this should not rely upon standard kernel code.
++ */
++
++#define xip_cpu_idle() asm volatile ("mcr p14, 0, %0, c7, c0, 0" :: "r" (1))
++
++#endif /* __ARCH_PXA_MTD_XIP_H__ */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/ohci.h linux-2.6.25-rc4/include/asm-arm/arch/ohci.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/ohci.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/ohci.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,20 @@
++#ifndef ASMARM_ARCH_OHCI_H
++#define ASMARM_ARCH_OHCI_H
++
++struct device;
++
++struct pxaohci_platform_data {
++ int (*init)(struct device *);
++ void (*exit)(struct device *);
++
++ int port_mode;
++#define PMM_NPS_MODE 1
++#define PMM_GLOBAL_MODE 2
++#define PMM_PERPORT_MODE 3
++
++ int power_budget;
++};
++
++extern void pxa_set_ohci_info(struct pxaohci_platform_data *info);
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pcm027.h linux-2.6.25-rc4/include/asm-arm/arch/pcm027.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pcm027.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pcm027.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,75 @@
++/*
++ * linux/include/asm-arm/arch-pxa/pcm027.h
++ *
++ * (c) 2003 Phytec Messtechnik GmbH <armlinux@phytec.de>
++ * (c) 2007 Juergen Beisert <j.beisert@pengutronix.de>
++ *
++ * 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
++ */
++
++/*
++ * Definitions of CPU card resources only
++ */
++
++/* I2C RTC */
++#define PCM027_RTC_IRQ_GPIO 0
++#define PCM027_RTC_IRQ IRQ_GPIO(PCM027_RTC_IRQ_GPIO)
++#define PCM027_RTC_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
++#define ADR_PCM027_RTC 0x51 /* I2C address */
++
++/* I2C EEPROM */
++#define ADR_PCM027_EEPROM 0x54 /* I2C address */
++
++/* Ethernet chip (SMSC91C111) */
++#define PCM027_ETH_IRQ_GPIO 52
++#define PCM027_ETH_IRQ IRQ_GPIO(PCM027_ETH_IRQ_GPIO)
++#define PCM027_ETH_IRQ_EDGE IRQ_TYPE_EDGE_RISING
++#define PCM027_ETH_PHYS PXA_CS5_PHYS
++#define PCM027_ETH_SIZE (1*1024*1024)
++
++/* CAN controller SJA1000 (unsupported yet) */
++#define PCM027_CAN_IRQ_GPIO 114
++#define PCM027_CAN_IRQ IRQ_GPIO(PCM027_CAN_IRQ_GPIO)
++#define PCM027_CAN_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
++#define PCM027_CAN_PHYS 0x22000000
++#define PCM027_CAN_SIZE 0x100
++
++/* SPI GPIO expander (unsupported yet) */
++#define PCM027_EGPIO_IRQ_GPIO 27
++#define PCM027_EGPIO_IRQ IRQ_GPIO(PCM027_EGPIO_IRQ_GPIO)
++#define PCM027_EGPIO_IRQ_EDGE IRQ_TYPE_EDGE_FALLING
++#define PCM027_EGPIO_CS 24
++/*
++ * TODO: Switch this pin from dedicated usage to GPIO if
++ * more than the MAX7301 device is connected to this SPI bus
++ */
++#define PCM027_EGPIO_CS_MODE GPIO24_SFRM_MD
++
++/* Flash memory */
++#define PCM027_FLASH_PHYS 0x00000000
++#define PCM027_FLASH_SIZE 0x02000000
++
++/* onboard LEDs connected to GPIO */
++#define PCM027_LED_CPU 90
++#define PCM027_LED_HEARD_BEAT 91
++
++/*
++ * This CPU module needs a baseboard to work. After basic initializing
++ * its own devices, it calls baseboard's init function.
++ * TODO: Add your own basebaord init function and call it from
++ * inside pcm027_init(). This example here is for the developmen board.
++ * Refer pcm990-baseboard.c
++ */
++extern void pcm990_baseboard_init(void);
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pcm990_baseboard.h linux-2.6.25-rc4/include/asm-arm/arch/pcm990_baseboard.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pcm990_baseboard.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pcm990_baseboard.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,275 @@
++/*
++ * include/asm-arm/arch-pxa/pcm990_baseboard.h
++ *
++ * (c) 2003 Phytec Messtechnik GmbH <armlinux@phytec.de>
++ * (c) 2007 Juergen Beisert <j.beisert@pengutronix.de>
++ *
++ * 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 <asm/arch/pcm027.h>
++
++/*
++ * definitions relevant only when the PCM-990
++ * development base board is in use
++ */
++
++/* CPLD's interrupt controller is connected to PCM-027 GPIO 9 */
++#define PCM990_CTRL_INT_IRQ_GPIO 9
++#define PCM990_CTRL_INT_IRQ IRQ_GPIO(PCM990_CTRL_INT_IRQ_GPIO)
++#define PCM990_CTRL_INT_IRQ_EDGE IRQT_RISING
++#define PCM990_CTRL_PHYS PXA_CS1_PHYS /* 16-Bit */
++#define PCM990_CTRL_BASE 0xea000000
++#define PCM990_CTRL_SIZE (1*1024*1024)
++
++#define PCM990_CTRL_PWR_IRQ_GPIO 14
++#define PCM990_CTRL_PWR_IRQ IRQ_GPIO(PCM990_CTRL_PWR_IRQ_GPIO)
++#define PCM990_CTRL_PWR_IRQ_EDGE IRQT_RISING
++
++/* visible CPLD (U7) registers */
++#define PCM990_CTRL_REG0 0x0000 /* RESET REGISTER */
++#define PCM990_CTRL_SYSRES 0x0001 /* System RESET REGISTER */
++#define PCM990_CTRL_RESOUT 0x0002 /* RESETOUT Enable REGISTER */
++#define PCM990_CTRL_RESGPIO 0x0004 /* RESETGPIO Enable REGISTER */
++
++#define PCM990_CTRL_REG1 0x0002 /* Power REGISTER */
++#define PCM990_CTRL_5VOFF 0x0001 /* Disable 5V Regulators */
++#define PCM990_CTRL_CANPWR 0x0004 /* Enable CANPWR ADUM */
++#define PCM990_CTRL_PM_5V 0x0008 /* Read 5V OK */
++
++#define PCM990_CTRL_REG2 0x0004 /* LED REGISTER */
++#define PCM990_CTRL_LEDPWR 0x0001 /* POWER LED enable */
++#define PCM990_CTRL_LEDBAS 0x0002 /* BASIS LED enable */
++#define PCM990_CTRL_LEDUSR 0x0004 /* USER LED enable */
++
++#define PCM990_CTRL_REG3 0x0006 /* LCD CTRL REGISTER 3 */
++#define PCM990_CTRL_LCDPWR 0x0001 /* RW LCD Power on */
++#define PCM990_CTRL_LCDON 0x0002 /* RW LCD Latch on */
++#define PCM990_CTRL_LCDPOS1 0x0004 /* RW POS 1 */
++#define PCM990_CTRL_LCDPOS2 0x0008 /* RW POS 2 */
++
++#define PCM990_CTRL_REG4 0x0008 /* MMC1 CTRL REGISTER 4 */
++#define PCM990_CTRL_MMC1PWR 0x0001 /* RW MMC1 Power on */
++
++#define PCM990_CTRL_REG5 0x000A /* MMC2 CTRL REGISTER 5 */
++#define PCM990_CTRL_MMC2PWR 0x0001 /* RW MMC2 Power on */
++#define PCM990_CTRL_MMC2LED 0x0002 /* RW MMC2 LED */
++#define PCM990_CTRL_MMC2DE 0x0004 /* R MMC2 Card detect */
++#define PCM990_CTRL_MMC2WP 0x0008 /* R MMC2 Card write protect */
++
++#define PCM990_CTRL_REG6 0x000C /* Interrupt Clear REGISTER */
++#define PCM990_CTRL_INTC0 0x0001 /* Clear Reg BT Detect */
++#define PCM990_CTRL_INTC1 0x0002 /* Clear Reg FR RI */
++#define PCM990_CTRL_INTC2 0x0004 /* Clear Reg MMC1 Detect */
++#define PCM990_CTRL_INTC3 0x0008 /* Clear Reg PM_5V off */
++
++#define PCM990_CTRL_REG7 0x000E /* Interrupt Enable REGISTER */
++#define PCM990_CTRL_ENAINT0 0x0001 /* Enable Int BT Detect */
++#define PCM990_CTRL_ENAINT1 0x0002 /* Enable Int FR RI */
++#define PCM990_CTRL_ENAINT2 0x0004 /* Enable Int MMC1 Detect */
++#define PCM990_CTRL_ENAINT3 0x0008 /* Enable Int PM_5V off */
++
++#define PCM990_CTRL_REG8 0x0014 /* Uart REGISTER */
++#define PCM990_CTRL_FFSD 0x0001 /* BT Uart Enable */
++#define PCM990_CTRL_BTSD 0x0002 /* FF Uart Enable */
++#define PCM990_CTRL_FFRI 0x0004 /* FF Uart RI detect */
++#define PCM990_CTRL_BTRX 0x0008 /* BT Uart Rx detect */
++
++#define PCM990_CTRL_REG9 0x0010 /* AC97 Flash REGISTER */
++#define PCM990_CTRL_FLWP 0x0001 /* pC Flash Write Protect */
++#define PCM990_CTRL_FLDIS 0x0002 /* pC Flash Disable */
++#define PCM990_CTRL_AC97ENA 0x0004 /* Enable AC97 Expansion */
++
++#define PCM990_CTRL_REG10 0x0012 /* GPS-REGISTER */
++#define PCM990_CTRL_GPSPWR 0x0004 /* GPS-Modul Power on */
++#define PCM990_CTRL_GPSENA 0x0008 /* GPS-Modul Enable */
++
++#define PCM990_CTRL_REG11 0x0014 /* Accu REGISTER */
++#define PCM990_CTRL_ACENA 0x0001 /* Charge Enable */
++#define PCM990_CTRL_ACSEL 0x0002 /* Charge Akku -> DC Enable */
++#define PCM990_CTRL_ACPRES 0x0004 /* DC Present */
++#define PCM990_CTRL_ACALARM 0x0008 /* Error Akku */
++
++#define PCM990_CTRL_P2V(x) ((x) - PCM990_CTRL_PHYS + PCM990_CTRL_BASE)
++#define PCM990_CTRL_V2P(x) ((x) - PCM990_CTRL_BASE + PCM990_CTRL_PHYS)
++
++#ifndef __ASSEMBLY__
++# define __PCM990_CTRL_REG(x) \
++ (*((volatile unsigned char *)PCM990_CTRL_P2V(x)))
++#else
++# define __PCM990_CTRL_REG(x) PCM990_CTRL_P2V(x)
++#endif
++
++#define PCM990_INTMSKENA __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG7)
++#define PCM990_INTSETCLR __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG6)
++#define PCM990_CTRL0 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG0)
++#define PCM990_CTRL1 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG1)
++#define PCM990_CTRL2 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG2)
++#define PCM990_CTRL3 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG3)
++#define PCM990_CTRL4 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG4)
++#define PCM990_CTRL5 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG5)
++#define PCM990_CTRL6 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG6)
++#define PCM990_CTRL7 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG7)
++#define PCM990_CTRL8 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG8)
++#define PCM990_CTRL9 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG9)
++#define PCM990_CTRL10 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG10)
++#define PCM990_CTRL11 __PCM990_CTRL_REG(PCM990_CTRL_PHYS + PCM990_CTRL_REG11)
++
++
++/*
++ * IDE
++ */
++#define PCM990_IDE_IRQ_GPIO 13
++#define PCM990_IDE_IRQ IRQ_GPIO(PCM990_IDE_IRQ_GPIO)
++#define PCM990_IDE_IRQ_EDGE IRQT_RISING
++#define PCM990_IDE_PLD_PHYS 0x20000000 /* 16 bit wide */
++#define PCM990_IDE_PLD_BASE 0xee000000
++#define PCM990_IDE_PLD_SIZE (1*1024*1024)
++
++/* visible CPLD (U6) registers */
++#define PCM990_IDE_PLD_REG0 0x1000 /* OFFSET IDE REGISTER 0 */
++#define PCM990_IDE_PM5V 0x0004 /* R System VCC_5V */
++#define PCM990_IDE_STBY 0x0008 /* R System StandBy */
++
++#define PCM990_IDE_PLD_REG1 0x1002 /* OFFSET IDE REGISTER 1 */
++#define PCM990_IDE_IDEMODE 0x0001 /* R TrueIDE Mode */
++#define PCM990_IDE_DMAENA 0x0004 /* RW DMA Enable */
++#define PCM990_IDE_DMA1_0 0x0008 /* RW 1=DREQ1 0=DREQ0 */
++
++#define PCM990_IDE_PLD_REG2 0x1004 /* OFFSET IDE REGISTER 2 */
++#define PCM990_IDE_RESENA 0x0001 /* RW IDE Reset Bit enable */
++#define PCM990_IDE_RES 0x0002 /* RW IDE Reset Bit */
++#define PCM990_IDE_RDY 0x0008 /* RDY */
++
++#define PCM990_IDE_PLD_REG3 0x1006 /* OFFSET IDE REGISTER 3 */
++#define PCM990_IDE_IDEOE 0x0001 /* RW Latch on Databus */
++#define PCM990_IDE_IDEON 0x0002 /* RW Latch on Control Address */
++#define PCM990_IDE_IDEIN 0x0004 /* RW Latch on Interrupt usw. */
++
++#define PCM990_IDE_PLD_REG4 0x1008 /* OFFSET IDE REGISTER 4 */
++#define PCM990_IDE_PWRENA 0x0001 /* RW IDE Power enable */
++#define PCM990_IDE_5V 0x0002 /* R IDE Power 5V */
++#define PCM990_IDE_PWG 0x0008 /* R IDE Power is on */
++
++#define PCM990_IDE_PLD_P2V(x) ((x) - PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_BASE)
++#define PCM990_IDE_PLD_V2P(x) ((x) - PCM990_IDE_PLD_BASE + PCM990_IDE_PLD_PHYS)
++
++#ifndef __ASSEMBLY__
++# define __PCM990_IDE_PLD_REG(x) \
++ (*((volatile unsigned char *)PCM990_IDE_PLD_P2V(x)))
++#else
++# define __PCM990_IDE_PLD_REG(x) PCM990_IDE_PLD_P2V(x)
++#endif
++
++#define PCM990_IDE0 \
++ __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG0)
++#define PCM990_IDE1 \
++ __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG1)
++#define PCM990_IDE2 \
++ __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG2)
++#define PCM990_IDE3 \
++ __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG3)
++#define PCM990_IDE4 \
++ __PCM990_IDE_PLD_REG(PCM990_IDE_PLD_PHYS + PCM990_IDE_PLD_REG4)
++
++/*
++ * Compact Flash
++ */
++#define PCM990_CF_IRQ_GPIO 11
++#define PCM990_CF_IRQ IRQ_GPIO(PCM990_CF_IRQ_GPIO)
++#define PCM990_CF_IRQ_EDGE IRQT_RISING
++
++#define PCM990_CF_CD_GPIO 12
++#define PCM990_CF_CD IRQ_GPIO(PCM990_CF_CD_GPIO)
++#define PCM990_CF_CD_EDGE IRQT_RISING
++
++#define PCM990_CF_PLD_PHYS 0x30000000 /* 16 bit wide */
++#define PCM990_CF_PLD_BASE 0xef000000
++#define PCM990_CF_PLD_SIZE (1*1024*1024)
++#define PCM990_CF_PLD_P2V(x) ((x) - PCM990_CF_PLD_PHYS + PCM990_CF_PLD_BASE)
++#define PCM990_CF_PLD_V2P(x) ((x) - PCM990_CF_PLD_BASE + PCM990_CF_PLD_PHYS)
++
++/* visible CPLD (U6) registers */
++#define PCM990_CF_PLD_REG0 0x1000 /* OFFSET CF REGISTER 0 */
++#define PCM990_CF_REG0_LED 0x0001 /* RW LED on */
++#define PCM990_CF_REG0_BLK 0x0002 /* RW LED flash when access */
++#define PCM990_CF_REG0_PM5V 0x0004 /* R System VCC_5V enable */
++#define PCM990_CF_REG0_STBY 0x0008 /* R System StandBy */
++
++#define PCM990_CF_PLD_REG1 0x1002 /* OFFSET CF REGISTER 1 */
++#define PCM990_CF_REG1_IDEMODE 0x0001 /* RW CF card run as TrueIDE */
++#define PCM990_CF_REG1_CF0 0x0002 /* RW CF card at ADDR 0x28000000 */
++
++#define PCM990_CF_PLD_REG2 0x1004 /* OFFSET CF REGISTER 2 */
++#define PCM990_CF_REG2_RES 0x0002 /* RW CF RESET BIT */
++#define PCM990_CF_REG2_RDYENA 0x0004 /* RW Enable CF_RDY */
++#define PCM990_CF_REG2_RDY 0x0008 /* R CF_RDY auf PWAIT */
++
++#define PCM990_CF_PLD_REG3 0x1006 /* OFFSET CF REGISTER 3 */
++#define PCM990_CF_REG3_CFOE 0x0001 /* RW Latch on Databus */
++#define PCM990_CF_REG3_CFON 0x0002 /* RW Latch on Control Address */
++#define PCM990_CF_REG3_CFIN 0x0004 /* RW Latch on Interrupt usw. */
++#define PCM990_CF_REG3_CFCD 0x0008 /* RW Latch on CD1/2 VS1/2 usw */
++
++#define PCM990_CF_PLD_REG4 0x1008 /* OFFSET CF REGISTER 4 */
++#define PCM990_CF_REG4_PWRENA 0x0001 /* RW CF Power on (CD1/2 = "00") */
++#define PCM990_CF_REG4_5_3V 0x0002 /* RW 1 = 5V CF_VCC 0 = 3 V CF_VCC */
++#define PCM990_CF_REG4_3B 0x0004 /* RW 3.0V Backup from VCC (5_3V=0) */
++#define PCM990_CF_REG4_PWG 0x0008 /* R CF-Power is on */
++
++#define PCM990_CF_PLD_REG5 0x100A /* OFFSET CF REGISTER 5 */
++#define PCM990_CF_REG5_BVD1 0x0001 /* R CF /BVD1 */
++#define PCM990_CF_REG5_BVD2 0x0002 /* R CF /BVD2 */
++#define PCM990_CF_REG5_VS1 0x0004 /* R CF /VS1 */
++#define PCM990_CF_REG5_VS2 0x0008 /* R CF /VS2 */
++
++#define PCM990_CF_PLD_REG6 0x100C /* OFFSET CF REGISTER 6 */
++#define PCM990_CF_REG6_CD1 0x0001 /* R CF Card_Detect1 */
++#define PCM990_CF_REG6_CD2 0x0002 /* R CF Card_Detect2 */
++
++#ifndef __ASSEMBLY__
++# define __PCM990_CF_PLD_REG(x) \
++ (*((volatile unsigned char *)PCM990_CF_PLD_P2V(x)))
++#else
++# define __PCM990_CF_PLD_REG(x) PCM990_CF_PLD_P2V(x)
++#endif
++
++#define PCM990_CF0 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG0)
++#define PCM990_CF1 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG1)
++#define PCM990_CF2 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG2)
++#define PCM990_CF3 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG3)
++#define PCM990_CF4 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG4)
++#define PCM990_CF5 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG5)
++#define PCM990_CF6 __PCM990_CF_PLD_REG(PCM990_CF_PLD_PHYS + PCM990_CF_PLD_REG6)
++
++/*
++ * Wolfson AC97 Touch
++ */
++#define PCM990_AC97_IRQ_GPIO 10
++#define PCM990_AC97_IRQ IRQ_GPIO(PCM990_AC97_IRQ_GPIO)
++#define PCM990_AC97_IRQ_EDGE IRQT_RISING
++
++/*
++ * MMC phyCORE
++ */
++#define PCM990_MMC0_IRQ_GPIO 9
++#define PCM990_MMC0_IRQ IRQ_GPIO(PCM990_MMC0_IRQ_GPIO)
++#define PCM990_MMC0_IRQ_EDGE IRQT_FALLING
++
++/*
++ * USB phyCore
++ */
++#define PCM990_USB_OVERCURRENT (88 | GPIO_ALT_FN_1_IN)
++#define PCM990_USB_PWR_EN (89 | GPIO_ALT_FN_2_OUT)
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pm.h linux-2.6.25-rc4/include/asm-arm/arch/pm.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pm.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pm.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,27 @@
++/*
++ * Copyright (c) 2005 Richard Purdie
++ *
++ * 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.
++ *
++ */
++
++#include <linux/suspend.h>
++
++struct pxa_cpu_pm_fns {
++ int save_size;
++ void (*save)(unsigned long *);
++ void (*restore)(unsigned long *);
++ int (*valid)(suspend_state_t state);
++ void (*enter)(suspend_state_t state);
++};
++
++extern struct pxa_cpu_pm_fns *pxa_cpu_pm_fns;
++
++/* sleep.S */
++extern void pxa25x_cpu_suspend(unsigned int);
++extern void pxa27x_cpu_suspend(unsigned int);
++extern void pxa_cpu_resume(void);
++
++extern int pxa_pm_enter(suspend_state_t state);
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/poodle.h linux-2.6.25-rc4/include/asm-arm/arch/poodle.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/poodle.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/poodle.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,75 @@
++/*
++ * linux/include/asm-arm/arch-pxa/poodle.h
++ *
++ * May be copied or modified under the terms of the GNU General Public
++ * License. See linux/COPYING for more information.
++ *
++ * Based on:
++ * linux/include/asm-arm/arch-sa1100/collie.h
++ *
++ * ChangeLog:
++ * 04-06-2001 Lineo Japan, Inc.
++ * 04-16-2001 SHARP Corporation
++ * Update to 2.6 John Lenz
++ */
++#ifndef __ASM_ARCH_POODLE_H
++#define __ASM_ARCH_POODLE_H 1
++
++/*
++ * GPIOs
++ */
++/* PXA GPIOs */
++#define POODLE_GPIO_ON_KEY (0)
++#define POODLE_GPIO_AC_IN (1)
++#define POODLE_GPIO_CO 16
++#define POODLE_GPIO_TP_INT (5)
++#define POODLE_GPIO_WAKEUP (11) /* change battery */
++#define POODLE_GPIO_GA_INT (10)
++#define POODLE_GPIO_IR_ON (22)
++#define POODLE_GPIO_HP_IN (4)
++#define POODLE_GPIO_CF_IRQ (17)
++#define POODLE_GPIO_CF_CD (14)
++#define POODLE_GPIO_CF_STSCHG (14)
++#define POODLE_GPIO_SD_PWR (33)
++#define POODLE_GPIO_SD_PWR1 (3)
++#define POODLE_GPIO_nSD_CLK (6)
++#define POODLE_GPIO_nSD_WP (7)
++#define POODLE_GPIO_nSD_INT (8)
++#define POODLE_GPIO_nSD_DETECT (9)
++#define POODLE_GPIO_MAIN_BAT_LOW (13)
++#define POODLE_GPIO_BAT_COVER (13)
++#define POODLE_GPIO_USB_PULLUP (20)
++#define POODLE_GPIO_ADC_TEMP_ON (21)
++#define POODLE_GPIO_BYPASS_ON (36)
++#define POODLE_GPIO_CHRG_ON (38)
++#define POODLE_GPIO_CHRG_FULL (16)
++#define POODLE_GPIO_DISCHARGE_ON (42) /* Enable battery discharge */
++
++/* PXA GPIOs */
++#define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0)
++#define POODLE_IRQ_GPIO_AC_IN IRQ_GPIO(1)
++#define POODLE_IRQ_GPIO_HP_IN IRQ_GPIO(4)
++#define POODLE_IRQ_GPIO_CO IRQ_GPIO(16)
++#define POODLE_IRQ_GPIO_TP_INT IRQ_GPIO(5)
++#define POODLE_IRQ_GPIO_WAKEUP IRQ_GPIO(11)
++#define POODLE_IRQ_GPIO_GA_INT IRQ_GPIO(10)
++#define POODLE_IRQ_GPIO_CF_IRQ IRQ_GPIO(17)
++#define POODLE_IRQ_GPIO_CF_CD IRQ_GPIO(14)
++#define POODLE_IRQ_GPIO_nSD_INT IRQ_GPIO(8)
++#define POODLE_IRQ_GPIO_nSD_DETECT IRQ_GPIO(9)
++#define POODLE_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(13)
++
++/* SCOOP GPIOs */
++#define POODLE_SCOOP_CHARGE_ON SCOOP_GPCR_PA11
++#define POODLE_SCOOP_CP401 SCOOP_GPCR_PA13
++#define POODLE_SCOOP_VPEN SCOOP_GPCR_PA18
++#define POODLE_SCOOP_L_PCLK SCOOP_GPCR_PA20
++#define POODLE_SCOOP_L_LCLK SCOOP_GPCR_PA21
++#define POODLE_SCOOP_HS_OUT SCOOP_GPCR_PA22
++
++#define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT )
++#define POODLE_SCOOP_IO_OUT ( 0 )
++
++extern struct platform_device poodle_locomo_device;
++
++#endif /* __ASM_ARCH_POODLE_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa27x_keypad.h linux-2.6.25-rc4/include/asm-arm/arch/pxa27x_keypad.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa27x_keypad.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pxa27x_keypad.h 2008-03-08 16:22:35.000000000 +0100
+@@ -0,0 +1,58 @@
++#ifndef __ASM_ARCH_PXA27x_KEYPAD_H
++#define __ASM_ARCH_PXA27x_KEYPAD_H
++
++#include <linux/input.h>
++
++#define MAX_MATRIX_KEY_ROWS (8)
++#define MAX_MATRIX_KEY_COLS (8)
++
++/* pxa3xx keypad platform specific parameters
++ *
++ * NOTE:
++ * 1. direct_key_num indicates the number of keys in the direct keypad
++ * _plus_ the number of rotary-encoder sensor inputs, this can be
++ * left as 0 if only rotary encoders are enabled, the driver will
++ * automatically calculate this
++ *
++ * 2. direct_key_map is the key code map for the direct keys, if rotary
++ * encoder(s) are enabled, direct key 0/1(2/3) will be ignored
++ *
++ * 3. rotary can be either interpreted as a relative input event (e.g.
++ * REL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT)
++ *
++ * 4. matrix key and direct key will use the same debounce_interval by
++ * default, which should be sufficient in most cases
++ */
++struct pxa27x_keypad_platform_data {
++
++ /* code map for the matrix keys */
++ unsigned int matrix_key_rows;
++ unsigned int matrix_key_cols;
++ unsigned int *matrix_key_map;
++ int matrix_key_map_size;
++
++ /* direct keys */
++ int direct_key_num;
++ unsigned int direct_key_map[8];
++
++ /* rotary encoders 0 */
++ int enable_rotary0;
++ int rotary0_rel_code;
++ int rotary0_up_key;
++ int rotary0_down_key;
++
++ /* rotary encoders 1 */
++ int enable_rotary1;
++ int rotary1_rel_code;
++ int rotary1_up_key;
++ int rotary1_down_key;
++
++ /* key debounce interval */
++ unsigned int debounce_interval;
++};
++
++#define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val))
++
++extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
++
++#endif /* __ASM_ARCH_PXA27x_KEYPAD_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa2xx-regs.h linux-2.6.25-rc4/include/asm-arm/arch/pxa2xx-regs.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa2xx-regs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pxa2xx-regs.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,84 @@
++/*
++ * linux/include/asm-arm/arch-pxa/pxa2xx-regs.h
++ *
++ * Taken from pxa-regs.h by Russell King
++ *
++ * Author: Nicolas Pitre
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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 __PXA2XX_REGS_H
++#define __PXA2XX_REGS_H
++
++/*
++ * Memory controller
++ */
++
++#define MDCNFG __REG(0x48000000) /* SDRAM Configuration Register 0 */
++#define MDREFR __REG(0x48000004) /* SDRAM Refresh Control Register */
++#define MSC0 __REG(0x48000008) /* Static Memory Control Register 0 */
++#define MSC1 __REG(0x4800000C) /* Static Memory Control Register 1 */
++#define MSC2 __REG(0x48000010) /* Static Memory Control Register 2 */
++#define MECR __REG(0x48000014) /* Expansion Memory (PCMCIA/Compact Flash) Bus Configuration */
++#define SXLCR __REG(0x48000018) /* LCR value to be written to SDRAM-Timing Synchronous Flash */
++#define SXCNFG __REG(0x4800001C) /* Synchronous Static Memory Control Register */
++#define SXMRS __REG(0x48000024) /* MRS value to be written to Synchronous Flash or SMROM */
++#define MCMEM0 __REG(0x48000028) /* Card interface Common Memory Space Socket 0 Timing */
++#define MCMEM1 __REG(0x4800002C) /* Card interface Common Memory Space Socket 1 Timing */
++#define MCATT0 __REG(0x48000030) /* Card interface Attribute Space Socket 0 Timing Configuration */
++#define MCATT1 __REG(0x48000034) /* Card interface Attribute Space Socket 1 Timing Configuration */
++#define MCIO0 __REG(0x48000038) /* Card interface I/O Space Socket 0 Timing Configuration */
++#define MCIO1 __REG(0x4800003C) /* Card interface I/O Space Socket 1 Timing Configuration */
++#define MDMRS __REG(0x48000040) /* MRS value to be written to SDRAM */
++#define BOOT_DEF __REG(0x48000044) /* Read-Only Boot-Time Register. Contains BOOT_SEL and PKG_SEL */
++
++/*
++ * More handy macros for PCMCIA
++ *
++ * Arg is socket number
++ */
++#define MCMEM(s) __REG2(0x48000028, (s)<<2 ) /* Card interface Common Memory Space Socket s Timing */
++#define MCATT(s) __REG2(0x48000030, (s)<<2 ) /* Card interface Attribute Space Socket s Timing Configuration */
++#define MCIO(s) __REG2(0x48000038, (s)<<2 ) /* Card interface I/O Space Socket s Timing Configuration */
++
++/* MECR register defines */
++#define MECR_NOS (1 << 0) /* Number Of Sockets: 0 -> 1 sock, 1 -> 2 sock */
++#define MECR_CIT (1 << 1) /* Card Is There: 0 -> no card, 1 -> card inserted */
++
++#define MDREFR_K0DB4 (1 << 29) /* SDCLK0 Divide by 4 Control/Status */
++#define MDREFR_K2FREE (1 << 25) /* SDRAM Free-Running Control */
++#define MDREFR_K1FREE (1 << 24) /* SDRAM Free-Running Control */
++#define MDREFR_K0FREE (1 << 23) /* SDRAM Free-Running Control */
++#define MDREFR_SLFRSH (1 << 22) /* SDRAM Self-Refresh Control/Status */
++#define MDREFR_APD (1 << 20) /* SDRAM/SSRAM Auto-Power-Down Enable */
++#define MDREFR_K2DB2 (1 << 19) /* SDCLK2 Divide by 2 Control/Status */
++#define MDREFR_K2RUN (1 << 18) /* SDCLK2 Run Control/Status */
++#define MDREFR_K1DB2 (1 << 17) /* SDCLK1 Divide by 2 Control/Status */
++#define MDREFR_K1RUN (1 << 16) /* SDCLK1 Run Control/Status */
++#define MDREFR_E1PIN (1 << 15) /* SDCKE1 Level Control/Status */
++#define MDREFR_K0DB2 (1 << 14) /* SDCLK0 Divide by 2 Control/Status */
++#define MDREFR_K0RUN (1 << 13) /* SDCLK0 Run Control/Status */
++#define MDREFR_E0PIN (1 << 12) /* SDCKE0 Level Control/Status */
++
++
++#ifdef CONFIG_PXA27x
++
++#define ARB_CNTRL __REG(0x48000048) /* Arbiter Control Register */
++
++#define ARB_DMA_SLV_PARK (1<<31) /* Be parked with DMA slave when idle */
++#define ARB_CI_PARK (1<<30) /* Be parked with Camera Interface when idle */
++#define ARB_EX_MEM_PARK (1<<29) /* Be parked with external MEMC when idle */
++#define ARB_INT_MEM_PARK (1<<28) /* Be parked with internal MEMC when idle */
++#define ARB_USB_PARK (1<<27) /* Be parked with USB when idle */
++#define ARB_LCD_PARK (1<<26) /* Be parked with LCD when idle */
++#define ARB_DMA_PARK (1<<25) /* Be parked with DMA when idle */
++#define ARB_CORE_PARK (1<<24) /* Be parked with core when idle */
++#define ARB_LOCK_FLAG (1<<23) /* Only Locking masters gain access to the bus */
++
++#endif
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa2xx_spi.h linux-2.6.25-rc4/include/asm-arm/arch/pxa2xx_spi.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa2xx_spi.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pxa2xx_spi.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,44 @@
++/*
++ * Copyright (C) 2005 Stephen Street / StreetFire Sound Labs
++ *
++ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
++ */
++
++#ifndef PXA2XX_SPI_H_
++#define PXA2XX_SPI_H_
++
++#define PXA2XX_CS_ASSERT (0x01)
++#define PXA2XX_CS_DEASSERT (0x02)
++
++/* device.platform_data for SSP controller devices */
++struct pxa2xx_spi_master {
++ u32 clock_enable;
++ u16 num_chipselect;
++ u8 enable_dma;
++};
++
++/* spi_board_info.controller_data for SPI slave devices,
++ * copied to spi_device.platform_data ... mostly for dma tuning
++ */
++struct pxa2xx_spi_chip {
++ u8 tx_threshold;
++ u8 rx_threshold;
++ u8 dma_burst_size;
++ u32 timeout;
++ u8 enable_loopback;
++ void (*cs_control)(u32 command);
++};
++
++#endif /*PXA2XX_SPI_H_*/
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa3xx-regs.h linux-2.6.25-rc4/include/asm-arm/arch/pxa3xx-regs.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa3xx-regs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pxa3xx-regs.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,174 @@
++/*
++ * linux/include/asm-arm/arch-pxa/pxa3xx-regs.h
++ *
++ * PXA3xx specific register definitions
++ *
++ * Copyright (C) 2007 Marvell International Ltd.
++ *
++ * 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_ARCH_PXA3XX_REGS_H
++#define __ASM_ARCH_PXA3XX_REGS_H
++/*
++ * Service Power Management Unit (MPMU)
++ */
++#define PMCR __REG(0x40F50000) /* Power Manager Control Register */
++#define PSR __REG(0x40F50004) /* Power Manager S2 Status Register */
++#define PSPR __REG(0x40F50008) /* Power Manager Scratch Pad Register */
++#define PCFR __REG(0x40F5000C) /* Power Manager General Configuration Register */
++#define PWER __REG(0x40F50010) /* Power Manager Wake-up Enable Register */
++#define PWSR __REG(0x40F50014) /* Power Manager Wake-up Status Register */
++#define PECR __REG(0x40F50018) /* Power Manager EXT_WAKEUP[1:0] Control Register */
++#define DCDCSR __REG(0x40F50080) /* DC-DC Controller Status Register */
++#define PVCR __REG(0x40F50100) /* Power Manager Voltage Change Control Register */
++#define PCMD(x) __REG(0x40F50110 + ((x) << 2))
++
++/*
++ * Slave Power Managment Unit
++ */
++#define ASCR __REG(0x40f40000) /* Application Subsystem Power Status/Configuration */
++#define ARSR __REG(0x40f40004) /* Application Subsystem Reset Status */
++#define AD3ER __REG(0x40f40008) /* Application Subsystem Wake-Up from D3 Enable */
++#define AD3SR __REG(0x40f4000c) /* Application Subsystem Wake-Up from D3 Status */
++#define AD2D0ER __REG(0x40f40010) /* Application Subsystem Wake-Up from D2 to D0 Enable */
++#define AD2D0SR __REG(0x40f40014) /* Application Subsystem Wake-Up from D2 to D0 Status */
++#define AD2D1ER __REG(0x40f40018) /* Application Subsystem Wake-Up from D2 to D1 Enable */
++#define AD2D1SR __REG(0x40f4001c) /* Application Subsystem Wake-Up from D2 to D1 Status */
++#define AD1D0ER __REG(0x40f40020) /* Application Subsystem Wake-Up from D1 to D0 Enable */
++#define AD1D0SR __REG(0x40f40024) /* Application Subsystem Wake-Up from D1 to D0 Status */
++#define AGENP __REG(0x40f4002c) /* Application Subsystem General Purpose */
++#define AD3R __REG(0x40f40030) /* Application Subsystem D3 Configuration */
++#define AD2R __REG(0x40f40034) /* Application Subsystem D2 Configuration */
++#define AD1R __REG(0x40f40038) /* Application Subsystem D1 Configuration */
++
++/*
++ * Application Subsystem Configuration bits.
++ */
++#define ASCR_RDH (1 << 31)
++#define ASCR_D1S (1 << 2)
++#define ASCR_D2S (1 << 1)
++#define ASCR_D3S (1 << 0)
++
++/*
++ * Application Reset Status bits.
++ */
++#define ARSR_GPR (1 << 3)
++#define ARSR_LPMR (1 << 2)
++#define ARSR_WDT (1 << 1)
++#define ARSR_HWR (1 << 0)
++
++/*
++ * Application Subsystem Wake-Up bits.
++ */
++#define ADXER_WRTC (1 << 31) /* RTC */
++#define ADXER_WOST (1 << 30) /* OS Timer */
++#define ADXER_WTSI (1 << 29) /* Touchscreen */
++#define ADXER_WUSBH (1 << 28) /* USB host */
++#define ADXER_WUSB2 (1 << 26) /* USB client 2.0 */
++#define ADXER_WMSL0 (1 << 24) /* MSL port 0*/
++#define ADXER_WDMUX3 (1 << 23) /* USB EDMUX3 */
++#define ADXER_WDMUX2 (1 << 22) /* USB EDMUX2 */
++#define ADXER_WKP (1 << 21) /* Keypad */
++#define ADXER_WUSIM1 (1 << 20) /* USIM Port 1 */
++#define ADXER_WUSIM0 (1 << 19) /* USIM Port 0 */
++#define ADXER_WOTG (1 << 16) /* USBOTG input */
++#define ADXER_MFP_WFLASH (1 << 15) /* MFP: Data flash busy */
++#define ADXER_MFP_GEN12 (1 << 14) /* MFP: MMC3/GPIO/OST inputs */
++#define ADXER_MFP_WMMC2 (1 << 13) /* MFP: MMC2 */
++#define ADXER_MFP_WMMC1 (1 << 12) /* MFP: MMC1 */
++#define ADXER_MFP_WI2C (1 << 11) /* MFP: I2C */
++#define ADXER_MFP_WSSP4 (1 << 10) /* MFP: SSP4 */
++#define ADXER_MFP_WSSP3 (1 << 9) /* MFP: SSP3 */
++#define ADXER_MFP_WMAXTRIX (1 << 8) /* MFP: matrix keypad */
++#define ADXER_MFP_WUART3 (1 << 7) /* MFP: UART3 */
++#define ADXER_MFP_WUART2 (1 << 6) /* MFP: UART2 */
++#define ADXER_MFP_WUART1 (1 << 5) /* MFP: UART1 */
++#define ADXER_MFP_WSSP2 (1 << 4) /* MFP: SSP2 */
++#define ADXER_MFP_WSSP1 (1 << 3) /* MFP: SSP1 */
++#define ADXER_MFP_WAC97 (1 << 2) /* MFP: AC97 */
++#define ADXER_WEXTWAKE1 (1 << 1) /* External Wake 1 */
++#define ADXER_WEXTWAKE0 (1 << 0) /* External Wake 0 */
++
++/*
++ * AD3R/AD2R/AD1R bits. R2-R5 are only defined for PXA320.
++ */
++#define ADXR_L2 (1 << 8)
++#define ADXR_R5 (1 << 5)
++#define ADXR_R4 (1 << 4)
++#define ADXR_R3 (1 << 3)
++#define ADXR_R2 (1 << 2)
++#define ADXR_R1 (1 << 1)
++#define ADXR_R0 (1 << 0)
++
++/*
++ * Values for PWRMODE CP15 register
++ */
++#define PXA3xx_PM_S3D4C4 0x07 /* aka deep sleep */
++#define PXA3xx_PM_S2D3C4 0x06 /* aka sleep */
++#define PXA3xx_PM_S0D2C2 0x03 /* aka standby */
++#define PXA3xx_PM_S0D1C2 0x02 /* aka LCD refresh */
++#define PXA3xx_PM_S0D0C1 0x01
++
++/*
++ * Application Subsystem Clock
++ */
++#define ACCR __REG(0x41340000) /* Application Subsystem Clock Configuration Register */
++#define ACSR __REG(0x41340004) /* Application Subsystem Clock Status Register */
++#define AICSR __REG(0x41340008) /* Application Subsystem Interrupt Control/Status Register */
++#define CKENA __REG(0x4134000C) /* A Clock Enable Register */
++#define CKENB __REG(0x41340010) /* B Clock Enable Register */
++#define AC97_DIV __REG(0x41340014) /* AC97 clock divisor value register */
++
++/*
++ * Clock Enable Bit
++ */
++#define CKEN_LCD 1 /* < LCD Clock Enable */
++#define CKEN_USBH 2 /* < USB host clock enable */
++#define CKEN_CAMERA 3 /* < Camera interface clock enable */
++#define CKEN_NAND 4 /* < NAND Flash Controller Clock Enable */
++#define CKEN_USB2 6 /* < USB 2.0 client clock enable. */
++#define CKEN_DMC 8 /* < Dynamic Memory Controller clock enable */
++#define CKEN_SMC 9 /* < Static Memory Controller clock enable */
++#define CKEN_ISC 10 /* < Internal SRAM Controller clock enable */
++#define CKEN_BOOT 11 /* < Boot rom clock enable */
++#define CKEN_MMC1 12 /* < MMC1 Clock enable */
++#define CKEN_MMC2 13 /* < MMC2 clock enable */
++#define CKEN_KEYPAD 14 /* < Keypand Controller Clock Enable */
++#define CKEN_CIR 15 /* < Consumer IR Clock Enable */
++#define CKEN_USIM0 17 /* < USIM[0] Clock Enable */
++#define CKEN_USIM1 18 /* < USIM[1] Clock Enable */
++#define CKEN_TPM 19 /* < TPM clock enable */
++#define CKEN_UDC 20 /* < UDC clock enable */
++#define CKEN_BTUART 21 /* < BTUART clock enable */
++#define CKEN_FFUART 22 /* < FFUART clock enable */
++#define CKEN_STUART 23 /* < STUART clock enable */
++#define CKEN_AC97 24 /* < AC97 clock enable */
++#define CKEN_TOUCH 25 /* < Touch screen Interface Clock Enable */
++#define CKEN_SSP1 26 /* < SSP1 clock enable */
++#define CKEN_SSP2 27 /* < SSP2 clock enable */
++#define CKEN_SSP3 28 /* < SSP3 clock enable */
++#define CKEN_SSP4 29 /* < SSP4 clock enable */
++#define CKEN_MSL0 30 /* < MSL0 clock enable */
++#define CKEN_PWM0 32 /* < PWM[0] clock enable */
++#define CKEN_PWM1 33 /* < PWM[1] clock enable */
++#define CKEN_I2C 36 /* < I2C clock enable */
++#define CKEN_INTC 38 /* < Interrupt controller clock enable */
++#define CKEN_GPIO 39 /* < GPIO clock enable */
++#define CKEN_1WIRE 40 /* < 1-wire clock enable */
++#define CKEN_HSIO2 41 /* < HSIO2 clock enable */
++#define CKEN_MINI_IM 48 /* < Mini-IM */
++#define CKEN_MINI_LCD 49 /* < Mini LCD */
++
++#if defined(CONFIG_CPU_PXA310)
++#define CKEN_MMC3 5 /* < MMC3 Clock Enable */
++#define CKEN_MVED 43 /* < MVED clock enable */
++#endif
++
++/* Note: GCU clock enable bit differs on PXA300/PXA310 and PXA320 */
++#define PXA300_CKEN_GRAPHICS 42 /* Graphics controller clock enable */
++#define PXA320_CKEN_GRAPHICS 7 /* Graphics controller clock enable */
++
++#endif /* __ASM_ARCH_PXA3XX_REGS_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pxafb.h linux-2.6.25-rc4/include/asm-arm/arch/pxafb.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pxafb.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pxafb.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,85 @@
++/*
++ * linux/include/asm-arm/arch-pxa/pxafb.h
++ *
++ * Support for the xscale frame buffer.
++ *
++ * Author: Jean-Frederic Clere
++ * Created: Sep 22, 2003
++ * Copyright: jfclere@sinix.net
++ *
++ * 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.
++ */
++
++#include <linux/fb.h>
++
++/*
++ * This structure describes the machine which we are running on.
++ * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
++ * of linux/drivers/video/pxafb.c
++ */
++struct pxafb_mode_info {
++ u_long pixclock;
++
++ u_short xres;
++ u_short yres;
++
++ u_char bpp;
++ u_char hsync_len;
++ u_char left_margin;
++ u_char right_margin;
++
++ u_char vsync_len;
++ u_char upper_margin;
++ u_char lower_margin;
++ u_char sync;
++
++ u_int cmap_greyscale:1,
++ unused:31;
++};
++
++struct pxafb_mach_info {
++ struct pxafb_mode_info *modes;
++ unsigned int num_modes;
++
++ u_int fixed_modes:1,
++ cmap_inverse:1,
++ cmap_static:1,
++ unused:29;
++
++ /* The following should be defined in LCCR0
++ * LCCR0_Act or LCCR0_Pas Active or Passive
++ * LCCR0_Sngl or LCCR0_Dual Single/Dual panel
++ * LCCR0_Mono or LCCR0_Color Mono/Color
++ * LCCR0_4PixMono or LCCR0_8PixMono (in mono single mode)
++ * LCCR0_DMADel(Tcpu) (optional) DMA request delay
++ *
++ * The following should not be defined in LCCR0:
++ * LCCR0_OUM, LCCR0_BM, LCCR0_QDM, LCCR0_DIS, LCCR0_EFM
++ * LCCR0_IUM, LCCR0_SFM, LCCR0_LDM, LCCR0_ENB
++ */
++ u_int lccr0;
++ /* The following should be defined in LCCR3
++ * LCCR3_OutEnH or LCCR3_OutEnL Output enable polarity
++ * LCCR3_PixRsEdg or LCCR3_PixFlEdg Pixel clock edge type
++ * LCCR3_Acb(X) AB Bias pin frequency
++ * LCCR3_DPC (optional) Double Pixel Clock mode (untested)
++ *
++ * The following should not be defined in LCCR3
++ * LCCR3_HSP, LCCR3_VSP, LCCR0_Pcd(x), LCCR3_Bpp
++ */
++ u_int lccr3;
++ /* The following should be defined in LCCR4
++ * LCCR4_PAL_FOR_0 or LCCR4_PAL_FOR_1 or LCCR4_PAL_FOR_2
++ *
++ * All other bits in LCCR4 should be left alone.
++ */
++ u_int lccr4;
++ void (*pxafb_backlight_power)(int);
++ void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
++
++};
++void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
++void set_pxa_fb_parent(struct device *parent_dev);
++unsigned long pxafb_get_hsync_time(struct device *dev);
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa-regs.h linux-2.6.25-rc4/include/asm-arm/arch/pxa-regs.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/pxa-regs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/pxa-regs.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,2150 @@
++/*
++ * linux/include/asm-arm/arch-pxa/pxa-regs.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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 __PXA_REGS_H
++#define __PXA_REGS_H
++
++
++/*
++ * PXA Chip selects
++ */
++
++#define PXA_CS0_PHYS 0x00000000
++#define PXA_CS1_PHYS 0x04000000
++#define PXA_CS2_PHYS 0x08000000
++#define PXA_CS3_PHYS 0x0C000000
++#define PXA_CS4_PHYS 0x10000000
++#define PXA_CS5_PHYS 0x14000000
++
++
++/*
++ * Personal Computer Memory Card International Association (PCMCIA) sockets
++ */
++
++#define PCMCIAPrtSp 0x04000000 /* PCMCIA Partition Space [byte] */
++#define PCMCIASp (4*PCMCIAPrtSp) /* PCMCIA Space [byte] */
++#define PCMCIAIOSp PCMCIAPrtSp /* PCMCIA I/O Space [byte] */
++#define PCMCIAAttrSp PCMCIAPrtSp /* PCMCIA Attribute Space [byte] */
++#define PCMCIAMemSp PCMCIAPrtSp /* PCMCIA Memory Space [byte] */
++
++#define PCMCIA0Sp PCMCIASp /* PCMCIA 0 Space [byte] */
++#define PCMCIA0IOSp PCMCIAIOSp /* PCMCIA 0 I/O Space [byte] */
++#define PCMCIA0AttrSp PCMCIAAttrSp /* PCMCIA 0 Attribute Space [byte] */
++#define PCMCIA0MemSp PCMCIAMemSp /* PCMCIA 0 Memory Space [byte] */
++
++#define PCMCIA1Sp PCMCIASp /* PCMCIA 1 Space [byte] */
++#define PCMCIA1IOSp PCMCIAIOSp /* PCMCIA 1 I/O Space [byte] */
++#define PCMCIA1AttrSp PCMCIAAttrSp /* PCMCIA 1 Attribute Space [byte] */
++#define PCMCIA1MemSp PCMCIAMemSp /* PCMCIA 1 Memory Space [byte] */
++
++#define _PCMCIA(Nb) /* PCMCIA [0..1] */ \
++ (0x20000000 + (Nb)*PCMCIASp)
++#define _PCMCIAIO(Nb) _PCMCIA (Nb) /* PCMCIA I/O [0..1] */
++#define _PCMCIAAttr(Nb) /* PCMCIA Attribute [0..1] */ \
++ (_PCMCIA (Nb) + 2*PCMCIAPrtSp)
++#define _PCMCIAMem(Nb) /* PCMCIA Memory [0..1] */ \
++ (_PCMCIA (Nb) + 3*PCMCIAPrtSp)
++
++#define _PCMCIA0 _PCMCIA (0) /* PCMCIA 0 */
++#define _PCMCIA0IO _PCMCIAIO (0) /* PCMCIA 0 I/O */
++#define _PCMCIA0Attr _PCMCIAAttr (0) /* PCMCIA 0 Attribute */
++#define _PCMCIA0Mem _PCMCIAMem (0) /* PCMCIA 0 Memory */
++
++#define _PCMCIA1 _PCMCIA (1) /* PCMCIA 1 */
++#define _PCMCIA1IO _PCMCIAIO (1) /* PCMCIA 1 I/O */
++#define _PCMCIA1Attr _PCMCIAAttr (1) /* PCMCIA 1 Attribute */
++#define _PCMCIA1Mem _PCMCIAMem (1) /* PCMCIA 1 Memory */
++
++
++
++/*
++ * DMA Controller
++ */
++
++#define DCSR0 __REG(0x40000000) /* DMA Control / Status Register for Channel 0 */
++#define DCSR1 __REG(0x40000004) /* DMA Control / Status Register for Channel 1 */
++#define DCSR2 __REG(0x40000008) /* DMA Control / Status Register for Channel 2 */
++#define DCSR3 __REG(0x4000000c) /* DMA Control / Status Register for Channel 3 */
++#define DCSR4 __REG(0x40000010) /* DMA Control / Status Register for Channel 4 */
++#define DCSR5 __REG(0x40000014) /* DMA Control / Status Register for Channel 5 */
++#define DCSR6 __REG(0x40000018) /* DMA Control / Status Register for Channel 6 */
++#define DCSR7 __REG(0x4000001c) /* DMA Control / Status Register for Channel 7 */
++#define DCSR8 __REG(0x40000020) /* DMA Control / Status Register for Channel 8 */
++#define DCSR9 __REG(0x40000024) /* DMA Control / Status Register for Channel 9 */
++#define DCSR10 __REG(0x40000028) /* DMA Control / Status Register for Channel 10 */
++#define DCSR11 __REG(0x4000002c) /* DMA Control / Status Register for Channel 11 */
++#define DCSR12 __REG(0x40000030) /* DMA Control / Status Register for Channel 12 */
++#define DCSR13 __REG(0x40000034) /* DMA Control / Status Register for Channel 13 */
++#define DCSR14 __REG(0x40000038) /* DMA Control / Status Register for Channel 14 */
++#define DCSR15 __REG(0x4000003c) /* DMA Control / Status Register for Channel 15 */
++
++#define DCSR(x) __REG2(0x40000000, (x) << 2)
++
++#define DCSR_RUN (1 << 31) /* Run Bit (read / write) */
++#define DCSR_NODESC (1 << 30) /* No-Descriptor Fetch (read / write) */
++#define DCSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable (read / write) */
++#ifdef CONFIG_PXA27x
++#define DCSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable (R/W) */
++#define DCSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */
++#define DCSR_EORSTOPEN (1 << 26) /* STOP on an EOR */
++#define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */
++#define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */
++#define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */
++#define DCSR_EORINTR (1 << 9) /* The end of Receive */
++#endif
++#define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */
++#define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */
++#define DCSR_ENDINTR (1 << 2) /* End Interrupt (read / write) */
++#define DCSR_STARTINTR (1 << 1) /* Start Interrupt (read / write) */
++#define DCSR_BUSERR (1 << 0) /* Bus Error Interrupt (read / write) */
++
++#define DALGN __REG(0x400000a0) /* DMA Alignment Register */
++#define DINT __REG(0x400000f0) /* DMA Interrupt Register */
++
++#define DRCMR(n) (*(((n) < 64) ? \
++ &__REG2(0x40000100, ((n) & 0x3f) << 2) : \
++ &__REG2(0x40001100, ((n) & 0x3f) << 2)))
++
++#define DRCMR0 __REG(0x40000100) /* Request to Channel Map Register for DREQ 0 */
++#define DRCMR1 __REG(0x40000104) /* Request to Channel Map Register for DREQ 1 */
++#define DRCMR2 __REG(0x40000108) /* Request to Channel Map Register for I2S receive Request */
++#define DRCMR3 __REG(0x4000010c) /* Request to Channel Map Register for I2S transmit Request */
++#define DRCMR4 __REG(0x40000110) /* Request to Channel Map Register for BTUART receive Request */
++#define DRCMR5 __REG(0x40000114) /* Request to Channel Map Register for BTUART transmit Request. */
++#define DRCMR6 __REG(0x40000118) /* Request to Channel Map Register for FFUART receive Request */
++#define DRCMR7 __REG(0x4000011c) /* Request to Channel Map Register for FFUART transmit Request */
++#define DRCMR8 __REG(0x40000120) /* Request to Channel Map Register for AC97 microphone Request */
++#define DRCMR9 __REG(0x40000124) /* Request to Channel Map Register for AC97 modem receive Request */
++#define DRCMR10 __REG(0x40000128) /* Request to Channel Map Register for AC97 modem transmit Request */
++#define DRCMR11 __REG(0x4000012c) /* Request to Channel Map Register for AC97 audio receive Request */
++#define DRCMR12 __REG(0x40000130) /* Request to Channel Map Register for AC97 audio transmit Request */
++#define DRCMR13 __REG(0x40000134) /* Request to Channel Map Register for SSP receive Request */
++#define DRCMR14 __REG(0x40000138) /* Request to Channel Map Register for SSP transmit Request */
++#define DRCMR15 __REG(0x4000013c) /* Request to Channel Map Register for SSP2 receive Request */
++#define DRCMR16 __REG(0x40000140) /* Request to Channel Map Register for SSP2 transmit Request */
++#define DRCMR17 __REG(0x40000144) /* Request to Channel Map Register for ICP receive Request */
++#define DRCMR18 __REG(0x40000148) /* Request to Channel Map Register for ICP transmit Request */
++#define DRCMR19 __REG(0x4000014c) /* Request to Channel Map Register for STUART receive Request */
++#define DRCMR20 __REG(0x40000150) /* Request to Channel Map Register for STUART transmit Request */
++#define DRCMR21 __REG(0x40000154) /* Request to Channel Map Register for MMC receive Request */
++#define DRCMR22 __REG(0x40000158) /* Request to Channel Map Register for MMC transmit Request */
++#define DRCMR23 __REG(0x4000015c) /* Reserved */
++#define DRCMR24 __REG(0x40000160) /* Reserved */
++#define DRCMR25 __REG(0x40000164) /* Request to Channel Map Register for USB endpoint 1 Request */
++#define DRCMR26 __REG(0x40000168) /* Request to Channel Map Register for USB endpoint 2 Request */
++#define DRCMR27 __REG(0x4000016C) /* Request to Channel Map Register for USB endpoint 3 Request */
++#define DRCMR28 __REG(0x40000170) /* Request to Channel Map Register for USB endpoint 4 Request */
++#define DRCMR29 __REG(0x40000174) /* Reserved */
++#define DRCMR30 __REG(0x40000178) /* Request to Channel Map Register for USB endpoint 6 Request */
++#define DRCMR31 __REG(0x4000017C) /* Request to Channel Map Register for USB endpoint 7 Request */
++#define DRCMR32 __REG(0x40000180) /* Request to Channel Map Register for USB endpoint 8 Request */
++#define DRCMR33 __REG(0x40000184) /* Request to Channel Map Register for USB endpoint 9 Request */
++#define DRCMR34 __REG(0x40000188) /* Reserved */
++#define DRCMR35 __REG(0x4000018C) /* Request to Channel Map Register for USB endpoint 11 Request */
++#define DRCMR36 __REG(0x40000190) /* Request to Channel Map Register for USB endpoint 12 Request */
++#define DRCMR37 __REG(0x40000194) /* Request to Channel Map Register for USB endpoint 13 Request */
++#define DRCMR38 __REG(0x40000198) /* Request to Channel Map Register for USB endpoint 14 Request */
++#define DRCMR39 __REG(0x4000019C) /* Reserved */
++#define DRCMR66 __REG(0x40001108) /* Request to Channel Map Register for SSP3 receive Request */
++#define DRCMR67 __REG(0x4000110C) /* Request to Channel Map Register for SSP3 transmit Request */
++#define DRCMR68 __REG(0x40001110) /* Request to Channel Map Register for Camera FIFO 0 Request */
++#define DRCMR69 __REG(0x40001114) /* Request to Channel Map Register for Camera FIFO 1 Request */
++#define DRCMR70 __REG(0x40001118) /* Request to Channel Map Register for Camera FIFO 2 Request */
++
++#define DRCMRRXSADR DRCMR2
++#define DRCMRTXSADR DRCMR3
++#define DRCMRRXBTRBR DRCMR4
++#define DRCMRTXBTTHR DRCMR5
++#define DRCMRRXFFRBR DRCMR6
++#define DRCMRTXFFTHR DRCMR7
++#define DRCMRRXMCDR DRCMR8
++#define DRCMRRXMODR DRCMR9
++#define DRCMRTXMODR DRCMR10
++#define DRCMRRXPCDR DRCMR11
++#define DRCMRTXPCDR DRCMR12
++#define DRCMRRXSSDR DRCMR13
++#define DRCMRTXSSDR DRCMR14
++#define DRCMRRXSS2DR DRCMR15
++#define DRCMRTXSS2DR DRCMR16
++#define DRCMRRXICDR DRCMR17
++#define DRCMRTXICDR DRCMR18
++#define DRCMRRXSTRBR DRCMR19
++#define DRCMRTXSTTHR DRCMR20
++#define DRCMRRXMMC DRCMR21
++#define DRCMRTXMMC DRCMR22
++#define DRCMRRXSS3DR DRCMR66
++#define DRCMRTXSS3DR DRCMR67
++#define DRCMRUDC(x) DRCMR((x) + 24)
++
++#define DRCMR_MAPVLD (1 << 7) /* Map Valid (read / write) */
++#define DRCMR_CHLNUM 0x1f /* mask for Channel Number (read / write) */
++
++#define DDADR0 __REG(0x40000200) /* DMA Descriptor Address Register Channel 0 */
++#define DSADR0 __REG(0x40000204) /* DMA Source Address Register Channel 0 */
++#define DTADR0 __REG(0x40000208) /* DMA Target Address Register Channel 0 */
++#define DCMD0 __REG(0x4000020c) /* DMA Command Address Register Channel 0 */
++#define DDADR1 __REG(0x40000210) /* DMA Descriptor Address Register Channel 1 */
++#define DSADR1 __REG(0x40000214) /* DMA Source Address Register Channel 1 */
++#define DTADR1 __REG(0x40000218) /* DMA Target Address Register Channel 1 */
++#define DCMD1 __REG(0x4000021c) /* DMA Command Address Register Channel 1 */
++#define DDADR2 __REG(0x40000220) /* DMA Descriptor Address Register Channel 2 */
++#define DSADR2 __REG(0x40000224) /* DMA Source Address Register Channel 2 */
++#define DTADR2 __REG(0x40000228) /* DMA Target Address Register Channel 2 */
++#define DCMD2 __REG(0x4000022c) /* DMA Command Address Register Channel 2 */
++#define DDADR3 __REG(0x40000230) /* DMA Descriptor Address Register Channel 3 */
++#define DSADR3 __REG(0x40000234) /* DMA Source Address Register Channel 3 */
++#define DTADR3 __REG(0x40000238) /* DMA Target Address Register Channel 3 */
++#define DCMD3 __REG(0x4000023c) /* DMA Command Address Register Channel 3 */
++#define DDADR4 __REG(0x40000240) /* DMA Descriptor Address Register Channel 4 */
++#define DSADR4 __REG(0x40000244) /* DMA Source Address Register Channel 4 */
++#define DTADR4 __REG(0x40000248) /* DMA Target Address Register Channel 4 */
++#define DCMD4 __REG(0x4000024c) /* DMA Command Address Register Channel 4 */
++#define DDADR5 __REG(0x40000250) /* DMA Descriptor Address Register Channel 5 */
++#define DSADR5 __REG(0x40000254) /* DMA Source Address Register Channel 5 */
++#define DTADR5 __REG(0x40000258) /* DMA Target Address Register Channel 5 */
++#define DCMD5 __REG(0x4000025c) /* DMA Command Address Register Channel 5 */
++#define DDADR6 __REG(0x40000260) /* DMA Descriptor Address Register Channel 6 */
++#define DSADR6 __REG(0x40000264) /* DMA Source Address Register Channel 6 */
++#define DTADR6 __REG(0x40000268) /* DMA Target Address Register Channel 6 */
++#define DCMD6 __REG(0x4000026c) /* DMA Command Address Register Channel 6 */
++#define DDADR7 __REG(0x40000270) /* DMA Descriptor Address Register Channel 7 */
++#define DSADR7 __REG(0x40000274) /* DMA Source Address Register Channel 7 */
++#define DTADR7 __REG(0x40000278) /* DMA Target Address Register Channel 7 */
++#define DCMD7 __REG(0x4000027c) /* DMA Command Address Register Channel 7 */
++#define DDADR8 __REG(0x40000280) /* DMA Descriptor Address Register Channel 8 */
++#define DSADR8 __REG(0x40000284) /* DMA Source Address Register Channel 8 */
++#define DTADR8 __REG(0x40000288) /* DMA Target Address Register Channel 8 */
++#define DCMD8 __REG(0x4000028c) /* DMA Command Address Register Channel 8 */
++#define DDADR9 __REG(0x40000290) /* DMA Descriptor Address Register Channel 9 */
++#define DSADR9 __REG(0x40000294) /* DMA Source Address Register Channel 9 */
++#define DTADR9 __REG(0x40000298) /* DMA Target Address Register Channel 9 */
++#define DCMD9 __REG(0x4000029c) /* DMA Command Address Register Channel 9 */
++#define DDADR10 __REG(0x400002a0) /* DMA Descriptor Address Register Channel 10 */
++#define DSADR10 __REG(0x400002a4) /* DMA Source Address Register Channel 10 */
++#define DTADR10 __REG(0x400002a8) /* DMA Target Address Register Channel 10 */
++#define DCMD10 __REG(0x400002ac) /* DMA Command Address Register Channel 10 */
++#define DDADR11 __REG(0x400002b0) /* DMA Descriptor Address Register Channel 11 */
++#define DSADR11 __REG(0x400002b4) /* DMA Source Address Register Channel 11 */
++#define DTADR11 __REG(0x400002b8) /* DMA Target Address Register Channel 11 */
++#define DCMD11 __REG(0x400002bc) /* DMA Command Address Register Channel 11 */
++#define DDADR12 __REG(0x400002c0) /* DMA Descriptor Address Register Channel 12 */
++#define DSADR12 __REG(0x400002c4) /* DMA Source Address Register Channel 12 */
++#define DTADR12 __REG(0x400002c8) /* DMA Target Address Register Channel 12 */
++#define DCMD12 __REG(0x400002cc) /* DMA Command Address Register Channel 12 */
++#define DDADR13 __REG(0x400002d0) /* DMA Descriptor Address Register Channel 13 */
++#define DSADR13 __REG(0x400002d4) /* DMA Source Address Register Channel 13 */
++#define DTADR13 __REG(0x400002d8) /* DMA Target Address Register Channel 13 */
++#define DCMD13 __REG(0x400002dc) /* DMA Command Address Register Channel 13 */
++#define DDADR14 __REG(0x400002e0) /* DMA Descriptor Address Register Channel 14 */
++#define DSADR14 __REG(0x400002e4) /* DMA Source Address Register Channel 14 */
++#define DTADR14 __REG(0x400002e8) /* DMA Target Address Register Channel 14 */
++#define DCMD14 __REG(0x400002ec) /* DMA Command Address Register Channel 14 */
++#define DDADR15 __REG(0x400002f0) /* DMA Descriptor Address Register Channel 15 */
++#define DSADR15 __REG(0x400002f4) /* DMA Source Address Register Channel 15 */
++#define DTADR15 __REG(0x400002f8) /* DMA Target Address Register Channel 15 */
++#define DCMD15 __REG(0x400002fc) /* DMA Command Address Register Channel 15 */
++
++#define DDADR(x) __REG2(0x40000200, (x) << 4)
++#define DSADR(x) __REG2(0x40000204, (x) << 4)
++#define DTADR(x) __REG2(0x40000208, (x) << 4)
++#define DCMD(x) __REG2(0x4000020c, (x) << 4)
++
++#define DDADR_DESCADDR 0xfffffff0 /* Address of next descriptor (mask) */
++#define DDADR_STOP (1 << 0) /* Stop (read / write) */
++
++#define DCMD_INCSRCADDR (1 << 31) /* Source Address Increment Setting. */
++#define DCMD_INCTRGADDR (1 << 30) /* Target Address Increment Setting. */
++#define DCMD_FLOWSRC (1 << 29) /* Flow Control by the source. */
++#define DCMD_FLOWTRG (1 << 28) /* Flow Control by the target. */
++#define DCMD_STARTIRQEN (1 << 22) /* Start Interrupt Enable */
++#define DCMD_ENDIRQEN (1 << 21) /* End Interrupt Enable */
++#define DCMD_ENDIAN (1 << 18) /* Device Endian-ness. */
++#define DCMD_BURST8 (1 << 16) /* 8 byte burst */
++#define DCMD_BURST16 (2 << 16) /* 16 byte burst */
++#define DCMD_BURST32 (3 << 16) /* 32 byte burst */
++#define DCMD_WIDTH1 (1 << 14) /* 1 byte width */
++#define DCMD_WIDTH2 (2 << 14) /* 2 byte width (HalfWord) */
++#define DCMD_WIDTH4 (3 << 14) /* 4 byte width (Word) */
++#define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */
++
++
++/*
++ * UARTs
++ */
++
++/* Full Function UART (FFUART) */
++#define FFUART FFRBR
++#define FFRBR __REG(0x40100000) /* Receive Buffer Register (read only) */
++#define FFTHR __REG(0x40100000) /* Transmit Holding Register (write only) */
++#define FFIER __REG(0x40100004) /* Interrupt Enable Register (read/write) */
++#define FFIIR __REG(0x40100008) /* Interrupt ID Register (read only) */
++#define FFFCR __REG(0x40100008) /* FIFO Control Register (write only) */
++#define FFLCR __REG(0x4010000C) /* Line Control Register (read/write) */
++#define FFMCR __REG(0x40100010) /* Modem Control Register (read/write) */
++#define FFLSR __REG(0x40100014) /* Line Status Register (read only) */
++#define FFMSR __REG(0x40100018) /* Modem Status Register (read only) */
++#define FFSPR __REG(0x4010001C) /* Scratch Pad Register (read/write) */
++#define FFISR __REG(0x40100020) /* Infrared Selection Register (read/write) */
++#define FFDLL __REG(0x40100000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
++#define FFDLH __REG(0x40100004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
++
++/* Bluetooth UART (BTUART) */
++#define BTUART BTRBR
++#define BTRBR __REG(0x40200000) /* Receive Buffer Register (read only) */
++#define BTTHR __REG(0x40200000) /* Transmit Holding Register (write only) */
++#define BTIER __REG(0x40200004) /* Interrupt Enable Register (read/write) */
++#define BTIIR __REG(0x40200008) /* Interrupt ID Register (read only) */
++#define BTFCR __REG(0x40200008) /* FIFO Control Register (write only) */
++#define BTLCR __REG(0x4020000C) /* Line Control Register (read/write) */
++#define BTMCR __REG(0x40200010) /* Modem Control Register (read/write) */
++#define BTLSR __REG(0x40200014) /* Line Status Register (read only) */
++#define BTMSR __REG(0x40200018) /* Modem Status Register (read only) */
++#define BTSPR __REG(0x4020001C) /* Scratch Pad Register (read/write) */
++#define BTISR __REG(0x40200020) /* Infrared Selection Register (read/write) */
++#define BTDLL __REG(0x40200000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
++#define BTDLH __REG(0x40200004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
++
++/* Standard UART (STUART) */
++#define STUART STRBR
++#define STRBR __REG(0x40700000) /* Receive Buffer Register (read only) */
++#define STTHR __REG(0x40700000) /* Transmit Holding Register (write only) */
++#define STIER __REG(0x40700004) /* Interrupt Enable Register (read/write) */
++#define STIIR __REG(0x40700008) /* Interrupt ID Register (read only) */
++#define STFCR __REG(0x40700008) /* FIFO Control Register (write only) */
++#define STLCR __REG(0x4070000C) /* Line Control Register (read/write) */
++#define STMCR __REG(0x40700010) /* Modem Control Register (read/write) */
++#define STLSR __REG(0x40700014) /* Line Status Register (read only) */
++#define STMSR __REG(0x40700018) /* Reserved */
++#define STSPR __REG(0x4070001C) /* Scratch Pad Register (read/write) */
++#define STISR __REG(0x40700020) /* Infrared Selection Register (read/write) */
++#define STDLL __REG(0x40700000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
++#define STDLH __REG(0x40700004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
++
++/* Hardware UART (HWUART) */
++#define HWUART HWRBR
++#define HWRBR __REG(0x41600000) /* Receive Buffer Register (read only) */
++#define HWTHR __REG(0x41600000) /* Transmit Holding Register (write only) */
++#define HWIER __REG(0x41600004) /* Interrupt Enable Register (read/write) */
++#define HWIIR __REG(0x41600008) /* Interrupt ID Register (read only) */
++#define HWFCR __REG(0x41600008) /* FIFO Control Register (write only) */
++#define HWLCR __REG(0x4160000C) /* Line Control Register (read/write) */
++#define HWMCR __REG(0x41600010) /* Modem Control Register (read/write) */
++#define HWLSR __REG(0x41600014) /* Line Status Register (read only) */
++#define HWMSR __REG(0x41600018) /* Modem Status Register (read only) */
++#define HWSPR __REG(0x4160001C) /* Scratch Pad Register (read/write) */
++#define HWISR __REG(0x41600020) /* Infrared Selection Register (read/write) */
++#define HWFOR __REG(0x41600024) /* Receive FIFO Occupancy Register (read only) */
++#define HWABR __REG(0x41600028) /* Auto-Baud Control Register (read/write) */
++#define HWACR __REG(0x4160002C) /* Auto-Baud Count Register (read only) */
++#define HWDLL __REG(0x41600000) /* Divisor Latch Low Register (DLAB = 1) (read/write) */
++#define HWDLH __REG(0x41600004) /* Divisor Latch High Register (DLAB = 1) (read/write) */
++
++#define IER_DMAE (1 << 7) /* DMA Requests Enable */
++#define IER_UUE (1 << 6) /* UART Unit Enable */
++#define IER_NRZE (1 << 5) /* NRZ coding Enable */
++#define IER_RTIOE (1 << 4) /* Receiver Time Out Interrupt Enable */
++#define IER_MIE (1 << 3) /* Modem Interrupt Enable */
++#define IER_RLSE (1 << 2) /* Receiver Line Status Interrupt Enable */
++#define IER_TIE (1 << 1) /* Transmit Data request Interrupt Enable */
++#define IER_RAVIE (1 << 0) /* Receiver Data Available Interrupt Enable */
++
++#define IIR_FIFOES1 (1 << 7) /* FIFO Mode Enable Status */
++#define IIR_FIFOES0 (1 << 6) /* FIFO Mode Enable Status */
++#define IIR_TOD (1 << 3) /* Time Out Detected */
++#define IIR_IID2 (1 << 2) /* Interrupt Source Encoded */
++#define IIR_IID1 (1 << 1) /* Interrupt Source Encoded */
++#define IIR_IP (1 << 0) /* Interrupt Pending (active low) */
++
++#define FCR_ITL2 (1 << 7) /* Interrupt Trigger Level */
++#define FCR_ITL1 (1 << 6) /* Interrupt Trigger Level */
++#define FCR_RESETTF (1 << 2) /* Reset Transmitter FIFO */
++#define FCR_RESETRF (1 << 1) /* Reset Receiver FIFO */
++#define FCR_TRFIFOE (1 << 0) /* Transmit and Receive FIFO Enable */
++#define FCR_ITL_1 (0)
++#define FCR_ITL_8 (FCR_ITL1)
++#define FCR_ITL_16 (FCR_ITL2)
++#define FCR_ITL_32 (FCR_ITL2|FCR_ITL1)
++
++#define LCR_DLAB (1 << 7) /* Divisor Latch Access Bit */
++#define LCR_SB (1 << 6) /* Set Break */
++#define LCR_STKYP (1 << 5) /* Sticky Parity */
++#define LCR_EPS (1 << 4) /* Even Parity Select */
++#define LCR_PEN (1 << 3) /* Parity Enable */
++#define LCR_STB (1 << 2) /* Stop Bit */
++#define LCR_WLS1 (1 << 1) /* Word Length Select */
++#define LCR_WLS0 (1 << 0) /* Word Length Select */
++
++#define LSR_FIFOE (1 << 7) /* FIFO Error Status */
++#define LSR_TEMT (1 << 6) /* Transmitter Empty */
++#define LSR_TDRQ (1 << 5) /* Transmit Data Request */
++#define LSR_BI (1 << 4) /* Break Interrupt */
++#define LSR_FE (1 << 3) /* Framing Error */
++#define LSR_PE (1 << 2) /* Parity Error */
++#define LSR_OE (1 << 1) /* Overrun Error */
++#define LSR_DR (1 << 0) /* Data Ready */
++
++#define MCR_LOOP (1 << 4)
++#define MCR_OUT2 (1 << 3) /* force MSR_DCD in loopback mode */
++#define MCR_OUT1 (1 << 2) /* force MSR_RI in loopback mode */
++#define MCR_RTS (1 << 1) /* Request to Send */
++#define MCR_DTR (1 << 0) /* Data Terminal Ready */
++
++#define MSR_DCD (1 << 7) /* Data Carrier Detect */
++#define MSR_RI (1 << 6) /* Ring Indicator */
++#define MSR_DSR (1 << 5) /* Data Set Ready */
++#define MSR_CTS (1 << 4) /* Clear To Send */
++#define MSR_DDCD (1 << 3) /* Delta Data Carrier Detect */
++#define MSR_TERI (1 << 2) /* Trailing Edge Ring Indicator */
++#define MSR_DDSR (1 << 1) /* Delta Data Set Ready */
++#define MSR_DCTS (1 << 0) /* Delta Clear To Send */
++
++/*
++ * IrSR (Infrared Selection Register)
++ */
++#define STISR_RXPL (1 << 4) /* Receive Data Polarity */
++#define STISR_TXPL (1 << 3) /* Transmit Data Polarity */
++#define STISR_XMODE (1 << 2) /* Transmit Pulse Width Select */
++#define STISR_RCVEIR (1 << 1) /* Receiver SIR Enable */
++#define STISR_XMITIR (1 << 0) /* Transmitter SIR Enable */
++
++
++/*
++ * I2C registers
++ */
++
++#define IBMR __REG(0x40301680) /* I2C Bus Monitor Register - IBMR */
++#define IDBR __REG(0x40301688) /* I2C Data Buffer Register - IDBR */
++#define ICR __REG(0x40301690) /* I2C Control Register - ICR */
++#define ISR __REG(0x40301698) /* I2C Status Register - ISR */
++#define ISAR __REG(0x403016A0) /* I2C Slave Address Register - ISAR */
++
++#define PWRIBMR __REG(0x40f00180) /* Power I2C Bus Monitor Register-IBMR */
++#define PWRIDBR __REG(0x40f00188) /* Power I2C Data Buffer Register-IDBR */
++#define PWRICR __REG(0x40f00190) /* Power I2C Control Register - ICR */
++#define PWRISR __REG(0x40f00198) /* Power I2C Status Register - ISR */
++#define PWRISAR __REG(0x40f001A0) /*Power I2C Slave Address Register-ISAR */
++
++#define ICR_START (1 << 0) /* start bit */
++#define ICR_STOP (1 << 1) /* stop bit */
++#define ICR_ACKNAK (1 << 2) /* send ACK(0) or NAK(1) */
++#define ICR_TB (1 << 3) /* transfer byte bit */
++#define ICR_MA (1 << 4) /* master abort */
++#define ICR_SCLE (1 << 5) /* master clock enable */
++#define ICR_IUE (1 << 6) /* unit enable */
++#define ICR_GCD (1 << 7) /* general call disable */
++#define ICR_ITEIE (1 << 8) /* enable tx interrupts */
++#define ICR_IRFIE (1 << 9) /* enable rx interrupts */
++#define ICR_BEIE (1 << 10) /* enable bus error ints */
++#define ICR_SSDIE (1 << 11) /* slave STOP detected int enable */
++#define ICR_ALDIE (1 << 12) /* enable arbitration interrupt */
++#define ICR_SADIE (1 << 13) /* slave address detected int enable */
++#define ICR_UR (1 << 14) /* unit reset */
++
++#define ISR_RWM (1 << 0) /* read/write mode */
++#define ISR_ACKNAK (1 << 1) /* ack/nak status */
++#define ISR_UB (1 << 2) /* unit busy */
++#define ISR_IBB (1 << 3) /* bus busy */
++#define ISR_SSD (1 << 4) /* slave stop detected */
++#define ISR_ALD (1 << 5) /* arbitration loss detected */
++#define ISR_ITE (1 << 6) /* tx buffer empty */
++#define ISR_IRF (1 << 7) /* rx buffer full */
++#define ISR_GCAD (1 << 8) /* general call address detected */
++#define ISR_SAD (1 << 9) /* slave address detected */
++#define ISR_BED (1 << 10) /* bus error no ACK/NAK */
++
++
++/*
++ * Serial Audio Controller
++ */
++
++#define SACR0 __REG(0x40400000) /* Global Control Register */
++#define SACR1 __REG(0x40400004) /* Serial Audio I 2 S/MSB-Justified Control Register */
++#define SASR0 __REG(0x4040000C) /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
++#define SAIMR __REG(0x40400014) /* Serial Audio Interrupt Mask Register */
++#define SAICR __REG(0x40400018) /* Serial Audio Interrupt Clear Register */
++#define SADIV __REG(0x40400060) /* Audio Clock Divider Register. */
++#define SADR __REG(0x40400080) /* Serial Audio Data Register (TX and RX FIFO access Register). */
++
++#define SACR0_RFTH(x) ((x) << 12) /* Rx FIFO Interrupt or DMA Trigger Threshold */
++#define SACR0_TFTH(x) ((x) << 8) /* Tx FIFO Interrupt or DMA Trigger Threshold */
++#define SACR0_STRF (1 << 5) /* FIFO Select for EFWR Special Function */
++#define SACR0_EFWR (1 << 4) /* Enable EFWR Function */
++#define SACR0_RST (1 << 3) /* FIFO, i2s Register Reset */
++#define SACR0_BCKD (1 << 2) /* Bit Clock Direction */
++#define SACR0_ENB (1 << 0) /* Enable I2S Link */
++#define SACR1_ENLBF (1 << 5) /* Enable Loopback */
++#define SACR1_DRPL (1 << 4) /* Disable Replaying Function */
++#define SACR1_DREC (1 << 3) /* Disable Recording Function */
++#define SACR1_AMSL (1 << 0) /* Specify Alternate Mode */
++
++#define SASR0_I2SOFF (1 << 7) /* Controller Status */
++#define SASR0_ROR (1 << 6) /* Rx FIFO Overrun */
++#define SASR0_TUR (1 << 5) /* Tx FIFO Underrun */
++#define SASR0_RFS (1 << 4) /* Rx FIFO Service Request */
++#define SASR0_TFS (1 << 3) /* Tx FIFO Service Request */
++#define SASR0_BSY (1 << 2) /* I2S Busy */
++#define SASR0_RNE (1 << 1) /* Rx FIFO Not Empty */
++#define SASR0_TNF (1 << 0) /* Tx FIFO Not Empty */
++
++#define SAICR_ROR (1 << 6) /* Clear Rx FIFO Overrun Interrupt */
++#define SAICR_TUR (1 << 5) /* Clear Tx FIFO Underrun Interrupt */
++
++#define SAIMR_ROR (1 << 6) /* Enable Rx FIFO Overrun Condition Interrupt */
++#define SAIMR_TUR (1 << 5) /* Enable Tx FIFO Underrun Condition Interrupt */
++#define SAIMR_RFS (1 << 4) /* Enable Rx FIFO Service Interrupt */
++#define SAIMR_TFS (1 << 3) /* Enable Tx FIFO Service Interrupt */
++
++/*
++ * AC97 Controller registers
++ */
++
++#define POCR __REG(0x40500000) /* PCM Out Control Register */
++#define POCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
++#define POCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
++
++#define PICR __REG(0x40500004) /* PCM In Control Register */
++#define PICR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
++#define PICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
++
++#define MCCR __REG(0x40500008) /* Mic In Control Register */
++#define MCCR_FEIE (1 << 3) /* FIFO Error Interrupt Enable */
++#define MCCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
++
++#define GCR __REG(0x4050000C) /* Global Control Register */
++#ifdef CONFIG_PXA3xx
++#define GCR_CLKBPB (1 << 31) /* Internal clock enable */
++#endif
++#define GCR_nDMAEN (1 << 24) /* non DMA Enable */
++#define GCR_CDONE_IE (1 << 19) /* Command Done Interrupt Enable */
++#define GCR_SDONE_IE (1 << 18) /* Status Done Interrupt Enable */
++#define GCR_SECRDY_IEN (1 << 9) /* Secondary Ready Interrupt Enable */
++#define GCR_PRIRDY_IEN (1 << 8) /* Primary Ready Interrupt Enable */
++#define GCR_SECRES_IEN (1 << 5) /* Secondary Resume Interrupt Enable */
++#define GCR_PRIRES_IEN (1 << 4) /* Primary Resume Interrupt Enable */
++#define GCR_ACLINK_OFF (1 << 3) /* AC-link Shut Off */
++#define GCR_WARM_RST (1 << 2) /* AC97 Warm Reset */
++#define GCR_COLD_RST (1 << 1) /* AC'97 Cold Reset (0 = active) */
++#define GCR_GIE (1 << 0) /* Codec GPI Interrupt Enable */
++
++#define POSR __REG(0x40500010) /* PCM Out Status Register */
++#define POSR_FIFOE (1 << 4) /* FIFO error */
++#define POSR_FSR (1 << 2) /* FIFO Service Request */
++
++#define PISR __REG(0x40500014) /* PCM In Status Register */
++#define PISR_FIFOE (1 << 4) /* FIFO error */
++#define PISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
++#define PISR_FSR (1 << 2) /* FIFO Service Request */
++
++#define MCSR __REG(0x40500018) /* Mic In Status Register */
++#define MCSR_FIFOE (1 << 4) /* FIFO error */
++#define MCSR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
++#define MCSR_FSR (1 << 2) /* FIFO Service Request */
++
++#define GSR __REG(0x4050001C) /* Global Status Register */
++#define GSR_CDONE (1 << 19) /* Command Done */
++#define GSR_SDONE (1 << 18) /* Status Done */
++#define GSR_RDCS (1 << 15) /* Read Completion Status */
++#define GSR_BIT3SLT12 (1 << 14) /* Bit 3 of slot 12 */
++#define GSR_BIT2SLT12 (1 << 13) /* Bit 2 of slot 12 */
++#define GSR_BIT1SLT12 (1 << 12) /* Bit 1 of slot 12 */
++#define GSR_SECRES (1 << 11) /* Secondary Resume Interrupt */
++#define GSR_PRIRES (1 << 10) /* Primary Resume Interrupt */
++#define GSR_SCR (1 << 9) /* Secondary Codec Ready */
++#define GSR_PCR (1 << 8) /* Primary Codec Ready */
++#define GSR_MCINT (1 << 7) /* Mic In Interrupt */
++#define GSR_POINT (1 << 6) /* PCM Out Interrupt */
++#define GSR_PIINT (1 << 5) /* PCM In Interrupt */
++#define GSR_ACOFFD (1 << 3) /* AC-link Shut Off Done */
++#define GSR_MOINT (1 << 2) /* Modem Out Interrupt */
++#define GSR_MIINT (1 << 1) /* Modem In Interrupt */
++#define GSR_GSCI (1 << 0) /* Codec GPI Status Change Interrupt */
++
++#define CAR __REG(0x40500020) /* CODEC Access Register */
++#define CAR_CAIP (1 << 0) /* Codec Access In Progress */
++
++#define PCDR __REG(0x40500040) /* PCM FIFO Data Register */
++#define MCDR __REG(0x40500060) /* Mic-in FIFO Data Register */
++
++#define MOCR __REG(0x40500100) /* Modem Out Control Register */
++#define MOCR_FEIE (1 << 3) /* FIFO Error */
++#define MOCR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
++
++#define MICR __REG(0x40500108) /* Modem In Control Register */
++#define MICR_FEIE (1 << 3) /* FIFO Error */
++#define MICR_FSRIE (1 << 1) /* FIFO Service Request Interrupt Enable */
++
++#define MOSR __REG(0x40500110) /* Modem Out Status Register */
++#define MOSR_FIFOE (1 << 4) /* FIFO error */
++#define MOSR_FSR (1 << 2) /* FIFO Service Request */
++
++#define MISR __REG(0x40500118) /* Modem In Status Register */
++#define MISR_FIFOE (1 << 4) /* FIFO error */
++#define MISR_EOC (1 << 3) /* DMA End-of-Chain (exclusive clear) */
++#define MISR_FSR (1 << 2) /* FIFO Service Request */
++
++#define MODR __REG(0x40500140) /* Modem FIFO Data Register */
++
++#define PAC_REG_BASE __REG(0x40500200) /* Primary Audio Codec */
++#define SAC_REG_BASE __REG(0x40500300) /* Secondary Audio Codec */
++#define PMC_REG_BASE __REG(0x40500400) /* Primary Modem Codec */
++#define SMC_REG_BASE __REG(0x40500500) /* Secondary Modem Codec */
++
++
++/*
++ * USB Device Controller
++ * PXA25x and PXA27x USB device controller registers are different.
++ */
++#if defined(CONFIG_PXA25x)
++
++#define UDC_RES1 __REG(0x40600004) /* UDC Undocumented - Reserved1 */
++#define UDC_RES2 __REG(0x40600008) /* UDC Undocumented - Reserved2 */
++#define UDC_RES3 __REG(0x4060000C) /* UDC Undocumented - Reserved3 */
++
++#define UDCCR __REG(0x40600000) /* UDC Control Register */
++#define UDCCR_UDE (1 << 0) /* UDC enable */
++#define UDCCR_UDA (1 << 1) /* UDC active */
++#define UDCCR_RSM (1 << 2) /* Device resume */
++#define UDCCR_RESIR (1 << 3) /* Resume interrupt request */
++#define UDCCR_SUSIR (1 << 4) /* Suspend interrupt request */
++#define UDCCR_SRM (1 << 5) /* Suspend/resume interrupt mask */
++#define UDCCR_RSTIR (1 << 6) /* Reset interrupt request */
++#define UDCCR_REM (1 << 7) /* Reset interrupt mask */
++
++#define UDCCS0 __REG(0x40600010) /* UDC Endpoint 0 Control/Status Register */
++#define UDCCS0_OPR (1 << 0) /* OUT packet ready */
++#define UDCCS0_IPR (1 << 1) /* IN packet ready */
++#define UDCCS0_FTF (1 << 2) /* Flush Tx FIFO */
++#define UDCCS0_DRWF (1 << 3) /* Device remote wakeup feature */
++#define UDCCS0_SST (1 << 4) /* Sent stall */
++#define UDCCS0_FST (1 << 5) /* Force stall */
++#define UDCCS0_RNE (1 << 6) /* Receive FIFO no empty */
++#define UDCCS0_SA (1 << 7) /* Setup active */
++
++/* Bulk IN - Endpoint 1,6,11 */
++#define UDCCS1 __REG(0x40600014) /* UDC Endpoint 1 (IN) Control/Status Register */
++#define UDCCS6 __REG(0x40600028) /* UDC Endpoint 6 (IN) Control/Status Register */
++#define UDCCS11 __REG(0x4060003C) /* UDC Endpoint 11 (IN) Control/Status Register */
++
++#define UDCCS_BI_TFS (1 << 0) /* Transmit FIFO service */
++#define UDCCS_BI_TPC (1 << 1) /* Transmit packet complete */
++#define UDCCS_BI_FTF (1 << 2) /* Flush Tx FIFO */
++#define UDCCS_BI_TUR (1 << 3) /* Transmit FIFO underrun */
++#define UDCCS_BI_SST (1 << 4) /* Sent stall */
++#define UDCCS_BI_FST (1 << 5) /* Force stall */
++#define UDCCS_BI_TSP (1 << 7) /* Transmit short packet */
++
++/* Bulk OUT - Endpoint 2,7,12 */
++#define UDCCS2 __REG(0x40600018) /* UDC Endpoint 2 (OUT) Control/Status Register */
++#define UDCCS7 __REG(0x4060002C) /* UDC Endpoint 7 (OUT) Control/Status Register */
++#define UDCCS12 __REG(0x40600040) /* UDC Endpoint 12 (OUT) Control/Status Register */
++
++#define UDCCS_BO_RFS (1 << 0) /* Receive FIFO service */
++#define UDCCS_BO_RPC (1 << 1) /* Receive packet complete */
++#define UDCCS_BO_DME (1 << 3) /* DMA enable */
++#define UDCCS_BO_SST (1 << 4) /* Sent stall */
++#define UDCCS_BO_FST (1 << 5) /* Force stall */
++#define UDCCS_BO_RNE (1 << 6) /* Receive FIFO not empty */
++#define UDCCS_BO_RSP (1 << 7) /* Receive short packet */
++
++/* Isochronous IN - Endpoint 3,8,13 */
++#define UDCCS3 __REG(0x4060001C) /* UDC Endpoint 3 (IN) Control/Status Register */
++#define UDCCS8 __REG(0x40600030) /* UDC Endpoint 8 (IN) Control/Status Register */
++#define UDCCS13 __REG(0x40600044) /* UDC Endpoint 13 (IN) Control/Status Register */
++
++#define UDCCS_II_TFS (1 << 0) /* Transmit FIFO service */
++#define UDCCS_II_TPC (1 << 1) /* Transmit packet complete */
++#define UDCCS_II_FTF (1 << 2) /* Flush Tx FIFO */
++#define UDCCS_II_TUR (1 << 3) /* Transmit FIFO underrun */
++#define UDCCS_II_TSP (1 << 7) /* Transmit short packet */
++
++/* Isochronous OUT - Endpoint 4,9,14 */
++#define UDCCS4 __REG(0x40600020) /* UDC Endpoint 4 (OUT) Control/Status Register */
++#define UDCCS9 __REG(0x40600034) /* UDC Endpoint 9 (OUT) Control/Status Register */
++#define UDCCS14 __REG(0x40600048) /* UDC Endpoint 14 (OUT) Control/Status Register */
++
++#define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */
++#define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */
++#define UDCCS_IO_ROF (1 << 2) /* Receive overflow */
++#define UDCCS_IO_DME (1 << 3) /* DMA enable */
++#define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */
++#define UDCCS_IO_RSP (1 << 7) /* Receive short packet */
++
++/* Interrupt IN - Endpoint 5,10,15 */
++#define UDCCS5 __REG(0x40600024) /* UDC Endpoint 5 (Interrupt) Control/Status Register */
++#define UDCCS10 __REG(0x40600038) /* UDC Endpoint 10 (Interrupt) Control/Status Register */
++#define UDCCS15 __REG(0x4060004C) /* UDC Endpoint 15 (Interrupt) Control/Status Register */
++
++#define UDCCS_INT_TFS (1 << 0) /* Transmit FIFO service */
++#define UDCCS_INT_TPC (1 << 1) /* Transmit packet complete */
++#define UDCCS_INT_FTF (1 << 2) /* Flush Tx FIFO */
++#define UDCCS_INT_TUR (1 << 3) /* Transmit FIFO underrun */
++#define UDCCS_INT_SST (1 << 4) /* Sent stall */
++#define UDCCS_INT_FST (1 << 5) /* Force stall */
++#define UDCCS_INT_TSP (1 << 7) /* Transmit short packet */
++
++#define UFNRH __REG(0x40600060) /* UDC Frame Number Register High */
++#define UFNRL __REG(0x40600064) /* UDC Frame Number Register Low */
++#define UBCR2 __REG(0x40600068) /* UDC Byte Count Reg 2 */
++#define UBCR4 __REG(0x4060006c) /* UDC Byte Count Reg 4 */
++#define UBCR7 __REG(0x40600070) /* UDC Byte Count Reg 7 */
++#define UBCR9 __REG(0x40600074) /* UDC Byte Count Reg 9 */
++#define UBCR12 __REG(0x40600078) /* UDC Byte Count Reg 12 */
++#define UBCR14 __REG(0x4060007c) /* UDC Byte Count Reg 14 */
++#define UDDR0 __REG(0x40600080) /* UDC Endpoint 0 Data Register */
++#define UDDR1 __REG(0x40600100) /* UDC Endpoint 1 Data Register */
++#define UDDR2 __REG(0x40600180) /* UDC Endpoint 2 Data Register */
++#define UDDR3 __REG(0x40600200) /* UDC Endpoint 3 Data Register */
++#define UDDR4 __REG(0x40600400) /* UDC Endpoint 4 Data Register */
++#define UDDR5 __REG(0x406000A0) /* UDC Endpoint 5 Data Register */
++#define UDDR6 __REG(0x40600600) /* UDC Endpoint 6 Data Register */
++#define UDDR7 __REG(0x40600680) /* UDC Endpoint 7 Data Register */
++#define UDDR8 __REG(0x40600700) /* UDC Endpoint 8 Data Register */
++#define UDDR9 __REG(0x40600900) /* UDC Endpoint 9 Data Register */
++#define UDDR10 __REG(0x406000C0) /* UDC Endpoint 10 Data Register */
++#define UDDR11 __REG(0x40600B00) /* UDC Endpoint 11 Data Register */
++#define UDDR12 __REG(0x40600B80) /* UDC Endpoint 12 Data Register */
++#define UDDR13 __REG(0x40600C00) /* UDC Endpoint 13 Data Register */
++#define UDDR14 __REG(0x40600E00) /* UDC Endpoint 14 Data Register */
++#define UDDR15 __REG(0x406000E0) /* UDC Endpoint 15 Data Register */
++
++#define UICR0 __REG(0x40600050) /* UDC Interrupt Control Register 0 */
++
++#define UICR0_IM0 (1 << 0) /* Interrupt mask ep 0 */
++#define UICR0_IM1 (1 << 1) /* Interrupt mask ep 1 */
++#define UICR0_IM2 (1 << 2) /* Interrupt mask ep 2 */
++#define UICR0_IM3 (1 << 3) /* Interrupt mask ep 3 */
++#define UICR0_IM4 (1 << 4) /* Interrupt mask ep 4 */
++#define UICR0_IM5 (1 << 5) /* Interrupt mask ep 5 */
++#define UICR0_IM6 (1 << 6) /* Interrupt mask ep 6 */
++#define UICR0_IM7 (1 << 7) /* Interrupt mask ep 7 */
++
++#define UICR1 __REG(0x40600054) /* UDC Interrupt Control Register 1 */
++
++#define UICR1_IM8 (1 << 0) /* Interrupt mask ep 8 */
++#define UICR1_IM9 (1 << 1) /* Interrupt mask ep 9 */
++#define UICR1_IM10 (1 << 2) /* Interrupt mask ep 10 */
++#define UICR1_IM11 (1 << 3) /* Interrupt mask ep 11 */
++#define UICR1_IM12 (1 << 4) /* Interrupt mask ep 12 */
++#define UICR1_IM13 (1 << 5) /* Interrupt mask ep 13 */
++#define UICR1_IM14 (1 << 6) /* Interrupt mask ep 14 */
++#define UICR1_IM15 (1 << 7) /* Interrupt mask ep 15 */
++
++#define USIR0 __REG(0x40600058) /* UDC Status Interrupt Register 0 */
++
++#define USIR0_IR0 (1 << 0) /* Interrupt request ep 0 */
++#define USIR0_IR1 (1 << 1) /* Interrupt request ep 1 */
++#define USIR0_IR2 (1 << 2) /* Interrupt request ep 2 */
++#define USIR0_IR3 (1 << 3) /* Interrupt request ep 3 */
++#define USIR0_IR4 (1 << 4) /* Interrupt request ep 4 */
++#define USIR0_IR5 (1 << 5) /* Interrupt request ep 5 */
++#define USIR0_IR6 (1 << 6) /* Interrupt request ep 6 */
++#define USIR0_IR7 (1 << 7) /* Interrupt request ep 7 */
++
++#define USIR1 __REG(0x4060005C) /* UDC Status Interrupt Register 1 */
++
++#define USIR1_IR8 (1 << 0) /* Interrupt request ep 8 */
++#define USIR1_IR9 (1 << 1) /* Interrupt request ep 9 */
++#define USIR1_IR10 (1 << 2) /* Interrupt request ep 10 */
++#define USIR1_IR11 (1 << 3) /* Interrupt request ep 11 */
++#define USIR1_IR12 (1 << 4) /* Interrupt request ep 12 */
++#define USIR1_IR13 (1 << 5) /* Interrupt request ep 13 */
++#define USIR1_IR14 (1 << 6) /* Interrupt request ep 14 */
++#define USIR1_IR15 (1 << 7) /* Interrupt request ep 15 */
++
++#elif defined(CONFIG_PXA27x)
++
++#define UDCCR __REG(0x40600000) /* UDC Control Register */
++#define UDCCR_OEN (1 << 31) /* On-the-Go Enable */
++#define UDCCR_AALTHNP (1 << 30) /* A-device Alternate Host Negotiation
++ Protocol Port Support */
++#define UDCCR_AHNP (1 << 29) /* A-device Host Negotiation Protocol
++ Support */
++#define UDCCR_BHNP (1 << 28) /* B-device Host Negotiation Protocol
++ Enable */
++#define UDCCR_DWRE (1 << 16) /* Device Remote Wake-up Enable */
++#define UDCCR_ACN (0x03 << 11) /* Active UDC configuration Number */
++#define UDCCR_ACN_S 11
++#define UDCCR_AIN (0x07 << 8) /* Active UDC interface Number */
++#define UDCCR_AIN_S 8
++#define UDCCR_AAISN (0x07 << 5) /* Active UDC Alternate Interface
++ Setting Number */
++#define UDCCR_AAISN_S 5
++#define UDCCR_SMAC (1 << 4) /* Switch Endpoint Memory to Active
++ Configuration */
++#define UDCCR_EMCE (1 << 3) /* Endpoint Memory Configuration
++ Error */
++#define UDCCR_UDR (1 << 2) /* UDC Resume */
++#define UDCCR_UDA (1 << 1) /* UDC Active */
++#define UDCCR_UDE (1 << 0) /* UDC Enable */
++
++#define UDCICR0 __REG(0x40600004) /* UDC Interrupt Control Register0 */
++#define UDCICR1 __REG(0x40600008) /* UDC Interrupt Control Register1 */
++#define UDCICR_FIFOERR (1 << 1) /* FIFO Error interrupt for EP */
++#define UDCICR_PKTCOMPL (1 << 0) /* Packet Complete interrupt for EP */
++
++#define UDC_INT_FIFOERROR (0x2)
++#define UDC_INT_PACKETCMP (0x1)
++
++#define UDCICR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2))
++#define UDCICR1_IECC (1 << 31) /* IntEn - Configuration Change */
++#define UDCICR1_IESOF (1 << 30) /* IntEn - Start of Frame */
++#define UDCICR1_IERU (1 << 29) /* IntEn - Resume */
++#define UDCICR1_IESU (1 << 28) /* IntEn - Suspend */
++#define UDCICR1_IERS (1 << 27) /* IntEn - Reset */
++
++#define UDCISR0 __REG(0x4060000C) /* UDC Interrupt Status Register 0 */
++#define UDCISR1 __REG(0x40600010) /* UDC Interrupt Status Register 1 */
++#define UDCISR_INT(n,intr) (((intr) & 0x03) << (((n) & 0x0F) * 2))
++#define UDCISR1_IRCC (1 << 31) /* IntReq - Configuration Change */
++#define UDCISR1_IRSOF (1 << 30) /* IntReq - Start of Frame */
++#define UDCISR1_IRRU (1 << 29) /* IntReq - Resume */
++#define UDCISR1_IRSU (1 << 28) /* IntReq - Suspend */
++#define UDCISR1_IRRS (1 << 27) /* IntReq - Reset */
++
++#define UDCFNR __REG(0x40600014) /* UDC Frame Number Register */
++#define UDCOTGICR __REG(0x40600018) /* UDC On-The-Go interrupt control */
++#define UDCOTGICR_IESF (1 << 24) /* OTG SET_FEATURE command recvd */
++#define UDCOTGICR_IEXR (1 << 17) /* Extra Transciever Interrupt
++ Rising Edge Interrupt Enable */
++#define UDCOTGICR_IEXF (1 << 16) /* Extra Transciever Interrupt
++ Falling Edge Interrupt Enable */
++#define UDCOTGICR_IEVV40R (1 << 9) /* OTG Vbus Valid 4.0V Rising Edge
++ Interrupt Enable */
++#define UDCOTGICR_IEVV40F (1 << 8) /* OTG Vbus Valid 4.0V Falling Edge
++ Interrupt Enable */
++#define UDCOTGICR_IEVV44R (1 << 7) /* OTG Vbus Valid 4.4V Rising Edge
++ Interrupt Enable */
++#define UDCOTGICR_IEVV44F (1 << 6) /* OTG Vbus Valid 4.4V Falling Edge
++ Interrupt Enable */
++#define UDCOTGICR_IESVR (1 << 5) /* OTG Session Valid Rising Edge
++ Interrupt Enable */
++#define UDCOTGICR_IESVF (1 << 4) /* OTG Session Valid Falling Edge
++ Interrupt Enable */
++#define UDCOTGICR_IESDR (1 << 3) /* OTG A-Device SRP Detect Rising
++ Edge Interrupt Enable */
++#define UDCOTGICR_IESDF (1 << 2) /* OTG A-Device SRP Detect Falling
++ Edge Interrupt Enable */
++#define UDCOTGICR_IEIDR (1 << 1) /* OTG ID Change Rising Edge
++ Interrupt Enable */
++#define UDCOTGICR_IEIDF (1 << 0) /* OTG ID Change Falling Edge
++ Interrupt Enable */
++
++#define UP2OCR __REG(0x40600020) /* USB Port 2 Output Control register */
++
++#define UP2OCR_CPVEN (1 << 0) /* Charge Pump Vbus Enable */
++#define UP2OCR_CPVPE (1 << 1) /* Charge Pump Vbus Pulse Enable */
++#define UP2OCR_DPPDE (1 << 2) /* Host Port 2 Transceiver D+ Pull Down Enable */
++#define UP2OCR_DMPDE (1 << 3) /* Host Port 2 Transceiver D- Pull Down Enable */
++#define UP2OCR_DPPUE (1 << 4) /* Host Port 2 Transceiver D+ Pull Up Enable */
++#define UP2OCR_DMPUE (1 << 5) /* Host Port 2 Transceiver D- Pull Up Enable */
++#define UP2OCR_DPPUBE (1 << 6) /* Host Port 2 Transceiver D+ Pull Up Bypass Enable */
++#define UP2OCR_DMPUBE (1 << 7) /* Host Port 2 Transceiver D- Pull Up Bypass Enable */
++#define UP2OCR_EXSP (1 << 8) /* External Transceiver Speed Control */
++#define UP2OCR_EXSUS (1 << 9) /* External Transceiver Speed Enable */
++#define UP2OCR_IDON (1 << 10) /* OTG ID Read Enable */
++#define UP2OCR_HXS (1 << 16) /* Host Port 2 Transceiver Output Select */
++#define UP2OCR_HXOE (1 << 17) /* Host Port 2 Transceiver Output Enable */
++#define UP2OCR_SEOS (1 << 24) /* Single-Ended Output Select */
++
++#define UDCCSN(x) __REG2(0x40600100, (x) << 2)
++#define UDCCSR0 __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */
++#define UDCCSR0_SA (1 << 7) /* Setup Active */
++#define UDCCSR0_RNE (1 << 6) /* Receive FIFO Not Empty */
++#define UDCCSR0_FST (1 << 5) /* Force Stall */
++#define UDCCSR0_SST (1 << 4) /* Sent Stall */
++#define UDCCSR0_DME (1 << 3) /* DMA Enable */
++#define UDCCSR0_FTF (1 << 2) /* Flush Transmit FIFO */
++#define UDCCSR0_IPR (1 << 1) /* IN Packet Ready */
++#define UDCCSR0_OPC (1 << 0) /* OUT Packet Complete */
++
++#define UDCCSRA __REG(0x40600104) /* UDC Control/Status register - Endpoint A */
++#define UDCCSRB __REG(0x40600108) /* UDC Control/Status register - Endpoint B */
++#define UDCCSRC __REG(0x4060010C) /* UDC Control/Status register - Endpoint C */
++#define UDCCSRD __REG(0x40600110) /* UDC Control/Status register - Endpoint D */
++#define UDCCSRE __REG(0x40600114) /* UDC Control/Status register - Endpoint E */
++#define UDCCSRF __REG(0x40600118) /* UDC Control/Status register - Endpoint F */
++#define UDCCSRG __REG(0x4060011C) /* UDC Control/Status register - Endpoint G */
++#define UDCCSRH __REG(0x40600120) /* UDC Control/Status register - Endpoint H */
++#define UDCCSRI __REG(0x40600124) /* UDC Control/Status register - Endpoint I */
++#define UDCCSRJ __REG(0x40600128) /* UDC Control/Status register - Endpoint J */
++#define UDCCSRK __REG(0x4060012C) /* UDC Control/Status register - Endpoint K */
++#define UDCCSRL __REG(0x40600130) /* UDC Control/Status register - Endpoint L */
++#define UDCCSRM __REG(0x40600134) /* UDC Control/Status register - Endpoint M */
++#define UDCCSRN __REG(0x40600138) /* UDC Control/Status register - Endpoint N */
++#define UDCCSRP __REG(0x4060013C) /* UDC Control/Status register - Endpoint P */
++#define UDCCSRQ __REG(0x40600140) /* UDC Control/Status register - Endpoint Q */
++#define UDCCSRR __REG(0x40600144) /* UDC Control/Status register - Endpoint R */
++#define UDCCSRS __REG(0x40600148) /* UDC Control/Status register - Endpoint S */
++#define UDCCSRT __REG(0x4060014C) /* UDC Control/Status register - Endpoint T */
++#define UDCCSRU __REG(0x40600150) /* UDC Control/Status register - Endpoint U */
++#define UDCCSRV __REG(0x40600154) /* UDC Control/Status register - Endpoint V */
++#define UDCCSRW __REG(0x40600158) /* UDC Control/Status register - Endpoint W */
++#define UDCCSRX __REG(0x4060015C) /* UDC Control/Status register - Endpoint X */
++
++#define UDCCSR_DPE (1 << 9) /* Data Packet Error */
++#define UDCCSR_FEF (1 << 8) /* Flush Endpoint FIFO */
++#define UDCCSR_SP (1 << 7) /* Short Packet Control/Status */
++#define UDCCSR_BNE (1 << 6) /* Buffer Not Empty (IN endpoints) */
++#define UDCCSR_BNF (1 << 6) /* Buffer Not Full (OUT endpoints) */
++#define UDCCSR_FST (1 << 5) /* Force STALL */
++#define UDCCSR_SST (1 << 4) /* Sent STALL */
++#define UDCCSR_DME (1 << 3) /* DMA Enable */
++#define UDCCSR_TRN (1 << 2) /* Tx/Rx NAK */
++#define UDCCSR_PC (1 << 1) /* Packet Complete */
++#define UDCCSR_FS (1 << 0) /* FIFO needs service */
++
++#define UDCBCN(x) __REG2(0x40600200, (x)<<2)
++#define UDCBCR0 __REG(0x40600200) /* Byte Count Register - EP0 */
++#define UDCBCRA __REG(0x40600204) /* Byte Count Register - EPA */
++#define UDCBCRB __REG(0x40600208) /* Byte Count Register - EPB */
++#define UDCBCRC __REG(0x4060020C) /* Byte Count Register - EPC */
++#define UDCBCRD __REG(0x40600210) /* Byte Count Register - EPD */
++#define UDCBCRE __REG(0x40600214) /* Byte Count Register - EPE */
++#define UDCBCRF __REG(0x40600218) /* Byte Count Register - EPF */
++#define UDCBCRG __REG(0x4060021C) /* Byte Count Register - EPG */
++#define UDCBCRH __REG(0x40600220) /* Byte Count Register - EPH */
++#define UDCBCRI __REG(0x40600224) /* Byte Count Register - EPI */
++#define UDCBCRJ __REG(0x40600228) /* Byte Count Register - EPJ */
++#define UDCBCRK __REG(0x4060022C) /* Byte Count Register - EPK */
++#define UDCBCRL __REG(0x40600230) /* Byte Count Register - EPL */
++#define UDCBCRM __REG(0x40600234) /* Byte Count Register - EPM */
++#define UDCBCRN __REG(0x40600238) /* Byte Count Register - EPN */
++#define UDCBCRP __REG(0x4060023C) /* Byte Count Register - EPP */
++#define UDCBCRQ __REG(0x40600240) /* Byte Count Register - EPQ */
++#define UDCBCRR __REG(0x40600244) /* Byte Count Register - EPR */
++#define UDCBCRS __REG(0x40600248) /* Byte Count Register - EPS */
++#define UDCBCRT __REG(0x4060024C) /* Byte Count Register - EPT */
++#define UDCBCRU __REG(0x40600250) /* Byte Count Register - EPU */
++#define UDCBCRV __REG(0x40600254) /* Byte Count Register - EPV */
++#define UDCBCRW __REG(0x40600258) /* Byte Count Register - EPW */
++#define UDCBCRX __REG(0x4060025C) /* Byte Count Register - EPX */
++
++#define UDCDN(x) __REG2(0x40600300, (x)<<2)
++#define PHYS_UDCDN(x) (0x40600300 + ((x)<<2))
++#define PUDCDN(x) (volatile u32 *)(io_p2v(PHYS_UDCDN((x))))
++#define UDCDR0 __REG(0x40600300) /* Data Register - EP0 */
++#define UDCDRA __REG(0x40600304) /* Data Register - EPA */
++#define UDCDRB __REG(0x40600308) /* Data Register - EPB */
++#define UDCDRC __REG(0x4060030C) /* Data Register - EPC */
++#define UDCDRD __REG(0x40600310) /* Data Register - EPD */
++#define UDCDRE __REG(0x40600314) /* Data Register - EPE */
++#define UDCDRF __REG(0x40600318) /* Data Register - EPF */
++#define UDCDRG __REG(0x4060031C) /* Data Register - EPG */
++#define UDCDRH __REG(0x40600320) /* Data Register - EPH */
++#define UDCDRI __REG(0x40600324) /* Data Register - EPI */
++#define UDCDRJ __REG(0x40600328) /* Data Register - EPJ */
++#define UDCDRK __REG(0x4060032C) /* Data Register - EPK */
++#define UDCDRL __REG(0x40600330) /* Data Register - EPL */
++#define UDCDRM __REG(0x40600334) /* Data Register - EPM */
++#define UDCDRN __REG(0x40600338) /* Data Register - EPN */
++#define UDCDRP __REG(0x4060033C) /* Data Register - EPP */
++#define UDCDRQ __REG(0x40600340) /* Data Register - EPQ */
++#define UDCDRR __REG(0x40600344) /* Data Register - EPR */
++#define UDCDRS __REG(0x40600348) /* Data Register - EPS */
++#define UDCDRT __REG(0x4060034C) /* Data Register - EPT */
++#define UDCDRU __REG(0x40600350) /* Data Register - EPU */
++#define UDCDRV __REG(0x40600354) /* Data Register - EPV */
++#define UDCDRW __REG(0x40600358) /* Data Register - EPW */
++#define UDCDRX __REG(0x4060035C) /* Data Register - EPX */
++
++#define UDCCN(x) __REG2(0x40600400, (x)<<2)
++#define UDCCRA __REG(0x40600404) /* Configuration register EPA */
++#define UDCCRB __REG(0x40600408) /* Configuration register EPB */
++#define UDCCRC __REG(0x4060040C) /* Configuration register EPC */
++#define UDCCRD __REG(0x40600410) /* Configuration register EPD */
++#define UDCCRE __REG(0x40600414) /* Configuration register EPE */
++#define UDCCRF __REG(0x40600418) /* Configuration register EPF */
++#define UDCCRG __REG(0x4060041C) /* Configuration register EPG */
++#define UDCCRH __REG(0x40600420) /* Configuration register EPH */
++#define UDCCRI __REG(0x40600424) /* Configuration register EPI */
++#define UDCCRJ __REG(0x40600428) /* Configuration register EPJ */
++#define UDCCRK __REG(0x4060042C) /* Configuration register EPK */
++#define UDCCRL __REG(0x40600430) /* Configuration register EPL */
++#define UDCCRM __REG(0x40600434) /* Configuration register EPM */
++#define UDCCRN __REG(0x40600438) /* Configuration register EPN */
++#define UDCCRP __REG(0x4060043C) /* Configuration register EPP */
++#define UDCCRQ __REG(0x40600440) /* Configuration register EPQ */
++#define UDCCRR __REG(0x40600444) /* Configuration register EPR */
++#define UDCCRS __REG(0x40600448) /* Configuration register EPS */
++#define UDCCRT __REG(0x4060044C) /* Configuration register EPT */
++#define UDCCRU __REG(0x40600450) /* Configuration register EPU */
++#define UDCCRV __REG(0x40600454) /* Configuration register EPV */
++#define UDCCRW __REG(0x40600458) /* Configuration register EPW */
++#define UDCCRX __REG(0x4060045C) /* Configuration register EPX */
++
++#define UDCCONR_CN (0x03 << 25) /* Configuration Number */
++#define UDCCONR_CN_S (25)
++#define UDCCONR_IN (0x07 << 22) /* Interface Number */
++#define UDCCONR_IN_S (22)
++#define UDCCONR_AISN (0x07 << 19) /* Alternate Interface Number */
++#define UDCCONR_AISN_S (19)
++#define UDCCONR_EN (0x0f << 15) /* Endpoint Number */
++#define UDCCONR_EN_S (15)
++#define UDCCONR_ET (0x03 << 13) /* Endpoint Type: */
++#define UDCCONR_ET_S (13)
++#define UDCCONR_ET_INT (0x03 << 13) /* Interrupt */
++#define UDCCONR_ET_BULK (0x02 << 13) /* Bulk */
++#define UDCCONR_ET_ISO (0x01 << 13) /* Isochronous */
++#define UDCCONR_ET_NU (0x00 << 13) /* Not used */
++#define UDCCONR_ED (1 << 12) /* Endpoint Direction */
++#define UDCCONR_MPS (0x3ff << 2) /* Maximum Packet Size */
++#define UDCCONR_MPS_S (2)
++#define UDCCONR_DE (1 << 1) /* Double Buffering Enable */
++#define UDCCONR_EE (1 << 0) /* Endpoint Enable */
++
++
++#define UDC_INT_FIFOERROR (0x2)
++#define UDC_INT_PACKETCMP (0x1)
++
++#define UDC_FNR_MASK (0x7ff)
++
++#define UDCCSR_WR_MASK (UDCCSR_DME|UDCCSR_FST)
++#define UDC_BCR_MASK (0x3ff)
++#endif
++
++/*
++ * Fast Infrared Communication Port
++ */
++
++#define FICP __REG(0x40800000) /* Start of FICP area */
++#define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */
++#define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */
++#define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */
++#define ICDR __REG(0x4080000c) /* ICP Data Register */
++#define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */
++#define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */
++
++#define ICCR0_AME (1 << 7) /* Address match enable */
++#define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */
++#define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */
++#define ICCR0_RXE (1 << 4) /* Receive enable */
++#define ICCR0_TXE (1 << 3) /* Transmit enable */
++#define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */
++#define ICCR0_LBM (1 << 1) /* Loopback mode */
++#define ICCR0_ITR (1 << 0) /* IrDA transmission */
++
++#define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */
++#define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */
++#define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */
++#define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */
++#define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */
++#define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */
++
++#ifdef CONFIG_PXA27x
++#define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */
++#endif
++#define ICSR0_FRE (1 << 5) /* Framing error */
++#define ICSR0_RFS (1 << 4) /* Receive FIFO service request */
++#define ICSR0_TFS (1 << 3) /* Transnit FIFO service request */
++#define ICSR0_RAB (1 << 2) /* Receiver abort */
++#define ICSR0_TUR (1 << 1) /* Trunsmit FIFO underun */
++#define ICSR0_EIF (1 << 0) /* End/Error in FIFO */
++
++#define ICSR1_ROR (1 << 6) /* Receiver FIFO underrun */
++#define ICSR1_CRE (1 << 5) /* CRC error */
++#define ICSR1_EOF (1 << 4) /* End of frame */
++#define ICSR1_TNF (1 << 3) /* Transmit FIFO not full */
++#define ICSR1_RNE (1 << 2) /* Receive FIFO not empty */
++#define ICSR1_TBY (1 << 1) /* Tramsmiter busy flag */
++#define ICSR1_RSY (1 << 0) /* Recevier synchronized flag */
++
++
++/*
++ * Real Time Clock
++ */
++
++#define RCNR __REG(0x40900000) /* RTC Count Register */
++#define RTAR __REG(0x40900004) /* RTC Alarm Register */
++#define RTSR __REG(0x40900008) /* RTC Status Register */
++#define RTTR __REG(0x4090000C) /* RTC Timer Trim Register */
++#define PIAR __REG(0x40900038) /* Periodic Interrupt Alarm Register */
++
++#define RTSR_PICE (1 << 15) /* Periodic interrupt count enable */
++#define RTSR_PIALE (1 << 14) /* Periodic interrupt Alarm enable */
++#define RTSR_HZE (1 << 3) /* HZ interrupt enable */
++#define RTSR_ALE (1 << 2) /* RTC alarm interrupt enable */
++#define RTSR_HZ (1 << 1) /* HZ rising-edge detected */
++#define RTSR_AL (1 << 0) /* RTC alarm detected */
++
++
++/*
++ * OS Timer & Match Registers
++ */
++
++#define OSMR0 __REG(0x40A00000) /* */
++#define OSMR1 __REG(0x40A00004) /* */
++#define OSMR2 __REG(0x40A00008) /* */
++#define OSMR3 __REG(0x40A0000C) /* */
++#define OSMR4 __REG(0x40A00080) /* */
++#define OSCR __REG(0x40A00010) /* OS Timer Counter Register */
++#define OSCR4 __REG(0x40A00040) /* OS Timer Counter Register */
++#define OMCR4 __REG(0x40A000C0) /* */
++#define OSSR __REG(0x40A00014) /* OS Timer Status Register */
++#define OWER __REG(0x40A00018) /* OS Timer Watchdog Enable Register */
++#define OIER __REG(0x40A0001C) /* OS Timer Interrupt Enable Register */
++
++#define OSSR_M3 (1 << 3) /* Match status channel 3 */
++#define OSSR_M2 (1 << 2) /* Match status channel 2 */
++#define OSSR_M1 (1 << 1) /* Match status channel 1 */
++#define OSSR_M0 (1 << 0) /* Match status channel 0 */
++
++#define OWER_WME (1 << 0) /* Watchdog Match Enable */
++
++#define OIER_E3 (1 << 3) /* Interrupt enable channel 3 */
++#define OIER_E2 (1 << 2) /* Interrupt enable channel 2 */
++#define OIER_E1 (1 << 1) /* Interrupt enable channel 1 */
++#define OIER_E0 (1 << 0) /* Interrupt enable channel 0 */
++
++
++/*
++ * Pulse Width Modulator
++ */
++
++#define PWM_CTRL0 __REG(0x40B00000) /* PWM 0 Control Register */
++#define PWM_PWDUTY0 __REG(0x40B00004) /* PWM 0 Duty Cycle Register */
++#define PWM_PERVAL0 __REG(0x40B00008) /* PWM 0 Period Control Register */
++
++#define PWM_CTRL1 __REG(0x40C00000) /* PWM 1Control Register */
++#define PWM_PWDUTY1 __REG(0x40C00004) /* PWM 1 Duty Cycle Register */
++#define PWM_PERVAL1 __REG(0x40C00008) /* PWM 1 Period Control Register */
++
++
++/*
++ * Interrupt Controller
++ */
++
++#define ICIP __REG(0x40D00000) /* Interrupt Controller IRQ Pending Register */
++#define ICMR __REG(0x40D00004) /* Interrupt Controller Mask Register */
++#define ICLR __REG(0x40D00008) /* Interrupt Controller Level Register */
++#define ICFP __REG(0x40D0000C) /* Interrupt Controller FIQ Pending Register */
++#define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */
++#define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */
++
++
++/*
++ * General Purpose I/O
++ */
++
++#define GPIO0_BASE ((void __iomem *)io_p2v(0x40E00000))
++#define GPIO1_BASE ((void __iomem *)io_p2v(0x40E00004))
++#define GPIO2_BASE ((void __iomem *)io_p2v(0x40E00008))
++#define GPIO3_BASE ((void __iomem *)io_p2v(0x40E00100))
++
++#define GPLR_OFFSET 0x00
++#define GPDR_OFFSET 0x0C
++#define GPSR_OFFSET 0x18
++#define GPCR_OFFSET 0x24
++#define GRER_OFFSET 0x30
++#define GFER_OFFSET 0x3C
++#define GEDR_OFFSET 0x48
++
++#define GPLR0 __REG(0x40E00000) /* GPIO Pin-Level Register GPIO<31:0> */
++#define GPLR1 __REG(0x40E00004) /* GPIO Pin-Level Register GPIO<63:32> */
++#define GPLR2 __REG(0x40E00008) /* GPIO Pin-Level Register GPIO<80:64> */
++
++#define GPDR0 __REG(0x40E0000C) /* GPIO Pin Direction Register GPIO<31:0> */
++#define GPDR1 __REG(0x40E00010) /* GPIO Pin Direction Register GPIO<63:32> */
++#define GPDR2 __REG(0x40E00014) /* GPIO Pin Direction Register GPIO<80:64> */
++
++#define GPSR0 __REG(0x40E00018) /* GPIO Pin Output Set Register GPIO<31:0> */
++#define GPSR1 __REG(0x40E0001C) /* GPIO Pin Output Set Register GPIO<63:32> */
++#define GPSR2 __REG(0x40E00020) /* GPIO Pin Output Set Register GPIO<80:64> */
++
++#define GPCR0 __REG(0x40E00024) /* GPIO Pin Output Clear Register GPIO<31:0> */
++#define GPCR1 __REG(0x40E00028) /* GPIO Pin Output Clear Register GPIO <63:32> */
++#define GPCR2 __REG(0x40E0002C) /* GPIO Pin Output Clear Register GPIO <80:64> */
++
++#define GRER0 __REG(0x40E00030) /* GPIO Rising-Edge Detect Register GPIO<31:0> */
++#define GRER1 __REG(0x40E00034) /* GPIO Rising-Edge Detect Register GPIO<63:32> */
++#define GRER2 __REG(0x40E00038) /* GPIO Rising-Edge Detect Register GPIO<80:64> */
++
++#define GFER0 __REG(0x40E0003C) /* GPIO Falling-Edge Detect Register GPIO<31:0> */
++#define GFER1 __REG(0x40E00040) /* GPIO Falling-Edge Detect Register GPIO<63:32> */
++#define GFER2 __REG(0x40E00044) /* GPIO Falling-Edge Detect Register GPIO<80:64> */
++
++#define GEDR0 __REG(0x40E00048) /* GPIO Edge Detect Status Register GPIO<31:0> */
++#define GEDR1 __REG(0x40E0004C) /* GPIO Edge Detect Status Register GPIO<63:32> */
++#define GEDR2 __REG(0x40E00050) /* GPIO Edge Detect Status Register GPIO<80:64> */
++
++#define GAFR0_L __REG(0x40E00054) /* GPIO Alternate Function Select Register GPIO<15:0> */
++#define GAFR0_U __REG(0x40E00058) /* GPIO Alternate Function Select Register GPIO<31:16> */
++#define GAFR1_L __REG(0x40E0005C) /* GPIO Alternate Function Select Register GPIO<47:32> */
++#define GAFR1_U __REG(0x40E00060) /* GPIO Alternate Function Select Register GPIO<63:48> */
++#define GAFR2_L __REG(0x40E00064) /* GPIO Alternate Function Select Register GPIO<79:64> */
++#define GAFR2_U __REG(0x40E00068) /* GPIO Alternate Function Select Register GPIO<95-80> */
++#define GAFR3_L __REG(0x40E0006C) /* GPIO Alternate Function Select Register GPIO<111:96> */
++#define GAFR3_U __REG(0x40E00070) /* GPIO Alternate Function Select Register GPIO<127:112> */
++
++#define GPLR3 __REG(0x40E00100) /* GPIO Pin-Level Register GPIO<127:96> */
++#define GPDR3 __REG(0x40E0010C) /* GPIO Pin Direction Register GPIO<127:96> */
++#define GPSR3 __REG(0x40E00118) /* GPIO Pin Output Set Register GPIO<127:96> */
++#define GPCR3 __REG(0x40E00124) /* GPIO Pin Output Clear Register GPIO<127:96> */
++#define GRER3 __REG(0x40E00130) /* GPIO Rising-Edge Detect Register GPIO<127:96> */
++#define GFER3 __REG(0x40E0013C) /* GPIO Falling-Edge Detect Register GPIO<127:96> */
++#define GEDR3 __REG(0x40E00148) /* GPIO Edge Detect Status Register GPIO<127:96> */
++
++/* More handy macros. The argument is a literal GPIO number. */
++
++#define GPIO_bit(x) (1 << ((x) & 0x1f))
++
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
++
++/* Interrupt Controller */
++
++#define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */
++#define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */
++#define ICLR2 __REG(0x40D000A4) /* Interrupt Controller Level Register 2 */
++#define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */
++#define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */
++
++#define _GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3)
++#define _GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3)
++#define _GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3)
++#define _GPCR(x) __REG2(0x40E00024, ((x) & 0x60) >> 3)
++#define _GRER(x) __REG2(0x40E00030, ((x) & 0x60) >> 3)
++#define _GFER(x) __REG2(0x40E0003C, ((x) & 0x60) >> 3)
++#define _GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3)
++#define _GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2)
++
++#define GPLR(x) (*((((x) & 0x7f) < 96) ? &_GPLR(x) : &GPLR3))
++#define GPDR(x) (*((((x) & 0x7f) < 96) ? &_GPDR(x) : &GPDR3))
++#define GPSR(x) (*((((x) & 0x7f) < 96) ? &_GPSR(x) : &GPSR3))
++#define GPCR(x) (*((((x) & 0x7f) < 96) ? &_GPCR(x) : &GPCR3))
++#define GRER(x) (*((((x) & 0x7f) < 96) ? &_GRER(x) : &GRER3))
++#define GFER(x) (*((((x) & 0x7f) < 96) ? &_GFER(x) : &GFER3))
++#define GEDR(x) (*((((x) & 0x7f) < 96) ? &_GEDR(x) : &GEDR3))
++#define GAFR(x) (*((((x) & 0x7f) < 96) ? &_GAFR(x) : \
++ ((((x) & 0x7f) < 112) ? &GAFR3_L : &GAFR3_U)))
++#else
++
++#define GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3)
++#define GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3)
++#define GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3)
++#define GPCR(x) __REG2(0x40E00024, ((x) & 0x60) >> 3)
++#define GRER(x) __REG2(0x40E00030, ((x) & 0x60) >> 3)
++#define GFER(x) __REG2(0x40E0003C, ((x) & 0x60) >> 3)
++#define GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3)
++#define GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2)
++
++#endif
++
++
++/* GPIO alternate function assignments */
++
++#define GPIO1_RST 1 /* reset */
++#define GPIO6_MMCCLK 6 /* MMC Clock */
++#define GPIO7_48MHz 7 /* 48 MHz clock output */
++#define GPIO8_MMCCS0 8 /* MMC Chip Select 0 */
++#define GPIO9_MMCCS1 9 /* MMC Chip Select 1 */
++#define GPIO10_RTCCLK 10 /* real time clock (1 Hz) */
++#define GPIO11_3_6MHz 11 /* 3.6 MHz oscillator out */
++#define GPIO12_32KHz 12 /* 32 kHz out */
++#define GPIO13_MBGNT 13 /* memory controller grant */
++#define GPIO14_MBREQ 14 /* alternate bus master request */
++#define GPIO15_nCS_1 15 /* chip select 1 */
++#define GPIO16_PWM0 16 /* PWM0 output */
++#define GPIO17_PWM1 17 /* PWM1 output */
++#define GPIO18_RDY 18 /* Ext. Bus Ready */
++#define GPIO19_DREQ1 19 /* External DMA Request */
++#define GPIO20_DREQ0 20 /* External DMA Request */
++#define GPIO23_SCLK 23 /* SSP clock */
++#define GPIO24_SFRM 24 /* SSP Frame */
++#define GPIO25_STXD 25 /* SSP transmit */
++#define GPIO26_SRXD 26 /* SSP receive */
++#define GPIO27_SEXTCLK 27 /* SSP ext_clk */
++#define GPIO28_BITCLK 28 /* AC97/I2S bit_clk */
++#define GPIO29_SDATA_IN 29 /* AC97 Sdata_in0 / I2S Sdata_in */
++#define GPIO30_SDATA_OUT 30 /* AC97/I2S Sdata_out */
++#define GPIO31_SYNC 31 /* AC97/I2S sync */
++#define GPIO32_SDATA_IN1 32 /* AC97 Sdata_in1 */
++#define GPIO32_SYSCLK 32 /* I2S System Clock */
++#define GPIO32_MMCCLK 32 /* MMC Clock (PXA270) */
++#define GPIO33_nCS_5 33 /* chip select 5 */
++#define GPIO34_FFRXD 34 /* FFUART receive */
++#define GPIO34_MMCCS0 34 /* MMC Chip Select 0 */
++#define GPIO35_FFCTS 35 /* FFUART Clear to send */
++#define GPIO36_FFDCD 36 /* FFUART Data carrier detect */
++#define GPIO37_FFDSR 37 /* FFUART data set ready */
++#define GPIO38_FFRI 38 /* FFUART Ring Indicator */
++#define GPIO39_MMCCS1 39 /* MMC Chip Select 1 */
++#define GPIO39_FFTXD 39 /* FFUART transmit data */
++#define GPIO40_FFDTR 40 /* FFUART data terminal Ready */
++#define GPIO41_FFRTS 41 /* FFUART request to send */
++#define GPIO42_BTRXD 42 /* BTUART receive data */
++#define GPIO42_HWRXD 42 /* HWUART receive data */
++#define GPIO43_BTTXD 43 /* BTUART transmit data */
++#define GPIO43_HWTXD 43 /* HWUART transmit data */
++#define GPIO44_BTCTS 44 /* BTUART clear to send */
++#define GPIO44_HWCTS 44 /* HWUART clear to send */
++#define GPIO45_BTRTS 45 /* BTUART request to send */
++#define GPIO45_HWRTS 45 /* HWUART request to send */
++#define GPIO45_AC97_SYSCLK 45 /* AC97 System Clock */
++#define GPIO46_ICPRXD 46 /* ICP receive data */
++#define GPIO46_STRXD 46 /* STD_UART receive data */
++#define GPIO47_ICPTXD 47 /* ICP transmit data */
++#define GPIO47_STTXD 47 /* STD_UART transmit data */
++#define GPIO48_nPOE 48 /* Output Enable for Card Space */
++#define GPIO49_nPWE 49 /* Write Enable for Card Space */
++#define GPIO50_nPIOR 50 /* I/O Read for Card Space */
++#define GPIO51_nPIOW 51 /* I/O Write for Card Space */
++#define GPIO52_nPCE_1 52 /* Card Enable for Card Space */
++#define GPIO53_nPCE_2 53 /* Card Enable for Card Space */
++#define GPIO53_MMCCLK 53 /* MMC Clock */
++#define GPIO54_MMCCLK 54 /* MMC Clock */
++#define GPIO54_pSKTSEL 54 /* Socket Select for Card Space */
++#define GPIO54_nPCE_2 54 /* Card Enable for Card Space (PXA27x) */
++#define GPIO55_nPREG 55 /* Card Address bit 26 */
++#define GPIO56_nPWAIT 56 /* Wait signal for Card Space */
++#define GPIO57_nIOIS16 57 /* Bus Width select for I/O Card Space */
++#define GPIO58_LDD_0 58 /* LCD data pin 0 */
++#define GPIO59_LDD_1 59 /* LCD data pin 1 */
++#define GPIO60_LDD_2 60 /* LCD data pin 2 */
++#define GPIO61_LDD_3 61 /* LCD data pin 3 */
++#define GPIO62_LDD_4 62 /* LCD data pin 4 */
++#define GPIO63_LDD_5 63 /* LCD data pin 5 */
++#define GPIO64_LDD_6 64 /* LCD data pin 6 */
++#define GPIO65_LDD_7 65 /* LCD data pin 7 */
++#define GPIO66_LDD_8 66 /* LCD data pin 8 */
++#define GPIO66_MBREQ 66 /* alternate bus master req */
++#define GPIO67_LDD_9 67 /* LCD data pin 9 */
++#define GPIO67_MMCCS0 67 /* MMC Chip Select 0 */
++#define GPIO68_LDD_10 68 /* LCD data pin 10 */
++#define GPIO68_MMCCS1 68 /* MMC Chip Select 1 */
++#define GPIO69_LDD_11 69 /* LCD data pin 11 */
++#define GPIO69_MMCCLK 69 /* MMC_CLK */
++#define GPIO70_LDD_12 70 /* LCD data pin 12 */
++#define GPIO70_RTCCLK 70 /* Real Time clock (1 Hz) */
++#define GPIO71_LDD_13 71 /* LCD data pin 13 */
++#define GPIO71_3_6MHz 71 /* 3.6 MHz Oscillator clock */
++#define GPIO72_LDD_14 72 /* LCD data pin 14 */
++#define GPIO72_32kHz 72 /* 32 kHz clock */
++#define GPIO73_LDD_15 73 /* LCD data pin 15 */
++#define GPIO73_MBGNT 73 /* Memory controller grant */
++#define GPIO74_LCD_FCLK 74 /* LCD Frame clock */
++#define GPIO75_LCD_LCLK 75 /* LCD line clock */
++#define GPIO76_LCD_PCLK 76 /* LCD Pixel clock */
++#define GPIO77_LCD_ACBIAS 77 /* LCD AC Bias */
++#define GPIO78_nCS_2 78 /* chip select 2 */
++#define GPIO79_nCS_3 79 /* chip select 3 */
++#define GPIO80_nCS_4 80 /* chip select 4 */
++#define GPIO81_NSCLK 81 /* NSSP clock */
++#define GPIO82_NSFRM 82 /* NSSP Frame */
++#define GPIO83_NSTXD 83 /* NSSP transmit */
++#define GPIO84_NSRXD 84 /* NSSP receive */
++#define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */
++#define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */
++#define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */
++#define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */
++#define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */
++#define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */
++#define GPIO111_MMCDAT3 111 /* MMC DAT3 (PXA27x) */
++#define GPIO111_MMCCS1 111 /* MMC Chip Select 1 (PXA27x) */
++#define GPIO112_MMCCMD 112 /* MMC CMD (PXA27x) */
++#define GPIO113_I2S_SYSCLK 113 /* I2S System Clock (PXA27x) */
++#define GPIO113_AC97_RESET_N 113 /* AC97 NRESET on (PXA27x) */
++
++/* GPIO alternate function mode & direction */
++
++#define GPIO_IN 0x000
++#define GPIO_OUT 0x080
++#define GPIO_ALT_FN_1_IN 0x100
++#define GPIO_ALT_FN_1_OUT 0x180
++#define GPIO_ALT_FN_2_IN 0x200
++#define GPIO_ALT_FN_2_OUT 0x280
++#define GPIO_ALT_FN_3_IN 0x300
++#define GPIO_ALT_FN_3_OUT 0x380
++#define GPIO_MD_MASK_NR 0x07f
++#define GPIO_MD_MASK_DIR 0x080
++#define GPIO_MD_MASK_FN 0x300
++#define GPIO_DFLT_LOW 0x400
++#define GPIO_DFLT_HIGH 0x800
++
++#define GPIO1_RTS_MD ( 1 | GPIO_ALT_FN_1_IN)
++#define GPIO6_MMCCLK_MD ( 6 | GPIO_ALT_FN_1_OUT)
++#define GPIO7_48MHz_MD ( 7 | GPIO_ALT_FN_1_OUT)
++#define GPIO8_MMCCS0_MD ( 8 | GPIO_ALT_FN_1_OUT)
++#define GPIO9_MMCCS1_MD ( 9 | GPIO_ALT_FN_1_OUT)
++#define GPIO10_RTCCLK_MD (10 | GPIO_ALT_FN_1_OUT)
++#define GPIO11_3_6MHz_MD (11 | GPIO_ALT_FN_1_OUT)
++#define GPIO12_32KHz_MD (12 | GPIO_ALT_FN_1_OUT)
++#define GPIO13_MBGNT_MD (13 | GPIO_ALT_FN_2_OUT)
++#define GPIO14_MBREQ_MD (14 | GPIO_ALT_FN_1_IN)
++#define GPIO15_nCS_1_MD (15 | GPIO_ALT_FN_2_OUT)
++#define GPIO16_PWM0_MD (16 | GPIO_ALT_FN_2_OUT)
++#define GPIO17_PWM1_MD (17 | GPIO_ALT_FN_2_OUT)
++#define GPIO18_RDY_MD (18 | GPIO_ALT_FN_1_IN)
++#define GPIO19_DREQ1_MD (19 | GPIO_ALT_FN_1_IN)
++#define GPIO20_DREQ0_MD (20 | GPIO_ALT_FN_1_IN)
++#define GPIO23_SCLK_MD (23 | GPIO_ALT_FN_2_OUT)
++#define GPIO24_SFRM_MD (24 | GPIO_ALT_FN_2_OUT)
++#define GPIO25_STXD_MD (25 | GPIO_ALT_FN_2_OUT)
++#define GPIO26_SRXD_MD (26 | GPIO_ALT_FN_1_IN)
++#define GPIO27_SEXTCLK_MD (27 | GPIO_ALT_FN_1_IN)
++#define GPIO28_BITCLK_AC97_MD (28 | GPIO_ALT_FN_1_IN)
++#define GPIO28_BITCLK_IN_I2S_MD (28 | GPIO_ALT_FN_2_IN)
++#define GPIO28_BITCLK_OUT_I2S_MD (28 | GPIO_ALT_FN_1_OUT)
++#define GPIO29_SDATA_IN_AC97_MD (29 | GPIO_ALT_FN_1_IN)
++#define GPIO29_SDATA_IN_I2S_MD (29 | GPIO_ALT_FN_2_IN)
++#define GPIO30_SDATA_OUT_AC97_MD (30 | GPIO_ALT_FN_2_OUT)
++#define GPIO30_SDATA_OUT_I2S_MD (30 | GPIO_ALT_FN_1_OUT)
++#define GPIO31_SYNC_I2S_MD (31 | GPIO_ALT_FN_1_OUT)
++#define GPIO31_SYNC_AC97_MD (31 | GPIO_ALT_FN_2_OUT)
++#define GPIO32_SDATA_IN1_AC97_MD (32 | GPIO_ALT_FN_1_IN)
++#define GPIO32_SYSCLK_I2S_MD (32 | GPIO_ALT_FN_1_OUT)
++#define GPIO32_MMCCLK_MD ( 32 | GPIO_ALT_FN_2_OUT)
++#define GPIO33_nCS_5_MD (33 | GPIO_ALT_FN_2_OUT)
++#define GPIO34_FFRXD_MD (34 | GPIO_ALT_FN_1_IN)
++#define GPIO34_MMCCS0_MD (34 | GPIO_ALT_FN_2_OUT)
++#define GPIO35_FFCTS_MD (35 | GPIO_ALT_FN_1_IN)
++#define GPIO36_FFDCD_MD (36 | GPIO_ALT_FN_1_IN)
++#define GPIO37_FFDSR_MD (37 | GPIO_ALT_FN_1_IN)
++#define GPIO38_FFRI_MD (38 | GPIO_ALT_FN_1_IN)
++#define GPIO39_MMCCS1_MD (39 | GPIO_ALT_FN_1_OUT)
++#define GPIO39_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT)
++#define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT)
++#define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT)
++#define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN)
++#define GPIO42_HWRXD_MD (42 | GPIO_ALT_FN_3_IN)
++#define GPIO43_BTTXD_MD (43 | GPIO_ALT_FN_2_OUT)
++#define GPIO43_HWTXD_MD (43 | GPIO_ALT_FN_3_OUT)
++#define GPIO44_BTCTS_MD (44 | GPIO_ALT_FN_1_IN)
++#define GPIO44_HWCTS_MD (44 | GPIO_ALT_FN_3_IN)
++#define GPIO45_BTRTS_MD (45 | GPIO_ALT_FN_2_OUT)
++#define GPIO45_HWRTS_MD (45 | GPIO_ALT_FN_3_OUT)
++#define GPIO45_SYSCLK_AC97_MD (45 | GPIO_ALT_FN_1_OUT)
++#define GPIO46_ICPRXD_MD (46 | GPIO_ALT_FN_1_IN)
++#define GPIO46_STRXD_MD (46 | GPIO_ALT_FN_2_IN)
++#define GPIO47_ICPTXD_MD (47 | GPIO_ALT_FN_2_OUT)
++#define GPIO47_STTXD_MD (47 | GPIO_ALT_FN_1_OUT)
++#define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT)
++#define GPIO48_HWTXD_MD (48 | GPIO_ALT_FN_1_OUT)
++#define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT)
++#define GPIO49_HWRXD_MD (49 | GPIO_ALT_FN_1_IN)
++#define GPIO49_nPWE_MD (49 | GPIO_ALT_FN_2_OUT)
++#define GPIO50_nPIOR_MD (50 | GPIO_ALT_FN_2_OUT)
++#define GPIO50_HWCTS_MD (50 | GPIO_ALT_FN_1_IN)
++#define GPIO51_HWRTS_MD (51 | GPIO_ALT_FN_1_OUT)
++#define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT)
++#define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT)
++#define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT)
++#define GPIO53_MMCCLK_MD (53 | GPIO_ALT_FN_1_OUT)
++#define GPIO54_MMCCLK_MD (54 | GPIO_ALT_FN_1_OUT)
++#define GPIO54_nPCE_2_MD (54 | GPIO_ALT_FN_2_OUT)
++#define GPIO54_pSKTSEL_MD (54 | GPIO_ALT_FN_2_OUT)
++#define GPIO55_nPREG_MD (55 | GPIO_ALT_FN_2_OUT)
++#define GPIO56_nPWAIT_MD (56 | GPIO_ALT_FN_1_IN)
++#define GPIO57_nIOIS16_MD (57 | GPIO_ALT_FN_1_IN)
++#define GPIO58_LDD_0_MD (58 | GPIO_ALT_FN_2_OUT)
++#define GPIO59_LDD_1_MD (59 | GPIO_ALT_FN_2_OUT)
++#define GPIO60_LDD_2_MD (60 | GPIO_ALT_FN_2_OUT)
++#define GPIO61_LDD_3_MD (61 | GPIO_ALT_FN_2_OUT)
++#define GPIO62_LDD_4_MD (62 | GPIO_ALT_FN_2_OUT)
++#define GPIO63_LDD_5_MD (63 | GPIO_ALT_FN_2_OUT)
++#define GPIO64_LDD_6_MD (64 | GPIO_ALT_FN_2_OUT)
++#define GPIO65_LDD_7_MD (65 | GPIO_ALT_FN_2_OUT)
++#define GPIO66_LDD_8_MD (66 | GPIO_ALT_FN_2_OUT)
++#define GPIO66_MBREQ_MD (66 | GPIO_ALT_FN_1_IN)
++#define GPIO67_LDD_9_MD (67 | GPIO_ALT_FN_2_OUT)
++#define GPIO67_MMCCS0_MD (67 | GPIO_ALT_FN_1_OUT)
++#define GPIO68_LDD_10_MD (68 | GPIO_ALT_FN_2_OUT)
++#define GPIO68_MMCCS1_MD (68 | GPIO_ALT_FN_1_OUT)
++#define GPIO69_LDD_11_MD (69 | GPIO_ALT_FN_2_OUT)
++#define GPIO69_MMCCLK_MD (69 | GPIO_ALT_FN_1_OUT)
++#define GPIO70_LDD_12_MD (70 | GPIO_ALT_FN_2_OUT)
++#define GPIO70_RTCCLK_MD (70 | GPIO_ALT_FN_1_OUT)
++#define GPIO71_LDD_13_MD (71 | GPIO_ALT_FN_2_OUT)
++#define GPIO71_3_6MHz_MD (71 | GPIO_ALT_FN_1_OUT)
++#define GPIO72_LDD_14_MD (72 | GPIO_ALT_FN_2_OUT)
++#define GPIO72_32kHz_MD (72 | GPIO_ALT_FN_1_OUT)
++#define GPIO73_LDD_15_MD (73 | GPIO_ALT_FN_2_OUT)
++#define GPIO73_MBGNT_MD (73 | GPIO_ALT_FN_1_OUT)
++#define GPIO74_LCD_FCLK_MD (74 | GPIO_ALT_FN_2_OUT)
++#define GPIO75_LCD_LCLK_MD (75 | GPIO_ALT_FN_2_OUT)
++#define GPIO76_LCD_PCLK_MD (76 | GPIO_ALT_FN_2_OUT)
++#define GPIO77_LCD_ACBIAS_MD (77 | GPIO_ALT_FN_2_OUT)
++#define GPIO78_nCS_2_MD (78 | GPIO_ALT_FN_2_OUT)
++#define GPIO79_nCS_3_MD (79 | GPIO_ALT_FN_2_OUT)
++#define GPIO79_pSKTSEL_MD (79 | GPIO_ALT_FN_1_OUT)
++#define GPIO80_nCS_4_MD (80 | GPIO_ALT_FN_2_OUT)
++#define GPIO81_NSSP_CLK_OUT (81 | GPIO_ALT_FN_1_OUT)
++#define GPIO81_NSSP_CLK_IN (81 | GPIO_ALT_FN_1_IN)
++#define GPIO82_NSSP_FRM_OUT (82 | GPIO_ALT_FN_1_OUT)
++#define GPIO82_NSSP_FRM_IN (82 | GPIO_ALT_FN_1_IN)
++#define GPIO83_NSSP_TX (83 | GPIO_ALT_FN_1_OUT)
++#define GPIO83_NSSP_RX (83 | GPIO_ALT_FN_2_IN)
++#define GPIO84_NSSP_TX (84 | GPIO_ALT_FN_1_OUT)
++#define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN)
++#define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT)
++#define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT)
++#define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT)
++#define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT)
++#define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT)
++#define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT)
++#define GPIO110_MMCCS0_MD (110 | GPIO_ALT_FN_1_OUT)
++#define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT)
++#define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT)
++#define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT)
++#define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
++#define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT)
++#define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN)
++#define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN)
++
++/*
++ * Power Manager
++ */
++
++#define PMCR __REG(0x40F00000) /* Power Manager Control Register */
++#define PSSR __REG(0x40F00004) /* Power Manager Sleep Status Register */
++#define PSPR __REG(0x40F00008) /* Power Manager Scratch Pad Register */
++#define PWER __REG(0x40F0000C) /* Power Manager Wake-up Enable Register */
++#define PRER __REG(0x40F00010) /* Power Manager GPIO Rising-Edge Detect Enable Register */
++#define PFER __REG(0x40F00014) /* Power Manager GPIO Falling-Edge Detect Enable Register */
++#define PEDR __REG(0x40F00018) /* Power Manager GPIO Edge Detect Status Register */
++#define PCFR __REG(0x40F0001C) /* Power Manager General Configuration Register */
++#define PGSR0 __REG(0x40F00020) /* Power Manager GPIO Sleep State Register for GP[31-0] */
++#define PGSR1 __REG(0x40F00024) /* Power Manager GPIO Sleep State Register for GP[63-32] */
++#define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */
++#define PGSR3 __REG(0x40F0002C) /* Power Manager GPIO Sleep State Register for GP[118-96] */
++#define RCSR __REG(0x40F00030) /* Reset Controller Status Register */
++
++#define PSLR __REG(0x40F00034) /* Power Manager Sleep Config Register */
++#define PSTR __REG(0x40F00038) /*Power Manager Standby Config Register */
++#define PSNR __REG(0x40F0003C) /*Power Manager Sense Config Register */
++#define PVCR __REG(0x40F00040) /*Power Manager VoltageControl Register */
++#define PKWR __REG(0x40F00050) /* Power Manager KB Wake-up Enable Reg */
++#define PKSR __REG(0x40F00054) /* Power Manager KB Level-Detect Register */
++#define PCMD(x) __REG2(0x40F00080, (x)<<2)
++#define PCMD0 __REG(0x40F00080 + 0 * 4)
++#define PCMD1 __REG(0x40F00080 + 1 * 4)
++#define PCMD2 __REG(0x40F00080 + 2 * 4)
++#define PCMD3 __REG(0x40F00080 + 3 * 4)
++#define PCMD4 __REG(0x40F00080 + 4 * 4)
++#define PCMD5 __REG(0x40F00080 + 5 * 4)
++#define PCMD6 __REG(0x40F00080 + 6 * 4)
++#define PCMD7 __REG(0x40F00080 + 7 * 4)
++#define PCMD8 __REG(0x40F00080 + 8 * 4)
++#define PCMD9 __REG(0x40F00080 + 9 * 4)
++#define PCMD10 __REG(0x40F00080 + 10 * 4)
++#define PCMD11 __REG(0x40F00080 + 11 * 4)
++#define PCMD12 __REG(0x40F00080 + 12 * 4)
++#define PCMD13 __REG(0x40F00080 + 13 * 4)
++#define PCMD14 __REG(0x40F00080 + 14 * 4)
++#define PCMD15 __REG(0x40F00080 + 15 * 4)
++#define PCMD16 __REG(0x40F00080 + 16 * 4)
++#define PCMD17 __REG(0x40F00080 + 17 * 4)
++#define PCMD18 __REG(0x40F00080 + 18 * 4)
++#define PCMD19 __REG(0x40F00080 + 19 * 4)
++#define PCMD20 __REG(0x40F00080 + 20 * 4)
++#define PCMD21 __REG(0x40F00080 + 21 * 4)
++#define PCMD22 __REG(0x40F00080 + 22 * 4)
++#define PCMD23 __REG(0x40F00080 + 23 * 4)
++#define PCMD24 __REG(0x40F00080 + 24 * 4)
++#define PCMD25 __REG(0x40F00080 + 25 * 4)
++#define PCMD26 __REG(0x40F00080 + 26 * 4)
++#define PCMD27 __REG(0x40F00080 + 27 * 4)
++#define PCMD28 __REG(0x40F00080 + 28 * 4)
++#define PCMD29 __REG(0x40F00080 + 29 * 4)
++#define PCMD30 __REG(0x40F00080 + 30 * 4)
++#define PCMD31 __REG(0x40F00080 + 31 * 4)
++
++#define PCMD_MBC (1<<12)
++#define PCMD_DCE (1<<11)
++#define PCMD_LC (1<<10)
++/* FIXME: PCMD_SQC need be checked. */
++#define PCMD_SQC (3<<8) /* currently only bit 8 is changeable,
++ bit 9 should be 0 all day. */
++#define PVCR_VCSA (0x1<<14)
++#define PVCR_CommandDelay (0xf80)
++#define PCFR_PI2C_EN (0x1 << 6)
++
++#define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */
++#define PSSR_RDH (1 << 5) /* Read Disable Hold */
++#define PSSR_PH (1 << 4) /* Peripheral Control Hold */
++#define PSSR_STS (1 << 3) /* Standby Mode Status */
++#define PSSR_VFS (1 << 2) /* VDD Fault Status */
++#define PSSR_BFS (1 << 1) /* Battery Fault Status */
++#define PSSR_SSS (1 << 0) /* Software Sleep Status */
++
++#define PSLR_SL_ROD (1 << 20) /* Sleep-Mode/Depp-Sleep Mode nRESET_OUT Disable */
++
++#define PCFR_RO (1 << 15) /* RDH Override */
++#define PCFR_PO (1 << 14) /* PH Override */
++#define PCFR_GPROD (1 << 12) /* GPIO nRESET_OUT Disable */
++#define PCFR_L1_EN (1 << 11) /* Sleep Mode L1 converter Enable */
++#define PCFR_FVC (1 << 10) /* Frequency/Voltage Change */
++#define PCFR_DC_EN (1 << 7) /* Sleep/deep-sleep DC-DC Converter Enable */
++#define PCFR_PI2CEN (1 << 6) /* Enable PI2C controller */
++#define PCFR_GPR_EN (1 << 4) /* nRESET_GPIO Pin Enable */
++#define PCFR_DS (1 << 3) /* Deep Sleep Mode */
++#define PCFR_FS (1 << 2) /* Float Static Chip Selects */
++#define PCFR_FP (1 << 1) /* Float PCMCIA controls */
++#define PCFR_OPDE (1 << 0) /* 3.6864 MHz oscillator power-down enable */
++
++#define RCSR_GPR (1 << 3) /* GPIO Reset */
++#define RCSR_SMR (1 << 2) /* Sleep Mode */
++#define RCSR_WDR (1 << 1) /* Watchdog Reset */
++#define RCSR_HWR (1 << 0) /* Hardware Reset */
++
++#define PWER_GPIO(Nb) (1 << Nb) /* GPIO [0..15] wake-up enable */
++#define PWER_GPIO0 PWER_GPIO (0) /* GPIO [0] wake-up enable */
++#define PWER_GPIO1 PWER_GPIO (1) /* GPIO [1] wake-up enable */
++#define PWER_GPIO2 PWER_GPIO (2) /* GPIO [2] wake-up enable */
++#define PWER_GPIO3 PWER_GPIO (3) /* GPIO [3] wake-up enable */
++#define PWER_GPIO4 PWER_GPIO (4) /* GPIO [4] wake-up enable */
++#define PWER_GPIO5 PWER_GPIO (5) /* GPIO [5] wake-up enable */
++#define PWER_GPIO6 PWER_GPIO (6) /* GPIO [6] wake-up enable */
++#define PWER_GPIO7 PWER_GPIO (7) /* GPIO [7] wake-up enable */
++#define PWER_GPIO8 PWER_GPIO (8) /* GPIO [8] wake-up enable */
++#define PWER_GPIO9 PWER_GPIO (9) /* GPIO [9] wake-up enable */
++#define PWER_GPIO10 PWER_GPIO (10) /* GPIO [10] wake-up enable */
++#define PWER_GPIO11 PWER_GPIO (11) /* GPIO [11] wake-up enable */
++#define PWER_GPIO12 PWER_GPIO (12) /* GPIO [12] wake-up enable */
++#define PWER_GPIO13 PWER_GPIO (13) /* GPIO [13] wake-up enable */
++#define PWER_GPIO14 PWER_GPIO (14) /* GPIO [14] wake-up enable */
++#define PWER_GPIO15 PWER_GPIO (15) /* GPIO [15] wake-up enable */
++#define PWER_RTC 0x80000000 /* RTC alarm wake-up enable */
++
++/*
++ * SSP Serial Port Registers - see include/asm-arm/arch-pxa/regs-ssp.h
++ */
++
++/*
++ * MultiMediaCard (MMC) controller - see drivers/mmc/host/pxamci.h
++ */
++
++/*
++ * Core Clock
++ */
++
++#define CCCR __REG(0x41300000) /* Core Clock Configuration Register */
++#define CKEN __REG(0x41300004) /* Clock Enable Register */
++#define OSCC __REG(0x41300008) /* Oscillator Configuration Register */
++#define CCSR __REG(0x4130000C) /* Core Clock Status Register */
++
++#define CCCR_N_MASK 0x0380 /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
++#define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */
++#define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */
++
++#define CKEN_AC97CONF (31) /* AC97 Controller Configuration */
++#define CKEN_CAMERA (24) /* Camera Interface Clock Enable */
++#define CKEN_SSP1 (23) /* SSP1 Unit Clock Enable */
++#define CKEN_MEMC (22) /* Memory Controller Clock Enable */
++#define CKEN_MEMSTK (21) /* Memory Stick Host Controller */
++#define CKEN_IM (20) /* Internal Memory Clock Enable */
++#define CKEN_KEYPAD (19) /* Keypad Interface Clock Enable */
++#define CKEN_USIM (18) /* USIM Unit Clock Enable */
++#define CKEN_MSL (17) /* MSL Unit Clock Enable */
++#define CKEN_LCD (16) /* LCD Unit Clock Enable */
++#define CKEN_PWRI2C (15) /* PWR I2C Unit Clock Enable */
++#define CKEN_I2C (14) /* I2C Unit Clock Enable */
++#define CKEN_FICP (13) /* FICP Unit Clock Enable */
++#define CKEN_MMC (12) /* MMC Unit Clock Enable */
++#define CKEN_USB (11) /* USB Unit Clock Enable */
++#define CKEN_ASSP (10) /* ASSP (SSP3) Clock Enable */
++#define CKEN_USBHOST (10) /* USB Host Unit Clock Enable */
++#define CKEN_OSTIMER (9) /* OS Timer Unit Clock Enable */
++#define CKEN_NSSP (9) /* NSSP (SSP2) Clock Enable */
++#define CKEN_I2S (8) /* I2S Unit Clock Enable */
++#define CKEN_BTUART (7) /* BTUART Unit Clock Enable */
++#define CKEN_FFUART (6) /* FFUART Unit Clock Enable */
++#define CKEN_STUART (5) /* STUART Unit Clock Enable */
++#define CKEN_HWUART (4) /* HWUART Unit Clock Enable */
++#define CKEN_SSP3 (4) /* SSP3 Unit Clock Enable */
++#define CKEN_SSP (3) /* SSP Unit Clock Enable */
++#define CKEN_SSP2 (3) /* SSP2 Unit Clock Enable */
++#define CKEN_AC97 (2) /* AC97 Unit Clock Enable */
++#define CKEN_PWM1 (1) /* PWM1 Clock Enable */
++#define CKEN_PWM0 (0) /* PWM0 Clock Enable */
++
++#define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */
++#define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */
++
++
++/*
++ * LCD
++ */
++
++#define LCCR0 __REG(0x44000000) /* LCD Controller Control Register 0 */
++#define LCCR1 __REG(0x44000004) /* LCD Controller Control Register 1 */
++#define LCCR2 __REG(0x44000008) /* LCD Controller Control Register 2 */
++#define LCCR3 __REG(0x4400000C) /* LCD Controller Control Register 3 */
++#define LCCR4 __REG(0x44000010) /* LCD Controller Control Register 3 */
++#define DFBR0 __REG(0x44000020) /* DMA Channel 0 Frame Branch Register */
++#define DFBR1 __REG(0x44000024) /* DMA Channel 1 Frame Branch Register */
++#define LCSR __REG(0x44000038) /* LCD Controller Status Register */
++#define LIIDR __REG(0x4400003C) /* LCD Controller Interrupt ID Register */
++#define TMEDRGBR __REG(0x44000040) /* TMED RGB Seed Register */
++#define TMEDCR __REG(0x44000044) /* TMED Control Register */
++
++#define LCCR3_1BPP (0 << 24)
++#define LCCR3_2BPP (1 << 24)
++#define LCCR3_4BPP (2 << 24)
++#define LCCR3_8BPP (3 << 24)
++#define LCCR3_16BPP (4 << 24)
++
++#define LCCR3_PDFOR_0 (0 << 30)
++#define LCCR3_PDFOR_1 (1 << 30)
++#define LCCR3_PDFOR_2 (2 << 30)
++#define LCCR3_PDFOR_3 (3 << 30)
++
++#define LCCR4_PAL_FOR_0 (0 << 15)
++#define LCCR4_PAL_FOR_1 (1 << 15)
++#define LCCR4_PAL_FOR_2 (2 << 15)
++#define LCCR4_PAL_FOR_MASK (3 << 15)
++
++#define FDADR0 __REG(0x44000200) /* DMA Channel 0 Frame Descriptor Address Register */
++#define FSADR0 __REG(0x44000204) /* DMA Channel 0 Frame Source Address Register */
++#define FIDR0 __REG(0x44000208) /* DMA Channel 0 Frame ID Register */
++#define LDCMD0 __REG(0x4400020C) /* DMA Channel 0 Command Register */
++#define FDADR1 __REG(0x44000210) /* DMA Channel 1 Frame Descriptor Address Register */
++#define FSADR1 __REG(0x44000214) /* DMA Channel 1 Frame Source Address Register */
++#define FIDR1 __REG(0x44000218) /* DMA Channel 1 Frame ID Register */
++#define LDCMD1 __REG(0x4400021C) /* DMA Channel 1 Command Register */
++
++#define LCCR0_ENB (1 << 0) /* LCD Controller enable */
++#define LCCR0_CMS (1 << 1) /* Color/Monochrome Display Select */
++#define LCCR0_Color (LCCR0_CMS*0) /* Color display */
++#define LCCR0_Mono (LCCR0_CMS*1) /* Monochrome display */
++#define LCCR0_SDS (1 << 2) /* Single/Dual Panel Display */
++ /* Select */
++#define LCCR0_Sngl (LCCR0_SDS*0) /* Single panel display */
++#define LCCR0_Dual (LCCR0_SDS*1) /* Dual panel display */
++
++#define LCCR0_LDM (1 << 3) /* LCD Disable Done Mask */
++#define LCCR0_SFM (1 << 4) /* Start of frame mask */
++#define LCCR0_IUM (1 << 5) /* Input FIFO underrun mask */
++#define LCCR0_EFM (1 << 6) /* End of Frame mask */
++#define LCCR0_PAS (1 << 7) /* Passive/Active display Select */
++#define LCCR0_Pas (LCCR0_PAS*0) /* Passive display (STN) */
++#define LCCR0_Act (LCCR0_PAS*1) /* Active display (TFT) */
++#define LCCR0_DPD (1 << 9) /* Double Pixel Data (monochrome */
++ /* display mode) */
++#define LCCR0_4PixMono (LCCR0_DPD*0) /* 4-Pixel/clock Monochrome */
++ /* display */
++#define LCCR0_8PixMono (LCCR0_DPD*1) /* 8-Pixel/clock Monochrome */
++ /* display */
++#define LCCR0_DIS (1 << 10) /* LCD Disable */
++#define LCCR0_QDM (1 << 11) /* LCD Quick Disable mask */
++#define LCCR0_PDD (0xff << 12) /* Palette DMA request delay */
++#define LCCR0_PDD_S 12
++#define LCCR0_BM (1 << 20) /* Branch mask */
++#define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */
++#define LCCR0_LCDT (1 << 22) /* LCD panel type */
++#define LCCR0_RDSTM (1 << 23) /* Read status interrupt mask */
++#define LCCR0_CMDIM (1 << 24) /* Command interrupt mask */
++#define LCCR0_OUC (1 << 25) /* Overlay Underlay control bit */
++#define LCCR0_LDDALT (1 << 26) /* LDD alternate mapping control */
++
++#define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */
++#define LCCR1_DisWdth(Pixel) /* Display Width [1..800 pix.] */ \
++ (((Pixel) - 1) << FShft (LCCR1_PPL))
++
++#define LCCR1_HSW Fld (6, 10) /* Horizontal Synchronization */
++#define LCCR1_HorSnchWdth(Tpix) /* Horizontal Synchronization */ \
++ /* pulse Width [1..64 Tpix] */ \
++ (((Tpix) - 1) << FShft (LCCR1_HSW))
++
++#define LCCR1_ELW Fld (8, 16) /* End-of-Line pixel clock Wait */
++ /* count - 1 [Tpix] */
++#define LCCR1_EndLnDel(Tpix) /* End-of-Line Delay */ \
++ /* [1..256 Tpix] */ \
++ (((Tpix) - 1) << FShft (LCCR1_ELW))
++
++#define LCCR1_BLW Fld (8, 24) /* Beginning-of-Line pixel clock */
++ /* Wait count - 1 [Tpix] */
++#define LCCR1_BegLnDel(Tpix) /* Beginning-of-Line Delay */ \
++ /* [1..256 Tpix] */ \
++ (((Tpix) - 1) << FShft (LCCR1_BLW))
++
++
++#define LCCR2_LPP Fld (10, 0) /* Line Per Panel - 1 */
++#define LCCR2_DisHght(Line) /* Display Height [1..1024 lines] */ \
++ (((Line) - 1) << FShft (LCCR2_LPP))
++
++#define LCCR2_VSW Fld (6, 10) /* Vertical Synchronization pulse */
++ /* Width - 1 [Tln] (L_FCLK) */
++#define LCCR2_VrtSnchWdth(Tln) /* Vertical Synchronization pulse */ \
++ /* Width [1..64 Tln] */ \
++ (((Tln) - 1) << FShft (LCCR2_VSW))
++
++#define LCCR2_EFW Fld (8, 16) /* End-of-Frame line clock Wait */
++ /* count [Tln] */
++#define LCCR2_EndFrmDel(Tln) /* End-of-Frame Delay */ \
++ /* [0..255 Tln] */ \
++ ((Tln) << FShft (LCCR2_EFW))
++
++#define LCCR2_BFW Fld (8, 24) /* Beginning-of-Frame line clock */
++ /* Wait count [Tln] */
++#define LCCR2_BegFrmDel(Tln) /* Beginning-of-Frame Delay */ \
++ /* [0..255 Tln] */ \
++ ((Tln) << FShft (LCCR2_BFW))
++
++#if 0
++#define LCCR3_PCD (0xff) /* Pixel clock divisor */
++#define LCCR3_ACB (0xff << 8) /* AC Bias pin frequency */
++#define LCCR3_ACB_S 8
++#endif
++
++#define LCCR3_API (0xf << 16) /* AC Bias pin trasitions per interrupt */
++#define LCCR3_API_S 16
++#define LCCR3_VSP (1 << 20) /* vertical sync polarity */
++#define LCCR3_HSP (1 << 21) /* horizontal sync polarity */
++#define LCCR3_PCP (1 << 22) /* Pixel Clock Polarity (L_PCLK) */
++#define LCCR3_PixRsEdg (LCCR3_PCP*0) /* Pixel clock Rising-Edge */
++#define LCCR3_PixFlEdg (LCCR3_PCP*1) /* Pixel clock Falling-Edge */
++
++#define LCCR3_OEP (1 << 23) /* Output Enable Polarity (L_BIAS, */
++ /* active display mode) */
++#define LCCR3_OutEnH (LCCR3_OEP*0) /* Output Enable active High */
++#define LCCR3_OutEnL (LCCR3_OEP*1) /* Output Enable active Low */
++
++#if 0
++#define LCCR3_BPP (7 << 24) /* bits per pixel */
++#define LCCR3_BPP_S 24
++#endif
++#define LCCR3_DPC (1 << 27) /* double pixel clock mode */
++
++
++#define LCCR3_PCD Fld (8, 0) /* Pixel Clock Divisor */
++#define LCCR3_PixClkDiv(Div) /* Pixel Clock Divisor */ \
++ (((Div) << FShft (LCCR3_PCD)))
++
++
++#define LCCR3_BPP Fld (3, 24) /* Bit Per Pixel */
++#define LCCR3_Bpp(Bpp) /* Bit Per Pixel */ \
++ (((Bpp) << FShft (LCCR3_BPP)))
++
++#define LCCR3_ACB Fld (8, 8) /* AC Bias */
++#define LCCR3_Acb(Acb) /* BAC Bias */ \
++ (((Acb) << FShft (LCCR3_ACB)))
++
++#define LCCR3_HorSnchH (LCCR3_HSP*0) /* Horizontal Synchronization */
++ /* pulse active High */
++#define LCCR3_HorSnchL (LCCR3_HSP*1) /* Horizontal Synchronization */
++
++#define LCCR3_VrtSnchH (LCCR3_VSP*0) /* Vertical Synchronization pulse */
++ /* active High */
++#define LCCR3_VrtSnchL (LCCR3_VSP*1) /* Vertical Synchronization pulse */
++ /* active Low */
++
++#define LCSR_LDD (1 << 0) /* LCD Disable Done */
++#define LCSR_SOF (1 << 1) /* Start of frame */
++#define LCSR_BER (1 << 2) /* Bus error */
++#define LCSR_ABC (1 << 3) /* AC Bias count */
++#define LCSR_IUL (1 << 4) /* input FIFO underrun Lower panel */
++#define LCSR_IUU (1 << 5) /* input FIFO underrun Upper panel */
++#define LCSR_OU (1 << 6) /* output FIFO underrun */
++#define LCSR_QD (1 << 7) /* quick disable */
++#define LCSR_EOF (1 << 8) /* end of frame */
++#define LCSR_BS (1 << 9) /* branch status */
++#define LCSR_SINT (1 << 10) /* subsequent interrupt */
++
++#define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */
++
++#define LCSR_LDD (1 << 0) /* LCD Disable Done */
++#define LCSR_SOF (1 << 1) /* Start of frame */
++#define LCSR_BER (1 << 2) /* Bus error */
++#define LCSR_ABC (1 << 3) /* AC Bias count */
++#define LCSR_IUL (1 << 4) /* input FIFO underrun Lower panel */
++#define LCSR_IUU (1 << 5) /* input FIFO underrun Upper panel */
++#define LCSR_OU (1 << 6) /* output FIFO underrun */
++#define LCSR_QD (1 << 7) /* quick disable */
++#define LCSR_EOF (1 << 8) /* end of frame */
++#define LCSR_BS (1 << 9) /* branch status */
++#define LCSR_SINT (1 << 10) /* subsequent interrupt */
++
++#define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */
++
++#ifdef CONFIG_PXA27x
++
++/*
++ * Keypad
++ */
++#define KPC __REG(0x41500000) /* Keypad Interface Control register */
++#define KPDK __REG(0x41500008) /* Keypad Interface Direct Key register */
++#define KPREC __REG(0x41500010) /* Keypad Interface Rotary Encoder register */
++#define KPMK __REG(0x41500018) /* Keypad Interface Matrix Key register */
++#define KPAS __REG(0x41500020) /* Keypad Interface Automatic Scan register */
++#define KPASMKP0 __REG(0x41500028) /* Keypad Interface Automatic Scan Multiple Key Presser register 0 */
++#define KPASMKP1 __REG(0x41500030) /* Keypad Interface Automatic Scan Multiple Key Presser register 1 */
++#define KPASMKP2 __REG(0x41500038) /* Keypad Interface Automatic Scan Multiple Key Presser register 2 */
++#define KPASMKP3 __REG(0x41500040) /* Keypad Interface Automatic Scan Multiple Key Presser register 3 */
++#define KPKDI __REG(0x41500048) /* Keypad Interface Key Debounce Interval register */
++
++#define KPC_AS (0x1 << 30) /* Automatic Scan bit */
++#define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */
++#define KPC_MI (0x1 << 22) /* Matrix interrupt bit */
++#define KPC_IMKP (0x1 << 21) /* Ignore Multiple Key Press */
++#define KPC_MS7 (0x1 << 20) /* Matrix scan line 7 */
++#define KPC_MS6 (0x1 << 19) /* Matrix scan line 6 */
++#define KPC_MS5 (0x1 << 18) /* Matrix scan line 5 */
++#define KPC_MS4 (0x1 << 17) /* Matrix scan line 4 */
++#define KPC_MS3 (0x1 << 16) /* Matrix scan line 3 */
++#define KPC_MS2 (0x1 << 15) /* Matrix scan line 2 */
++#define KPC_MS1 (0x1 << 14) /* Matrix scan line 1 */
++#define KPC_MS0 (0x1 << 13) /* Matrix scan line 0 */
++#define KPC_MS_ALL (KPC_MS0 | KPC_MS1 | KPC_MS2 | KPC_MS3 | KPC_MS4 | KPC_MS5 | KPC_MS6 | KPC_MS7)
++#define KPC_ME (0x1 << 12) /* Matrix Keypad Enable */
++#define KPC_MIE (0x1 << 11) /* Matrix Interrupt Enable */
++#define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Keypad Debounce Select */
++#define KPC_DI (0x1 << 5) /* Direct key interrupt bit */
++#define KPC_RE_ZERO_DEB (0x1 << 4) /* Rotary Encoder Zero Debounce */
++#define KPC_REE1 (0x1 << 3) /* Rotary Encoder1 Enable */
++#define KPC_REE0 (0x1 << 2) /* Rotary Encoder0 Enable */
++#define KPC_DE (0x1 << 1) /* Direct Keypad Enable */
++#define KPC_DIE (0x1 << 0) /* Direct Keypad interrupt Enable */
++
++#define KPDK_DKP (0x1 << 31)
++#define KPDK_DK7 (0x1 << 7)
++#define KPDK_DK6 (0x1 << 6)
++#define KPDK_DK5 (0x1 << 5)
++#define KPDK_DK4 (0x1 << 4)
++#define KPDK_DK3 (0x1 << 3)
++#define KPDK_DK2 (0x1 << 2)
++#define KPDK_DK1 (0x1 << 1)
++#define KPDK_DK0 (0x1 << 0)
++
++#define KPREC_OF1 (0x1 << 31)
++#define kPREC_UF1 (0x1 << 30)
++#define KPREC_OF0 (0x1 << 15)
++#define KPREC_UF0 (0x1 << 14)
++
++#define KPMK_MKP (0x1 << 31)
++#define KPAS_SO (0x1 << 31)
++#define KPASMKPx_SO (0x1 << 31)
++
++/* Camera Interface */
++#define CICR0 __REG(0x50000000)
++#define CICR1 __REG(0x50000004)
++#define CICR2 __REG(0x50000008)
++#define CICR3 __REG(0x5000000C)
++#define CICR4 __REG(0x50000010)
++#define CISR __REG(0x50000014)
++#define CIFR __REG(0x50000018)
++#define CITOR __REG(0x5000001C)
++#define CIBR0 __REG(0x50000028)
++#define CIBR1 __REG(0x50000030)
++#define CIBR2 __REG(0x50000038)
++
++#define CICR0_DMAEN (1 << 31) /* DMA request enable */
++#define CICR0_PAR_EN (1 << 30) /* Parity enable */
++#define CICR0_SL_CAP_EN (1 << 29) /* Capture enable for slave mode */
++#define CICR0_ENB (1 << 28) /* Camera interface enable */
++#define CICR0_DIS (1 << 27) /* Camera interface disable */
++#define CICR0_SIM (0x7 << 24) /* Sensor interface mode mask */
++#define CICR0_TOM (1 << 9) /* Time-out mask */
++#define CICR0_RDAVM (1 << 8) /* Receive-data-available mask */
++#define CICR0_FEM (1 << 7) /* FIFO-empty mask */
++#define CICR0_EOLM (1 << 6) /* End-of-line mask */
++#define CICR0_PERRM (1 << 5) /* Parity-error mask */
++#define CICR0_QDM (1 << 4) /* Quick-disable mask */
++#define CICR0_CDM (1 << 3) /* Disable-done mask */
++#define CICR0_SOFM (1 << 2) /* Start-of-frame mask */
++#define CICR0_EOFM (1 << 1) /* End-of-frame mask */
++#define CICR0_FOM (1 << 0) /* FIFO-overrun mask */
++
++#define CICR1_TBIT (1 << 31) /* Transparency bit */
++#define CICR1_RGBT_CONV (0x3 << 30) /* RGBT conversion mask */
++#define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */
++#define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */
++#define CICR1_RGB_F (1 << 11) /* RGB format */
++#define CICR1_YCBCR_F (1 << 10) /* YCbCr format */
++#define CICR1_RGB_BPP (0x7 << 7) /* RGB bis per pixel mask */
++#define CICR1_RAW_BPP (0x3 << 5) /* Raw bis per pixel mask */
++#define CICR1_COLOR_SP (0x3 << 3) /* Color space mask */
++#define CICR1_DW (0x7 << 0) /* Data width mask */
++
++#define CICR2_BLW (0xff << 24) /* Beginning-of-line pixel clock
++ wait count mask */
++#define CICR2_ELW (0xff << 16) /* End-of-line pixel clock
++ wait count mask */
++#define CICR2_HSW (0x3f << 10) /* Horizontal sync pulse width mask */
++#define CICR2_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
++ wait count mask */
++#define CICR2_FSW (0x7 << 0) /* Frame stabilization
++ wait count mask */
++
++#define CICR3_BFW (0xff << 24) /* Beginning-of-frame line clock
++ wait count mask */
++#define CICR3_EFW (0xff << 16) /* End-of-frame line clock
++ wait count mask */
++#define CICR3_VSW (0x3f << 10) /* Vertical sync pulse width mask */
++#define CICR3_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
++ wait count mask */
++#define CICR3_LPF (0x7ff << 0) /* Lines per frame mask */
++
++#define CICR4_MCLK_DLY (0x3 << 24) /* MCLK Data Capture Delay mask */
++#define CICR4_PCLK_EN (1 << 23) /* Pixel clock enable */
++#define CICR4_PCP (1 << 22) /* Pixel clock polarity */
++#define CICR4_HSP (1 << 21) /* Horizontal sync polarity */
++#define CICR4_VSP (1 << 20) /* Vertical sync polarity */
++#define CICR4_MCLK_EN (1 << 19) /* MCLK enable */
++#define CICR4_FR_RATE (0x7 << 8) /* Frame rate mask */
++#define CICR4_DIV (0xff << 0) /* Clock divisor mask */
++
++#define CISR_FTO (1 << 15) /* FIFO time-out */
++#define CISR_RDAV_2 (1 << 14) /* Channel 2 receive data available */
++#define CISR_RDAV_1 (1 << 13) /* Channel 1 receive data available */
++#define CISR_RDAV_0 (1 << 12) /* Channel 0 receive data available */
++#define CISR_FEMPTY_2 (1 << 11) /* Channel 2 FIFO empty */
++#define CISR_FEMPTY_1 (1 << 10) /* Channel 1 FIFO empty */
++#define CISR_FEMPTY_0 (1 << 9) /* Channel 0 FIFO empty */
++#define CISR_EOL (1 << 8) /* End of line */
++#define CISR_PAR_ERR (1 << 7) /* Parity error */
++#define CISR_CQD (1 << 6) /* Camera interface quick disable */
++#define CISR_CDD (1 << 5) /* Camera interface disable done */
++#define CISR_SOF (1 << 4) /* Start of frame */
++#define CISR_EOF (1 << 3) /* End of frame */
++#define CISR_IFO_2 (1 << 2) /* FIFO overrun for Channel 2 */
++#define CISR_IFO_1 (1 << 1) /* FIFO overrun for Channel 1 */
++#define CISR_IFO_0 (1 << 0) /* FIFO overrun for Channel 0 */
++
++#define CIFR_FLVL2 (0x7f << 23) /* FIFO 2 level mask */
++#define CIFR_FLVL1 (0x7f << 16) /* FIFO 1 level mask */
++#define CIFR_FLVL0 (0xff << 8) /* FIFO 0 level mask */
++#define CIFR_THL_0 (0x3 << 4) /* Threshold Level for Channel 0 FIFO */
++#define CIFR_RESET_F (1 << 3) /* Reset input FIFOs */
++#define CIFR_FEN2 (1 << 2) /* FIFO enable for channel 2 */
++#define CIFR_FEN1 (1 << 1) /* FIFO enable for channel 1 */
++#define CIFR_FEN0 (1 << 0) /* FIFO enable for channel 0 */
++
++#define SRAM_SIZE 0x40000 /* 4x64K */
++
++#define SRAM_MEM_PHYS 0x5C000000
++
++#define IMPMCR __REG(0x58000000) /* IM Power Management Control Reg */
++#define IMPMSR __REG(0x58000008) /* IM Power Management Status Reg */
++
++#define IMPMCR_PC3 (0x3 << 22) /* Bank 3 Power Control */
++#define IMPMCR_PC3_RUN_MODE (0x0 << 22) /* Run mode */
++#define IMPMCR_PC3_STANDBY_MODE (0x1 << 22) /* Standby mode */
++#define IMPMCR_PC3_AUTO_MODE (0x3 << 22) /* Automatically controlled */
++
++#define IMPMCR_PC2 (0x3 << 20) /* Bank 2 Power Control */
++#define IMPMCR_PC2_RUN_MODE (0x0 << 20) /* Run mode */
++#define IMPMCR_PC2_STANDBY_MODE (0x1 << 20) /* Standby mode */
++#define IMPMCR_PC2_AUTO_MODE (0x3 << 20) /* Automatically controlled */
++
++#define IMPMCR_PC1 (0x3 << 18) /* Bank 1 Power Control */
++#define IMPMCR_PC1_RUN_MODE (0x0 << 18) /* Run mode */
++#define IMPMCR_PC1_STANDBY_MODE (0x1 << 18) /* Standby mode */
++#define IMPMCR_PC1_AUTO_MODE (0x3 << 18) /* Automatically controlled */
++
++#define IMPMCR_PC0 (0x3 << 16) /* Bank 0 Power Control */
++#define IMPMCR_PC0_RUN_MODE (0x0 << 16) /* Run mode */
++#define IMPMCR_PC0_STANDBY_MODE (0x1 << 16) /* Standby mode */
++#define IMPMCR_PC0_AUTO_MODE (0x3 << 16) /* Automatically controlled */
++
++#define IMPMCR_AW3 (1 << 11) /* Bank 3 Automatic Wake-up enable */
++#define IMPMCR_AW2 (1 << 10) /* Bank 2 Automatic Wake-up enable */
++#define IMPMCR_AW1 (1 << 9) /* Bank 1 Automatic Wake-up enable */
++#define IMPMCR_AW0 (1 << 8) /* Bank 0 Automatic Wake-up enable */
++
++#define IMPMCR_DST (0xFF << 0) /* Delay Standby Time, ms */
++
++#define IMPMSR_PS3 (0x3 << 6) /* Bank 3 Power Status: */
++#define IMPMSR_PS3_RUN_MODE (0x0 << 6) /* Run mode */
++#define IMPMSR_PS3_STANDBY_MODE (0x1 << 6) /* Standby mode */
++
++#define IMPMSR_PS2 (0x3 << 4) /* Bank 2 Power Status: */
++#define IMPMSR_PS2_RUN_MODE (0x0 << 4) /* Run mode */
++#define IMPMSR_PS2_STANDBY_MODE (0x1 << 4) /* Standby mode */
++
++#define IMPMSR_PS1 (0x3 << 2) /* Bank 1 Power Status: */
++#define IMPMSR_PS1_RUN_MODE (0x0 << 2) /* Run mode */
++#define IMPMSR_PS1_STANDBY_MODE (0x1 << 2) /* Standby mode */
++
++#define IMPMSR_PS0 (0x3 << 0) /* Bank 0 Power Status: */
++#define IMPMSR_PS0_RUN_MODE (0x0 << 0) /* Run mode */
++#define IMPMSR_PS0_STANDBY_MODE (0x1 << 0) /* Standby mode */
++
++#endif
++
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
++/*
++ * UHC: USB Host Controller (OHCI-like) register definitions
++ */
++#define UHC_BASE_PHYS (0x4C000000)
++#define UHCREV __REG(0x4C000000) /* UHC HCI Spec Revision */
++#define UHCHCON __REG(0x4C000004) /* UHC Host Control Register */
++#define UHCCOMS __REG(0x4C000008) /* UHC Command Status Register */
++#define UHCINTS __REG(0x4C00000C) /* UHC Interrupt Status Register */
++#define UHCINTE __REG(0x4C000010) /* UHC Interrupt Enable */
++#define UHCINTD __REG(0x4C000014) /* UHC Interrupt Disable */
++#define UHCHCCA __REG(0x4C000018) /* UHC Host Controller Comm. Area */
++#define UHCPCED __REG(0x4C00001C) /* UHC Period Current Endpt Descr */
++#define UHCCHED __REG(0x4C000020) /* UHC Control Head Endpt Descr */
++#define UHCCCED __REG(0x4C000024) /* UHC Control Current Endpt Descr */
++#define UHCBHED __REG(0x4C000028) /* UHC Bulk Head Endpt Descr */
++#define UHCBCED __REG(0x4C00002C) /* UHC Bulk Current Endpt Descr */
++#define UHCDHEAD __REG(0x4C000030) /* UHC Done Head */
++#define UHCFMI __REG(0x4C000034) /* UHC Frame Interval */
++#define UHCFMR __REG(0x4C000038) /* UHC Frame Remaining */
++#define UHCFMN __REG(0x4C00003C) /* UHC Frame Number */
++#define UHCPERS __REG(0x4C000040) /* UHC Periodic Start */
++#define UHCLS __REG(0x4C000044) /* UHC Low Speed Threshold */
++
++#define UHCRHDA __REG(0x4C000048) /* UHC Root Hub Descriptor A */
++#define UHCRHDA_NOCP (1 << 12) /* No over current protection */
++
++#define UHCRHDB __REG(0x4C00004C) /* UHC Root Hub Descriptor B */
++#define UHCRHS __REG(0x4C000050) /* UHC Root Hub Status */
++#define UHCRHPS1 __REG(0x4C000054) /* UHC Root Hub Port 1 Status */
++#define UHCRHPS2 __REG(0x4C000058) /* UHC Root Hub Port 2 Status */
++#define UHCRHPS3 __REG(0x4C00005C) /* UHC Root Hub Port 3 Status */
++
++#define UHCSTAT __REG(0x4C000060) /* UHC Status Register */
++#define UHCSTAT_UPS3 (1 << 16) /* USB Power Sense Port3 */
++#define UHCSTAT_SBMAI (1 << 15) /* System Bus Master Abort Interrupt*/
++#define UHCSTAT_SBTAI (1 << 14) /* System Bus Target Abort Interrupt*/
++#define UHCSTAT_UPRI (1 << 13) /* USB Port Resume Interrupt */
++#define UHCSTAT_UPS2 (1 << 12) /* USB Power Sense Port 2 */
++#define UHCSTAT_UPS1 (1 << 11) /* USB Power Sense Port 1 */
++#define UHCSTAT_HTA (1 << 10) /* HCI Target Abort */
++#define UHCSTAT_HBA (1 << 8) /* HCI Buffer Active */
++#define UHCSTAT_RWUE (1 << 7) /* HCI Remote Wake Up Event */
++
++#define UHCHR __REG(0x4C000064) /* UHC Reset Register */
++#define UHCHR_SSEP3 (1 << 11) /* Sleep Standby Enable for Port3 */
++#define UHCHR_SSEP2 (1 << 10) /* Sleep Standby Enable for Port2 */
++#define UHCHR_SSEP1 (1 << 9) /* Sleep Standby Enable for Port1 */
++#define UHCHR_PCPL (1 << 7) /* Power control polarity low */
++#define UHCHR_PSPL (1 << 6) /* Power sense polarity low */
++#define UHCHR_SSE (1 << 5) /* Sleep Standby Enable */
++#define UHCHR_UIT (1 << 4) /* USB Interrupt Test */
++#define UHCHR_SSDC (1 << 3) /* Simulation Scale Down Clock */
++#define UHCHR_CGR (1 << 2) /* Clock Generation Reset */
++#define UHCHR_FHR (1 << 1) /* Force Host Controller Reset */
++#define UHCHR_FSBIR (1 << 0) /* Force System Bus Iface Reset */
++
++#define UHCHIE __REG(0x4C000068) /* UHC Interrupt Enable Register*/
++#define UHCHIE_UPS3IE (1 << 14) /* Power Sense Port3 IntEn */
++#define UHCHIE_UPRIE (1 << 13) /* Port Resume IntEn */
++#define UHCHIE_UPS2IE (1 << 12) /* Power Sense Port2 IntEn */
++#define UHCHIE_UPS1IE (1 << 11) /* Power Sense Port1 IntEn */
++#define UHCHIE_TAIE (1 << 10) /* HCI Interface Transfer Abort
++ Interrupt Enable*/
++#define UHCHIE_HBAIE (1 << 8) /* HCI Buffer Active IntEn */
++#define UHCHIE_RWIE (1 << 7) /* Remote Wake-up IntEn */
++
++#define UHCHIT __REG(0x4C00006C) /* UHC Interrupt Test register */
++
++#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
++
++/* PWRMODE register M field values */
++
++#define PWRMODE_IDLE 0x1
++#define PWRMODE_STANDBY 0x2
++#define PWRMODE_SLEEP 0x3
++#define PWRMODE_DEEPSLEEP 0x7
++
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/regs-ssp.h linux-2.6.25-rc4/include/asm-arm/arch/regs-ssp.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/regs-ssp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/regs-ssp.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,113 @@
++#ifndef __ASM_ARCH_REGS_SSP_H
++#define __ASM_ARCH_REGS_SSP_H
++
++/*
++ * SSP Serial Port Registers
++ * PXA250, PXA255, PXA26x and PXA27x SSP controllers are all slightly different.
++ * PXA255, PXA26x and PXA27x have extra ports, registers and bits.
++ */
++
++#define SSCR0 (0x00) /* SSP Control Register 0 */
++#define SSCR1 (0x04) /* SSP Control Register 1 */
++#define SSSR (0x08) /* SSP Status Register */
++#define SSITR (0x0C) /* SSP Interrupt Test Register */
++#define SSDR (0x10) /* SSP Data Write/Data Read Register */
++
++#define SSTO (0x28) /* SSP Time Out Register */
++#define SSPSP (0x2C) /* SSP Programmable Serial Protocol */
++#define SSTSA (0x30) /* SSP Tx Timeslot Active */
++#define SSRSA (0x34) /* SSP Rx Timeslot Active */
++#define SSTSS (0x38) /* SSP Timeslot Status */
++#define SSACD (0x3C) /* SSP Audio Clock Divider */
++
++/* Common PXA2xx bits first */
++#define SSCR0_DSS (0x0000000f) /* Data Size Select (mask) */
++#define SSCR0_DataSize(x) ((x) - 1) /* Data Size Select [4..16] */
++#define SSCR0_FRF (0x00000030) /* FRame Format (mask) */
++#define SSCR0_Motorola (0x0 << 4) /* Motorola's Serial Peripheral Interface (SPI) */
++#define SSCR0_TI (0x1 << 4) /* Texas Instruments' Synchronous Serial Protocol (SSP) */
++#define SSCR0_National (0x2 << 4) /* National Microwire */
++#define SSCR0_ECS (1 << 6) /* External clock select */
++#define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */
++#if defined(CONFIG_PXA25x)
++#define SSCR0_SCR (0x0000ff00) /* Serial Clock Rate (mask) */
++#define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8) /* Divisor [2..512] */
++#elif defined(CONFIG_PXA27x)
++#define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */
++#define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */
++#define SSCR0_EDSS (1 << 20) /* Extended data size select */
++#define SSCR0_NCS (1 << 21) /* Network clock select */
++#define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */
++#define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */
++#define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */
++#define SSCR0_SlotsPerFrm(x) (((x) - 1) << 24) /* Time slots per frame [1..8] */
++#define SSCR0_ADC (1 << 30) /* Audio clock select */
++#define SSCR0_MOD (1 << 31) /* Mode (normal or network) */
++#endif
++
++#define SSCR1_RIE (1 << 0) /* Receive FIFO Interrupt Enable */
++#define SSCR1_TIE (1 << 1) /* Transmit FIFO Interrupt Enable */
++#define SSCR1_LBM (1 << 2) /* Loop-Back Mode */
++#define SSCR1_SPO (1 << 3) /* Motorola SPI SSPSCLK polarity setting */
++#define SSCR1_SPH (1 << 4) /* Motorola SPI SSPSCLK phase setting */
++#define SSCR1_MWDS (1 << 5) /* Microwire Transmit Data Size */
++#define SSCR1_TFT (0x000003c0) /* Transmit FIFO Threshold (mask) */
++#define SSCR1_TxTresh(x) (((x) - 1) << 6) /* level [1..16] */
++#define SSCR1_RFT (0x00003c00) /* Receive FIFO Threshold (mask) */
++#define SSCR1_RxTresh(x) (((x) - 1) << 10) /* level [1..16] */
++
++#define SSSR_TNF (1 << 2) /* Transmit FIFO Not Full */
++#define SSSR_RNE (1 << 3) /* Receive FIFO Not Empty */
++#define SSSR_BSY (1 << 4) /* SSP Busy */
++#define SSSR_TFS (1 << 5) /* Transmit FIFO Service Request */
++#define SSSR_RFS (1 << 6) /* Receive FIFO Service Request */
++#define SSSR_ROR (1 << 7) /* Receive FIFO Overrun */
++
++#define SSCR0_TIM (1 << 23) /* Transmit FIFO Under Run Interrupt Mask */
++#define SSCR0_RIM (1 << 22) /* Receive FIFO Over Run interrupt Mask */
++#define SSCR0_NCS (1 << 21) /* Network Clock Select */
++#define SSCR0_EDSS (1 << 20) /* Extended Data Size Select */
++
++/* extra bits in PXA255, PXA26x and PXA27x SSP ports */
++#define SSCR0_TISSP (1 << 4) /* TI Sync Serial Protocol */
++#define SSCR0_PSP (3 << 4) /* PSP - Programmable Serial Protocol */
++#define SSCR1_TTELP (1 << 31) /* TXD Tristate Enable Last Phase */
++#define SSCR1_TTE (1 << 30) /* TXD Tristate Enable */
++#define SSCR1_EBCEI (1 << 29) /* Enable Bit Count Error interrupt */
++#define SSCR1_SCFR (1 << 28) /* Slave Clock free Running */
++#define SSCR1_ECRA (1 << 27) /* Enable Clock Request A */
++#define SSCR1_ECRB (1 << 26) /* Enable Clock request B */
++#define SSCR1_SCLKDIR (1 << 25) /* Serial Bit Rate Clock Direction */
++#define SSCR1_SFRMDIR (1 << 24) /* Frame Direction */
++#define SSCR1_RWOT (1 << 23) /* Receive Without Transmit */
++#define SSCR1_TRAIL (1 << 22) /* Trailing Byte */
++#define SSCR1_TSRE (1 << 21) /* Transmit Service Request Enable */
++#define SSCR1_RSRE (1 << 20) /* Receive Service Request Enable */
++#define SSCR1_TINTE (1 << 19) /* Receiver Time-out Interrupt enable */
++#define SSCR1_PINTE (1 << 18) /* Peripheral Trailing Byte Interupt Enable */
++#define SSCR1_IFS (1 << 16) /* Invert Frame Signal */
++#define SSCR1_STRF (1 << 15) /* Select FIFO or EFWR */
++#define SSCR1_EFWR (1 << 14) /* Enable FIFO Write/Read */
++
++#define SSSR_BCE (1 << 23) /* Bit Count Error */
++#define SSSR_CSS (1 << 22) /* Clock Synchronisation Status */
++#define SSSR_TUR (1 << 21) /* Transmit FIFO Under Run */
++#define SSSR_EOC (1 << 20) /* End Of Chain */
++#define SSSR_TINT (1 << 19) /* Receiver Time-out Interrupt */
++#define SSSR_PINT (1 << 18) /* Peripheral Trailing Byte Interrupt */
++
++#define SSPSP_FSRT (1 << 25) /* Frame Sync Relative Timing */
++#define SSPSP_DMYSTOP(x) ((x) << 23) /* Dummy Stop */
++#define SSPSP_SFRMWDTH(x) ((x) << 16) /* Serial Frame Width */
++#define SSPSP_SFRMDLY(x) ((x) << 9) /* Serial Frame Delay */
++#define SSPSP_DMYSTRT(x) ((x) << 7) /* Dummy Start */
++#define SSPSP_STRTDLY(x) ((x) << 4) /* Start Delay */
++#define SSPSP_ETDS (1 << 3) /* End of Transfer data State */
++#define SSPSP_SFRMP (1 << 2) /* Serial Frame Polarity */
++#define SSPSP_SCMODE(x) ((x) << 0) /* Serial Bit Rate Clock Mode */
++
++#define SSACD_SCDB (1 << 3) /* SSPSYSCLK Divider Bypass */
++#define SSACD_ACPS(x) ((x) << 4) /* Audio clock PLL select */
++#define SSACD_ACDS(x) ((x) << 0) /* Audio clock divider select */
++
++#endif /* __ASM_ARCH_REGS_SSP_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/sharpsl.h linux-2.6.25-rc4/include/asm-arm/arch/sharpsl.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/sharpsl.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/sharpsl.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,34 @@
++/*
++ * SharpSL SSP Driver
++ */
++
++unsigned long corgi_ssp_ads7846_putget(unsigned long);
++unsigned long corgi_ssp_ads7846_get(void);
++void corgi_ssp_ads7846_put(unsigned long data);
++void corgi_ssp_ads7846_lock(void);
++void corgi_ssp_ads7846_unlock(void);
++void corgi_ssp_lcdtg_send (unsigned char adrs, unsigned char data);
++void corgi_ssp_blduty_set(int duty);
++int corgi_ssp_max1111_get(unsigned long data);
++
++/*
++ * SharpSL Touchscreen Driver
++ */
++
++struct corgits_machinfo {
++ unsigned long (*get_hsync_invperiod)(void);
++ void (*put_hsync)(void);
++ void (*wait_hsync)(void);
++};
++
++
++/*
++ * SharpSL Backlight
++ */
++extern void corgibl_limit_intensity(int limit);
++
++
++/*
++ * SharpSL Battery/PM Driver
++ */
++extern void sharpsl_battery_kick(void);
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/spitz.h linux-2.6.25-rc4/include/asm-arm/arch/spitz.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/spitz.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/spitz.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,158 @@
++/*
++ * Hardware specific definitions for SL-Cx000 series of PDAs
++ *
++ * Copyright (c) 2005 Alexander Wykes
++ * Copyright (c) 2005 Richard Purdie
++ *
++ * Based on Sharp's 2.4 kernel patches
++ *
++ * 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_ARCH_SPITZ_H
++#define __ASM_ARCH_SPITZ_H 1
++#endif
++
++#include <linux/fb.h>
++
++/* Spitz/Akita GPIOs */
++
++#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */
++#define SPITZ_GPIO_RESET (1)
++#define SPITZ_GPIO_nSD_DETECT (9)
++#define SPITZ_GPIO_TP_INT (11) /* Touch Panel interrupt */
++#define SPITZ_GPIO_AK_INT (13) /* Remote Control */
++#define SPITZ_GPIO_ADS7846_CS (14)
++#define SPITZ_GPIO_SYNC (16)
++#define SPITZ_GPIO_MAX1111_CS (20)
++#define SPITZ_GPIO_FATAL_BAT (21)
++#define SPITZ_GPIO_HSYNC (22)
++#define SPITZ_GPIO_nSD_CLK (32)
++#define SPITZ_GPIO_USB_DEVICE (35)
++#define SPITZ_GPIO_USB_HOST (37)
++#define SPITZ_GPIO_USB_CONNECT (41)
++#define SPITZ_GPIO_LCDCON_CS (53)
++#define SPITZ_GPIO_nPCE (54)
++#define SPITZ_GPIO_nSD_WP (81)
++#define SPITZ_GPIO_ON_RESET (89)
++#define SPITZ_GPIO_BAT_COVER (90)
++#define SPITZ_GPIO_CF_CD (94)
++#define SPITZ_GPIO_ON_KEY (95)
++#define SPITZ_GPIO_SWA (97)
++#define SPITZ_GPIO_SWB (96)
++#define SPITZ_GPIO_CHRG_FULL (101)
++#define SPITZ_GPIO_CO (101)
++#define SPITZ_GPIO_CF_IRQ (105)
++#define SPITZ_GPIO_AC_IN (115)
++#define SPITZ_GPIO_HP_IN (116)
++
++/* Spitz Only GPIOs */
++
++#define SPITZ_GPIO_CF2_IRQ (106) /* CF slot1 Ready */
++#define SPITZ_GPIO_CF2_CD (93)
++
++
++/* Spitz/Akita Keyboard Definitions */
++
++#define SPITZ_KEY_STROBE_NUM (11)
++#define SPITZ_KEY_SENSE_NUM (7)
++#define SPITZ_GPIO_G0_STROBE_BIT 0x0f800000
++#define SPITZ_GPIO_G1_STROBE_BIT 0x00100000
++#define SPITZ_GPIO_G2_STROBE_BIT 0x01000000
++#define SPITZ_GPIO_G3_STROBE_BIT 0x00041880
++#define SPITZ_GPIO_G0_SENSE_BIT 0x00021000
++#define SPITZ_GPIO_G1_SENSE_BIT 0x000000d4
++#define SPITZ_GPIO_G2_SENSE_BIT 0x08000000
++#define SPITZ_GPIO_G3_SENSE_BIT 0x00000000
++
++#define SPITZ_GPIO_KEY_STROBE0 88
++#define SPITZ_GPIO_KEY_STROBE1 23
++#define SPITZ_GPIO_KEY_STROBE2 24
++#define SPITZ_GPIO_KEY_STROBE3 25
++#define SPITZ_GPIO_KEY_STROBE4 26
++#define SPITZ_GPIO_KEY_STROBE5 27
++#define SPITZ_GPIO_KEY_STROBE6 52
++#define SPITZ_GPIO_KEY_STROBE7 103
++#define SPITZ_GPIO_KEY_STROBE8 107
++#define SPITZ_GPIO_KEY_STROBE9 108
++#define SPITZ_GPIO_KEY_STROBE10 114
++
++#define SPITZ_GPIO_KEY_SENSE0 12
++#define SPITZ_GPIO_KEY_SENSE1 17
++#define SPITZ_GPIO_KEY_SENSE2 91
++#define SPITZ_GPIO_KEY_SENSE3 34
++#define SPITZ_GPIO_KEY_SENSE4 36
++#define SPITZ_GPIO_KEY_SENSE5 38
++#define SPITZ_GPIO_KEY_SENSE6 39
++
++
++/* Spitz Scoop Device (No. 1) GPIOs */
++/* Suspend States in comments */
++#define SPITZ_SCP_LED_GREEN SCOOP_GPCR_PA11 /* Keep */
++#define SPITZ_SCP_JK_B SCOOP_GPCR_PA12 /* Keep */
++#define SPITZ_SCP_CHRG_ON SCOOP_GPCR_PA13 /* Keep */
++#define SPITZ_SCP_MUTE_L SCOOP_GPCR_PA14 /* Low */
++#define SPITZ_SCP_MUTE_R SCOOP_GPCR_PA15 /* Low */
++#define SPITZ_SCP_CF_POWER SCOOP_GPCR_PA16 /* Keep */
++#define SPITZ_SCP_LED_ORANGE SCOOP_GPCR_PA17 /* Keep */
++#define SPITZ_SCP_JK_A SCOOP_GPCR_PA18 /* Low */
++#define SPITZ_SCP_ADC_TEMP_ON SCOOP_GPCR_PA19 /* Low */
++
++#define SPITZ_SCP_IO_DIR (SPITZ_SCP_LED_GREEN | SPITZ_SCP_JK_B | SPITZ_SCP_CHRG_ON | \
++ SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_LED_ORANGE | \
++ SPITZ_SCP_CF_POWER | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
++#define SPITZ_SCP_IO_OUT (SPITZ_SCP_CHRG_ON | SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R)
++#define SPITZ_SCP_SUS_CLR (SPITZ_SCP_MUTE_L | SPITZ_SCP_MUTE_R | SPITZ_SCP_JK_A | SPITZ_SCP_ADC_TEMP_ON)
++#define SPITZ_SCP_SUS_SET 0
++
++/* Spitz Scoop Device (No. 2) GPIOs */
++/* Suspend States in comments */
++#define SPITZ_SCP2_IR_ON SCOOP_GPCR_PA11 /* High */
++#define SPITZ_SCP2_AKIN_PULLUP SCOOP_GPCR_PA12 /* Keep */
++#define SPITZ_SCP2_RESERVED_1 SCOOP_GPCR_PA13 /* High */
++#define SPITZ_SCP2_RESERVED_2 SCOOP_GPCR_PA14 /* Low */
++#define SPITZ_SCP2_RESERVED_3 SCOOP_GPCR_PA15 /* Low */
++#define SPITZ_SCP2_RESERVED_4 SCOOP_GPCR_PA16 /* Low */
++#define SPITZ_SCP2_BACKLIGHT_CONT SCOOP_GPCR_PA17 /* Low */
++#define SPITZ_SCP2_BACKLIGHT_ON SCOOP_GPCR_PA18 /* Low */
++#define SPITZ_SCP2_MIC_BIAS SCOOP_GPCR_PA19 /* Low */
++
++#define SPITZ_SCP2_IO_DIR (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1 | \
++ SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
++ SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
++
++#define SPITZ_SCP2_IO_OUT (SPITZ_SCP2_IR_ON | SPITZ_SCP2_AKIN_PULLUP | SPITZ_SCP2_RESERVED_1)
++#define SPITZ_SCP2_SUS_CLR (SPITZ_SCP2_RESERVED_2 | SPITZ_SCP2_RESERVED_3 | SPITZ_SCP2_RESERVED_4 | \
++ SPITZ_SCP2_BACKLIGHT_CONT | SPITZ_SCP2_BACKLIGHT_ON | SPITZ_SCP2_MIC_BIAS)
++#define SPITZ_SCP2_SUS_SET (SPITZ_SCP2_IR_ON | SPITZ_SCP2_RESERVED_1)
++
++
++/* Spitz IRQ Definitions */
++
++#define SPITZ_IRQ_GPIO_KEY_INT IRQ_GPIO(SPITZ_GPIO_KEY_INT)
++#define SPITZ_IRQ_GPIO_AC_IN IRQ_GPIO(SPITZ_GPIO_AC_IN)
++#define SPITZ_IRQ_GPIO_AK_INT IRQ_GPIO(SPITZ_GPIO_AK_INT)
++#define SPITZ_IRQ_GPIO_HP_IN IRQ_GPIO(SPITZ_GPIO_HP_IN)
++#define SPITZ_IRQ_GPIO_TP_INT IRQ_GPIO(SPITZ_GPIO_TP_INT)
++#define SPITZ_IRQ_GPIO_SYNC IRQ_GPIO(SPITZ_GPIO_SYNC)
++#define SPITZ_IRQ_GPIO_ON_KEY IRQ_GPIO(SPITZ_GPIO_ON_KEY)
++#define SPITZ_IRQ_GPIO_SWA IRQ_GPIO(SPITZ_GPIO_SWA)
++#define SPITZ_IRQ_GPIO_SWB IRQ_GPIO(SPITZ_GPIO_SWB)
++#define SPITZ_IRQ_GPIO_BAT_COVER IRQ_GPIO(SPITZ_GPIO_BAT_COVER)
++#define SPITZ_IRQ_GPIO_FATAL_BAT IRQ_GPIO(SPITZ_GPIO_FATAL_BAT)
++#define SPITZ_IRQ_GPIO_CO IRQ_GPIO(SPITZ_GPIO_CO)
++#define SPITZ_IRQ_GPIO_CF_IRQ IRQ_GPIO(SPITZ_GPIO_CF_IRQ)
++#define SPITZ_IRQ_GPIO_CF_CD IRQ_GPIO(SPITZ_GPIO_CF_CD)
++#define SPITZ_IRQ_GPIO_CF2_IRQ IRQ_GPIO(SPITZ_GPIO_CF2_IRQ)
++#define SPITZ_IRQ_GPIO_nSD_INT IRQ_GPIO(SPITZ_GPIO_nSD_INT)
++#define SPITZ_IRQ_GPIO_nSD_DETECT IRQ_GPIO(SPITZ_GPIO_nSD_DETECT)
++
++/*
++ * Shared data structures
++ */
++extern struct platform_device spitzscoop_device;
++extern struct platform_device spitzscoop2_device;
++extern struct platform_device spitzssp_device;
++extern struct sharpsl_charger_machinfo spitz_pm_machinfo;
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/ssp.h linux-2.6.25-rc4/include/asm-arm/arch/ssp.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/ssp.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/ssp.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,83 @@
++/*
++ * ssp.h
++ *
++ * Copyright (C) 2003 Russell King, All Rights Reserved.
++ *
++ * 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.
++ *
++ * This driver supports the following PXA CPU/SSP ports:-
++ *
++ * PXA250 SSP
++ * PXA255 SSP, NSSP
++ * PXA26x SSP, NSSP, ASSP
++ * PXA27x SSP1, SSP2, SSP3
++ * PXA3xx SSP1, SSP2, SSP3, SSP4
++ */
++
++#ifndef __ASM_ARCH_SSP_H
++#define __ASM_ARCH_SSP_H
++
++#include <linux/list.h>
++
++enum pxa_ssp_type {
++ SSP_UNDEFINED = 0,
++ PXA25x_SSP, /* pxa 210, 250, 255, 26x */
++ PXA25x_NSSP, /* pxa 255, 26x (including ASSP) */
++ PXA27x_SSP,
++};
++
++struct ssp_device {
++ struct platform_device *pdev;
++ struct list_head node;
++
++ struct clk *clk;
++ void __iomem *mmio_base;
++ unsigned long phys_base;
++
++ const char *label;
++ int port_id;
++ int type;
++ int use_count;
++ int irq;
++ int drcmr_rx;
++ int drcmr_tx;
++};
++
++/*
++ * SSP initialisation flags
++ */
++#define SSP_NO_IRQ 0x1 /* don't register an irq handler in SSP driver */
++
++struct ssp_state {
++ u32 cr0;
++ u32 cr1;
++ u32 to;
++ u32 psp;
++};
++
++struct ssp_dev {
++ struct ssp_device *ssp;
++ u32 port;
++ u32 mode;
++ u32 flags;
++ u32 psp_flags;
++ u32 speed;
++ int irq;
++};
++
++int ssp_write_word(struct ssp_dev *dev, u32 data);
++int ssp_read_word(struct ssp_dev *dev, u32 *data);
++int ssp_flush(struct ssp_dev *dev);
++void ssp_enable(struct ssp_dev *dev);
++void ssp_disable(struct ssp_dev *dev);
++void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp);
++void ssp_restore_state(struct ssp_dev *dev, struct ssp_state *ssp);
++int ssp_init(struct ssp_dev *dev, u32 port, u32 init_flags);
++int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed);
++void ssp_exit(struct ssp_dev *dev);
++
++struct ssp_device *ssp_request(int port, const char *label);
++void ssp_free(struct ssp_device *);
++#endif /* __ASM_ARCH_SSP_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/system.h linux-2.6.25-rc4/include/asm-arm/arch/system.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/system.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/system.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,35 @@
++/*
++ * linux/include/asm-arm/arch-pxa/system.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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.
++ */
++
++#include <asm/proc-fns.h>
++#include "hardware.h"
++#include "pxa-regs.h"
++
++static inline void arch_idle(void)
++{
++ cpu_do_idle();
++}
++
++
++static inline void arch_reset(char mode)
++{
++ if (mode == 's') {
++ /* Jump into ROM at address 0 */
++ cpu_reset(0);
++ } else {
++ /* Initialize the watchdog and let it fire */
++ OWER = OWER_WME;
++ OSSR = OSSR_M3;
++ OSMR3 = OSCR + 368640; /* ... in 100 ms */
++ }
++}
++
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/timex.h linux-2.6.25-rc4/include/asm-arm/arch/timex.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/timex.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/timex.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,26 @@
++/*
++ * linux/include/asm-arm/arch-pxa/timex.h
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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.
++ */
++
++
++#if defined(CONFIG_PXA25x)
++/* PXA250/210 timer base */
++#define CLOCK_TICK_RATE 3686400
++#elif defined(CONFIG_PXA27x)
++/* PXA27x timer base */
++#ifdef CONFIG_MACH_MAINSTONE
++#define CLOCK_TICK_RATE 3249600
++#else
++#define CLOCK_TICK_RATE 3250000
++#endif
++#else
++#define CLOCK_TICK_RATE 3250000
++#endif
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/tosa.h linux-2.6.25-rc4/include/asm-arm/arch/tosa.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/tosa.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/tosa.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,196 @@
++/*
++ * Hardware specific definitions for Sharp SL-C6000x series of PDAs
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ *
++ * Based on Sharp's 2.4 kernel patches
++ *
++ * 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_ARCH_TOSA_H_
++#define _ASM_ARCH_TOSA_H_ 1
++
++/* TOSA Chip selects */
++#define TOSA_LCDC_PHYS PXA_CS4_PHYS
++/* Internel Scoop */
++#define TOSA_CF_PHYS (PXA_CS2_PHYS + 0x00800000)
++/* Jacket Scoop */
++#define TOSA_SCOOP_PHYS (PXA_CS5_PHYS + 0x00800000)
++
++/*
++ * SCOOP2 internal GPIOs
++ */
++#define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11
++#define TOSA_SCOOP_TC6393_REST_IN SCOOP_GPCR_PA12
++#define TOSA_SCOOP_IR_POWERDWN SCOOP_GPCR_PA13
++#define TOSA_SCOOP_SD_WP SCOOP_GPCR_PA14
++#define TOSA_SCOOP_PWR_ON SCOOP_GPCR_PA15
++#define TOSA_SCOOP_AUD_PWR_ON SCOOP_GPCR_PA16
++#define TOSA_SCOOP_BT_RESET SCOOP_GPCR_PA17
++#define TOSA_SCOOP_BT_PWR_EN SCOOP_GPCR_PA18
++#define TOSA_SCOOP_AC_IN_OL SCOOP_GPCR_PA19
++
++/* GPIO Direction 1 : output mode / 0:input mode */
++#define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393_REST_IN | \
++ TOSA_SCOOP_IR_POWERDWN | TOSA_SCOOP_PWR_ON | TOSA_SCOOP_AUD_PWR_ON |\
++ TOSA_SCOOP_BT_RESET | TOSA_SCOOP_BT_PWR_EN )
++/* GPIO out put level when init 1: Hi */
++#define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393_REST_IN )
++
++/*
++ * SCOOP2 jacket GPIOs
++ */
++#define TOSA_SCOOP_JC_BT_LED SCOOP_GPCR_PA11
++#define TOSA_SCOOP_JC_NOTE_LED SCOOP_GPCR_PA12
++#define TOSA_SCOOP_JC_CHRG_ERR_LED SCOOP_GPCR_PA13
++#define TOSA_SCOOP_JC_USB_PULLUP SCOOP_GPCR_PA14
++#define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15
++#define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16
++#define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17
++#define TOSA_SCOOP_JC_WLAN_LED SCOOP_GPCR_PA18
++#define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19
++
++/* GPIO Direction 1 : output mode / 0:input mode */
++#define TOSA_SCOOP_JC_IO_DIR ( TOSA_SCOOP_JC_BT_LED | TOSA_SCOOP_JC_NOTE_LED | \
++ TOSA_SCOOP_JC_CHRG_ERR_LED | TOSA_SCOOP_JC_USB_PULLUP | \
++ TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \
++ TOSA_SCOOP_JC_WLAN_LED | TOSA_SCOOP_JC_CARD_LIMIT_SEL )
++/* GPIO out put level when init 1: Hi */
++#define TOSA_SCOOP_JC_IO_OUT ( 0 )
++
++/*
++ * Timing Generator
++ */
++#define TG_PNLCTL 0x00
++#define TG_TPOSCTL 0x01
++#define TG_DUTYCTL 0x02
++#define TG_GPOSR 0x03
++#define TG_GPODR1 0x04
++#define TG_GPODR2 0x05
++#define TG_PINICTL 0x06
++#define TG_HPOSCTL 0x07
++
++/*
++ * LED
++ */
++#define TOSA_SCOOP_LED_BLUE TOSA_SCOOP_GPCR_PA11
++#define TOSA_SCOOP_LED_GREEN TOSA_SCOOP_GPCR_PA12
++#define TOSA_SCOOP_LED_ORANGE TOSA_SCOOP_GPCR_PA13
++#define TOSA_SCOOP_LED_WLAN TOSA_SCOOP_GPCR_PA18
++
++
++/*
++ * PXA GPIOs
++ */
++#define TOSA_GPIO_POWERON (0)
++#define TOSA_GPIO_RESET (1)
++#define TOSA_GPIO_AC_IN (2)
++#define TOSA_GPIO_RECORD_BTN (3)
++#define TOSA_GPIO_SYNC (4) /* Cradle SYNC Button */
++#define TOSA_GPIO_USB_IN (5)
++#define TOSA_GPIO_JACKET_DETECT (7)
++#define TOSA_GPIO_nSD_DETECT (9)
++#define TOSA_GPIO_nSD_INT (10)
++#define TOSA_GPIO_TC6393_CLK (11)
++#define TOSA_GPIO_BAT1_CRG (12)
++#define TOSA_GPIO_CF_CD (13)
++#define TOSA_GPIO_BAT0_CRG (14)
++#define TOSA_GPIO_TC6393_INT (15)
++#define TOSA_GPIO_BAT0_LOW (17)
++#define TOSA_GPIO_TC6393_RDY (18)
++#define TOSA_GPIO_ON_RESET (19)
++#define TOSA_GPIO_EAR_IN (20)
++#define TOSA_GPIO_CF_IRQ (21) /* CF slot0 Ready */
++#define TOSA_GPIO_ON_KEY (22)
++#define TOSA_GPIO_VGA_LINE (27)
++#define TOSA_GPIO_TP_INT (32) /* Touch Panel pen down interrupt */
++#define TOSA_GPIO_JC_CF_IRQ (36) /* CF slot1 Ready */
++#define TOSA_GPIO_BAT_LOCKED (38) /* Battery locked */
++#define TOSA_GPIO_TG_SPI_SCLK (81)
++#define TOSA_GPIO_TG_SPI_CS (82)
++#define TOSA_GPIO_TG_SPI_MOSI (83)
++#define TOSA_GPIO_BAT1_LOW (84)
++
++#define TOSA_GPIO_HP_IN GPIO_EAR_IN
++
++#define TOSA_GPIO_MAIN_BAT_LOW GPIO_BAT0_LOW
++
++#define TOSA_KEY_STROBE_NUM (11)
++#define TOSA_KEY_SENSE_NUM (7)
++
++#define TOSA_GPIO_HIGH_STROBE_BIT (0xfc000000)
++#define TOSA_GPIO_LOW_STROBE_BIT (0x0000001f)
++#define TOSA_GPIO_ALL_SENSE_BIT (0x00000fe0)
++#define TOSA_GPIO_ALL_SENSE_RSHIFT (5)
++#define TOSA_GPIO_STROBE_BIT(a) GPIO_bit(58+(a))
++#define TOSA_GPIO_SENSE_BIT(a) GPIO_bit(69+(a))
++#define TOSA_GAFR_HIGH_STROBE_BIT (0xfff00000)
++#define TOSA_GAFR_LOW_STROBE_BIT (0x000003ff)
++#define TOSA_GAFR_ALL_SENSE_BIT (0x00fffc00)
++#define TOSA_GPIO_KEY_SENSE(a) (69+(a))
++#define TOSA_GPIO_KEY_STROBE(a) (58+(a))
++
++/*
++ * Interrupts
++ */
++#define TOSA_IRQ_GPIO_WAKEUP IRQ_GPIO(TOSA_GPIO_WAKEUP)
++#define TOSA_IRQ_GPIO_AC_IN IRQ_GPIO(TOSA_GPIO_AC_IN)
++#define TOSA_IRQ_GPIO_RECORD_BTN IRQ_GPIO(TOSA_GPIO_RECORD_BTN)
++#define TOSA_IRQ_GPIO_SYNC IRQ_GPIO(TOSA_GPIO_SYNC)
++#define TOSA_IRQ_GPIO_USB_IN IRQ_GPIO(TOSA_GPIO_USB_IN)
++#define TOSA_IRQ_GPIO_JACKET_DETECT IRQ_GPIO(TOSA_GPIO_JACKET_DETECT)
++#define TOSA_IRQ_GPIO_nSD_INT IRQ_GPIO(TOSA_GPIO_nSD_INT)
++#define TOSA_IRQ_GPIO_nSD_DETECT IRQ_GPIO(TOSA_GPIO_nSD_DETECT)
++#define TOSA_IRQ_GPIO_BAT1_CRG IRQ_GPIO(TOSA_GPIO_BAT1_CRG)
++#define TOSA_IRQ_GPIO_CF_CD IRQ_GPIO(TOSA_GPIO_CF_CD)
++#define TOSA_IRQ_GPIO_BAT0_CRG IRQ_GPIO(TOSA_GPIO_BAT0_CRG)
++#define TOSA_IRQ_GPIO_TC6393_INT IRQ_GPIO(TOSA_GPIO_TC6393_INT)
++#define TOSA_IRQ_GPIO_BAT0_LOW IRQ_GPIO(TOSA_GPIO_BAT0_LOW)
++#define TOSA_IRQ_GPIO_EAR_IN IRQ_GPIO(TOSA_GPIO_EAR_IN)
++#define TOSA_IRQ_GPIO_CF_IRQ IRQ_GPIO(TOSA_GPIO_CF_IRQ)
++#define TOSA_IRQ_GPIO_ON_KEY IRQ_GPIO(TOSA_GPIO_ON_KEY)
++#define TOSA_IRQ_GPIO_VGA_LINE IRQ_GPIO(TOSA_GPIO_VGA_LINE)
++#define TOSA_IRQ_GPIO_TP_INT IRQ_GPIO(TOSA_GPIO_TP_INT)
++#define TOSA_IRQ_GPIO_JC_CF_IRQ IRQ_GPIO(TOSA_GPIO_JC_CF_IRQ)
++#define TOSA_IRQ_GPIO_BAT_LOCKED IRQ_GPIO(TOSA_GPIO_BAT_LOCKED)
++#define TOSA_IRQ_GPIO_BAT1_LOW IRQ_GPIO(TOSA_GPIO_BAT1_LOW)
++#define TOSA_IRQ_GPIO_KEY_SENSE(a) IRQ_GPIO(69+(a))
++
++#define TOSA_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(TOSA_GPIO_MAIN_BAT_LOW)
++
++extern struct platform_device tosascoop_jc_device;
++extern struct platform_device tosascoop_device;
++
++#define TOSA_KEY_SYNC KEY_102ND /* ??? */
++
++
++#ifndef CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES
++#define TOSA_KEY_RECORD KEY_YEN
++#define TOSA_KEY_ADDRESSBOOK KEY_KATAKANA
++#define TOSA_KEY_CANCEL KEY_ESC
++#define TOSA_KEY_CENTER KEY_HIRAGANA
++#define TOSA_KEY_OK KEY_HENKAN
++#define TOSA_KEY_CALENDAR KEY_KATAKANAHIRAGANA
++#define TOSA_KEY_HOMEPAGE KEY_HANGEUL
++#define TOSA_KEY_LIGHT KEY_MUHENKAN
++#define TOSA_KEY_MENU KEY_HANJA
++#define TOSA_KEY_FN KEY_RIGHTALT
++#define TOSA_KEY_MAIL KEY_ZENKAKUHANKAKU
++#else
++#define TOSA_KEY_RECORD KEY_RECORD
++#define TOSA_KEY_ADDRESSBOOK KEY_ADDRESSBOOK
++#define TOSA_KEY_CANCEL KEY_CANCEL
++#define TOSA_KEY_CENTER KEY_SELECT /* ??? */
++#define TOSA_KEY_OK KEY_OK
++#define TOSA_KEY_CALENDAR KEY_CALENDAR
++#define TOSA_KEY_HOMEPAGE KEY_HOMEPAGE
++#define TOSA_KEY_LIGHT KEY_KBDILLUMTOGGLE
++#define TOSA_KEY_MENU KEY_MENU
++#define TOSA_KEY_FN KEY_FN
++#define TOSA_KEY_MAIL KEY_MAIL
++#endif
++
++#endif /* _ASM_ARCH_TOSA_H_ */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/trizeps4.h linux-2.6.25-rc4/include/asm-arm/arch/trizeps4.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/trizeps4.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/trizeps4.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,106 @@
++/************************************************************************
++ * Include file for TRIZEPS4 SoM and ConXS eval-board
++ * Copyright (c) Jürgen Schindele
++ * 2006
++ ************************************************************************/
++
++/*
++ * Includes/Defines
++ */
++#ifndef _TRIPEPS4_H_
++#define _TRIPEPS4_H_
++
++/* physical memory regions */
++#define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */
++#define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */
++#define TRIZEPS4_ETH_PHYS (PXA_CS2_PHYS) /* Ethernet DM9000 region */
++#define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */
++#define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */
++
++#define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board CSFR register */
++#define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic chip on ConXS-Board BOCR register */
++#define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic chip on ConXS-Board IRCR register*/
++#define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic chip on ConXS-Board UPSR register*/
++#define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* Logic chip on ConXS-Board DICR register*/
++
++/* virtual memory regions */
++#define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */
++
++#define TRIZEPS4_PIC_VIRT 0xF0100000 /* not used */
++#define TRIZEPS4_CFSR_VIRT 0xF0100000
++#define TRIZEPS4_BOCR_VIRT 0xF0200000
++#define TRIZEPS4_DICR_VIRT 0xF0300000
++#define TRIZEPS4_IRCR_VIRT 0xF0400000
++#define TRIZEPS4_UPSR_VIRT 0xF0500000
++
++/* size of flash */
++#define TRIZEPS4_FLASH_SIZE 0x02000000 /* Flash size 32 MB */
++
++/* Ethernet Controller Davicom DM9000 */
++#define GPIO_DM9000 101
++#define TRIZEPS4_ETH_IRQ IRQ_GPIO(GPIO_DM9000)
++
++/* UCB1400 audio / TS-controller */
++#define GPIO_UCB1400 1
++#define TRIZEPS4_UCB1400_IRQ IRQ_GPIO(GPIO_UCB1400)
++
++/* PCMCIA socket Compact Flash */
++#define GPIO_PCD 11 /* PCMCIA Card Detect */
++#define TRIZEPS4_CD_IRQ IRQ_GPIO(GPIO_PCD)
++#define GPIO_PRDY 13 /* READY / nINT */
++#define TRIZEPS4_READY_NINT IRQ_GPIO(GPIO_PRDY)
++
++/* MMC socket */
++#define GPIO_MMC_DET 12
++#define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET)
++
++/* LEDS using tx2 / rx2 */
++#define GPIO_SYS_BUSY_LED 46
++#define GPIO_HEARTBEAT_LED 47
++
++/* Off-module PIC on ConXS board */
++#define GPIO_PIC 0
++#define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC)
++
++#define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT)
++#define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS)
++
++#define BCR_P2V(x) ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT)
++#define BCR_V2P(x) ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS)
++
++#define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT)
++#define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS)
++
++#ifndef __ASSEMBLY__
++#define ConXS_CFSR (*((volatile unsigned short *)CFSR_P2V(0x0C000000)))
++#define ConXS_BCR (*((volatile unsigned short *)BCR_P2V(0x0E000000)))
++#define ConXS_DCR (*((volatile unsigned short *)DCR_P2V(0x0F800000)))
++#else
++#define ConXS_CFSR CFSR_P2V(0x0C000000)
++#define ConXS_BCR BCR_P2V(0x0E000000)
++#define ConXS_DCR DCR_P2V(0x0F800000)
++#endif
++
++#define ConXS_CFSR_BVD_MASK 0x0003
++#define ConXS_CFSR_BVD1 (1 << 0)
++#define ConXS_CFSR_BVD2 (1 << 1)
++#define ConXS_CFSR_VS_MASK 0x000C
++#define ConXS_CFSR_VS1 (1 << 2)
++#define ConXS_CFSR_VS2 (1 << 3)
++#define ConXS_CFSR_VS_5V (0x3 << 2)
++#define ConXS_CFSR_VS_3V3 0x0
++
++#define ConXS_BCR_S0_POW_EN0 (1 << 0)
++#define ConXS_BCR_S0_POW_EN1 (1 << 1)
++#define ConXS_BCR_L_DISP (1 << 4)
++#define ConXS_BCR_CF_BUF_EN (1 << 5)
++#define ConXS_BCR_CF_RESET (1 << 7)
++#define ConXS_BCR_S0_VCC_3V3 0x1
++#define ConXS_BCR_S0_VCC_5V0 0x2
++#define ConXS_BCR_S0_VPP_12V 0x4
++#define ConXS_BCR_S0_VPP_3V3 0x8
++
++#define ConXS_IRCR_MODE (1 << 0)
++#define ConXS_IRCR_SD (1 << 1)
++
++#endif /* _TRIPEPS4_H_ */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/udc.h linux-2.6.25-rc4/include/asm-arm/arch/udc.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/udc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/udc.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,8 @@
++/*
++ * linux/include/asm-arm/arch-pxa/udc.h
++ *
++ */
++#include <asm/mach/udc_pxa2xx.h>
++
++extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
++
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/uncompress.h linux-2.6.25-rc4/include/asm-arm/arch/uncompress.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/uncompress.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/uncompress.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,40 @@
++/*
++ * linux/include/asm-arm/arch-pxa/uncompress.h
++ *
++ * Author: Nicolas Pitre
++ * Copyright: (C) 2001 MontaVista Software Inc.
++ *
++ * 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.
++ */
++
++#include <linux/serial_reg.h>
++#include <asm/arch/pxa-regs.h>
++
++#define __REG(x) ((volatile unsigned long *)x)
++
++#define UART FFUART
++
++
++static inline void putc(char c)
++{
++ if (!(UART[UART_IER] & IER_UUE))
++ return;
++ while (!(UART[UART_LSR] & LSR_TDRQ))
++ barrier();
++ UART[UART_TX] = c;
++}
++
++/*
++ * This does not append a newline
++ */
++static inline void flush(void)
++{
++}
++
++/*
++ * nothing to do
++ */
++#define arch_decomp_setup()
++#define arch_decomp_wdog()
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/vmalloc.h linux-2.6.25-rc4/include/asm-arm/arch/vmalloc.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/vmalloc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/vmalloc.h 2008-02-26 01:20:20.000000000 +0100
+@@ -0,0 +1,11 @@
++/*
++ * linux/include/asm-arm/arch-pxa/vmalloc.h
++ *
++ * Author: Nicolas Pitre
++ * Copyright: (C) 2001 MontaVista Software Inc.
++ *
++ * 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.
++ */
++#define VMALLOC_END (0xe8000000)
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch/zylonite.h linux-2.6.25-rc4/include/asm-arm/arch/zylonite.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch/zylonite.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch/zylonite.h 2008-03-08 16:11:19.000000000 +0100
+@@ -0,0 +1,44 @@
++#ifndef __ASM_ARCH_ZYLONITE_H
++#define __ASM_ARCH_ZYLONITE_H
++
++#define ZYLONITE_ETH_PHYS 0x14000000
++
++#define EXT_GPIO(x) (128 + (x))
++
++/* the following variables are processor specific and initialized
++ * by the corresponding zylonite_pxa3xx_init()
++ */
++struct platform_mmc_slot {
++ int gpio_cd;
++ int gpio_wp;
++};
++
++extern struct platform_mmc_slot zylonite_mmc_slot[];
++
++extern int gpio_backlight;
++extern int gpio_eth_irq;
++
++extern int lcd_id;
++extern int lcd_orientation;
++
++#ifdef CONFIG_CPU_PXA300
++extern void zylonite_pxa300_init(void);
++#else
++static inline void zylonite_pxa300_init(void)
++{
++ if (cpu_is_pxa300() || cpu_is_pxa310())
++ panic("%s: PXA300/PXA310 not supported\n", __FUNCTION__);
++}
++#endif
++
++#ifdef CONFIG_CPU_PXA320
++extern void zylonite_pxa320_init(void);
++#else
++static inline void zylonite_pxa320_init(void)
++{
++ if (cpu_is_pxa320())
++ panic("%s: PXA320 not supported\n", __FUNCTION__);
++}
++#endif
++
++#endif /* __ASM_ARCH_ZYLONITE_H */
+diff -NbBur linux-2.6.25-rc4-orig/include/asm-arm/arch-pxa/pxa27x_keypad.h linux-2.6.25-rc4/include/asm-arm/arch-pxa/pxa27x_keypad.h
+--- linux-2.6.25-rc4-orig/include/asm-arm/arch-pxa/pxa27x_keypad.h 2008-03-08 18:26:06.000000000 +0100
++++ linux-2.6.25-rc4/include/asm-arm/arch-pxa/pxa27x_keypad.h 2008-03-08 16:22:35.000000000 +0100
+@@ -53,4 +53,6 @@
+
+ #define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val))
+
++extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info);
++
+ #endif /* __ASM_ARCH_PXA27x_KEYPAD_H */
+
diff --git a/packages/linux/linux-mainstone/mainstone/.mtn2git_empty b/packages/linux/linux-mainstone/mainstone/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-mainstone/mainstone/.mtn2git_empty
diff --git a/packages/linux/linux-mainstone/mainstone/defconfig b/packages/linux/linux-mainstone/mainstone/defconfig
new file mode 100644
index 0000000000..cbea28d485
--- /dev/null
+++ b/packages/linux/linux-mainstone/mainstone/defconfig
@@ -0,0 +1,1608 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.25-rc4
+# Sat Mar 8 18:03:28 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_SUPPORTS_AOUT=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_GROUP_SCHED=y
+# CONFIG_FAIR_GROUP_SCHED is not set
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_USER_SCHED=y
+# CONFIG_CGROUP_SCHED is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+# CONFIG_RELAY is not set
+# CONFIG_NAMESPACES is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_COMPAT_BRK=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_PROFILING=y
+# CONFIG_MARKERS is not set
+CONFIG_OPROFILE=m
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+# CONFIG_PROC_PAGE_MONITOR is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+CONFIG_CLASSIC_RCU=y
+# CONFIG_PREEMPT_RCU is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM7X00A is not set
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+CONFIG_MACH_MAINSTONE=y
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_ARCH_PXA_ESERIES is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_COLIBRI is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_LITTLETON is not set
+# CONFIG_MACH_ARMCORE is not set
+# CONFIG_MACH_MAGICIAN is not set
+# CONFIG_MACH_PCM027 is not set
+CONFIG_PXA27x=y
+CONFIG_PXA_SSP=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_ARM_THUMB is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=m
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=m
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=m
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+# CONFIG_PREEMPT is not set
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_LEDS=y
+CONFIG_LEDS_CPU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,115200 mem=64M console=ttyS0 debug "
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=y
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_XFRM_STATISTICS is not set
+CONFIG_NET_KEY=m
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+CONFIG_IPV6=m
+CONFIG_IPV6_PRIVACY=y
+CONFIG_IPV6_ROUTER_PREF=y
+# CONFIG_IPV6_ROUTE_INFO is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_MIP6=m
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_CAN is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+# CONFIG_IRLAN is not set
+# CONFIG_IRNET is not set
+# CONFIG_IRCOMM is not set
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+# CONFIG_PXA_FICP is not set
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+# CONFIG_BT_L2CAP is not set
+# CONFIG_BT_SCO is not set
+
+#
+# Bluetooth device drivers
+#
+# CONFIG_BT_HCIUSB is not set
+# CONFIG_BT_HCIBTUSB is not set
+# CONFIG_BT_HCIBTSDIO is not set
+# CONFIG_BT_HCIUART is not set
+# CONFIG_BT_HCIBCM203X is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIDTL1 is not set
+# CONFIG_BT_HCIBT3C is not set
+# CONFIG_BT_HCIBLUECARD is not set
+# CONFIG_BT_HCIBTUART is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+# CONFIG_IEEE80211_CRYPT_CCMP is not set
+# CONFIG_IEEE80211_CRYPT_TKIP is not set
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=m
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+# CONFIG_MTD_CFI_I1 is not set
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PXA2XX=y
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+# CONFIG_MTD_NAND is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_ENCLOSURE_SERVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=m
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=m
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=m
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_PROC_FS is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_IDE_GENERIC is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+# CONFIG_BLK_DEV_SD is not set
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_ENC28J60 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_PCMCIA_RAYCS=m
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+# CONFIG_LIBERTAS_CS is not set
+# CONFIG_LIBERTAS_SDIO is not set
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_ATMEL=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_USB_ZD1201=m
+# CONFIG_USB_NET_RNDIS_WLAN is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_HOSTAP_CS=m
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_NET_PCMCIA is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_PXA27x=y
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_UCB1400=y
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=16
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+CONFIG_CARDMAN_4000=m
+CONFIG_CARDMAN_4040=m
+# CONFIG_IPWIRELESS is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+CONFIG_I2C_GPIO=m
+CONFIG_I2C_PXA=y
+CONFIG_I2C_PXA_SLAVE=y
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_PCF8575 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_TPS65010 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+# CONFIG_SPI_BITBANG is not set
+CONFIG_SPI_PXA2XX=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+# CONFIG_DEBUG_GPIO is not set
+
+#
+# I2C GPIO expanders:
+#
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MCP23S08 is not set
+CONFIG_W1=y
+CONFIG_W1_CON=y
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_DS2490 is not set
+# CONFIG_W1_MASTER_DS2482 is not set
+# CONFIG_W1_MASTER_DS1WM is not set
+# CONFIG_W1_MASTER_GPIO is not set
+
+#
+# 1-wire Slaves
+#
+# CONFIG_W1_SLAVE_THERM is not set
+# CONFIG_W1_SLAVE_SMEM is not set
+# CONFIG_W1_SLAVE_DS2433 is not set
+CONFIG_W1_SLAVE_DS2760=y
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+CONFIG_BATTERY_DS2760=y
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ADT7470 is not set
+# CONFIG_SENSORS_ADT7473 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_F71882FG is not set
+# CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM70 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_ADS7828 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83L786NG is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+# CONFIG_MFD_ASIC3 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=y
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_UVESA is not set
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+# CONFIG_FB_PXA_PARAMETERS is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+# CONFIG_LCD_LTV350QV is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=y
+
+#
+# Display hardware drivers
+#
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=y
+CONFIG_SND_PXA2XX_AC97=y
+
+#
+# SPI devices
+#
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# ALSA SoC audio for Freescale SOCs
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+CONFIG_HID_DEBUG=y
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+# CONFIG_USB_OHCI_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG is not set
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+CONFIG_USB_GADGET_DUMMY_HCD=y
+CONFIG_USB_DUMMY_HCD=m
+CONFIG_USB_GADGET_DUALSPEED=y
+# CONFIG_USB_ZERO is not set
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+# CONFIG_USB_GADGETFS is not set
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+# CONFIG_USB_G_SERIAL is not set
+# CONFIG_USB_MIDI_GADGET is not set
+# CONFIG_USB_G_PRINTER is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+# CONFIG_SDIO_UART is not set
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=m
+# CONFIG_MMC_SPI is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+CONFIG_LEDS_GPIO=m
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+# CONFIG_LEDS_TRIGGER_IDE_DISK is not set
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+# CONFIG_RTC_DRV_S35390A is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_R9701 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+CONFIG_DNOTIFY=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+CONFIG_CRAMFS=m
+# CONFIG_VXFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+# CONFIG_DLM is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_BACKTRACE_SELF_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_SAMPLES is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+# CONFIG_DEBUG_STACK_USAGE is not set
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_AEAD=m
+CONFIG_CRYPTO_BLKCIPHER=m
+# CONFIG_CRYPTO_SEQIV is not set
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SALSA20 is not set
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_AUTHENC=m
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-mainstone_2.6.25-rc4.bb b/packages/linux/linux-mainstone_2.6.25-rc4.bb
new file mode 100644
index 0000000000..fd5c30e37f
--- /dev/null
+++ b/packages/linux/linux-mainstone_2.6.25-rc4.bb
@@ -0,0 +1,25 @@
+require linux.inc
+
+SECTION = "kernel"
+DESCRIPTION = "Linux kernel for the Mainstone (PXA270 ref design)"
+LICENSE = "GPL"
+PR = "r0"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
+ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/testing/patch-2.6.25-rc4.bz2;patch=1 \
+ file://mainstone-keypad.patch;patch=1 \
+ file://defconfig"
+
+S = "${WORKDIR}/linux-2.6.24"
+
+COMPATIBLE_HOST = 'arm.*-linux'
+
+ARCH = "arm"
+
+CMDLINE_CONSOLE ?= "ttyS0,115200n8"
+#CMDLINE_ROOT = "root=/dev/slug rootfstype=ext2,jffs2 initrd=0x01000000,10M mem=32M@0x00000000"
+#CMDLINE_ROOT = "root=/dev/ram0 rw rootfstype=ext2,jffs2 initrd=0x01000000,10M init=/linuxrc mem=32M@0x00000000"
+CMDLINE_ROOT = "root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,115200 mem=64M"
+CMDLINE = "${CMDLINE_ROOT} ${CMDLINE_CONSOLE}"
+
+COMPATIBLE_MACHINE = "mainstone"
diff --git a/packages/linux/linux-omap.inc b/packages/linux/linux-omap.inc
index 52b0d27a6d..c706a3f919 100644
--- a/packages/linux/linux-omap.inc
+++ b/packages/linux/linux-omap.inc
@@ -1,39 +1,7 @@
-SECTION = "kernel"
-DESCRIPTION = "Linux kernel for OMAP processors"
-LICENSE = "GPL"
-#DEPENDS = ${@['u-boot','u-boot-omap2430sdp'][bb.data.getVar('MACHINE',d,1) == 'omap2430sdp']}
-
-DEPENDS = "u-boot-utils-native"
-
-inherit kernel
+require linux.inc
+DESCRIPTION = "Linux kernel for OMAP processors"
KERNEL_IMAGETYPE = "uImage"
module_autoload_ohci-hcd_omap5912osk = "ohci-hcd"
-do_configure_prepend() {
-
- rm -f ${S}/.config || true
-
- if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
- echo "CONFIG_AEABI=y" >> ${S}/.config
- echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
- else
- echo "# CONFIG_AEABI is not set" >> ${S}/.config
- echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
- fi
-
- sed -e '/CONFIG_AEABI/d' \
- -e '/CONFIG_OABI_COMPAT=/d' \
- '${WORKDIR}/defconfig' >>'${S}/.config'
-
- yes '' | oe_runmake oldconfig
-}
-do_deploy() {
- install -d ${DEPLOY_DIR_IMAGE}
- install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}
-}
-
-do_deploy[dirs] = "${S}"
-
-addtask deploy before do_build after do_compile
diff --git a/packages/linux/linux-openmoko_2.6.22.5.bb b/packages/linux/linux-openmoko_2.6.22.5.bb
index fc702c8719..fe46c59a58 100644
--- a/packages/linux/linux-openmoko_2.6.22.5.bb
+++ b/packages/linux/linux-openmoko_2.6.22.5.bb
@@ -60,18 +60,12 @@ module_autoload_snd-mixer-oss = "snd-mixer-oss"
# sd/mmc
module_autoload_s3cmci = "s3cmci"
-python do_patch_prepend() {
- def runcmd(cmd):
- import commands
- (status, output) = commands.getstatusoutput(cmd)
- if status != 0:
- raise Exception, "Status %i: %s" % (status >> 8, output)
- return output
- runcmd('mv %(WORKDIR)s/patches %(S)s/patches && cd %(S)s && '
- 'quilt push -av && mv patches patches.openmoko && '
- 'mv .pc .pc.old && mv %(WORKDIR)s/defconfig-%(KERNEL_RELEASE)s %(WORKDIR)s/defconfig' %
- {'WORKDIR': bb.data.getVar('WORKDIR', d, 1),
- 'S': bb.data.getVar('S', d, 1),
- 'KERNEL_RELEASE': bb.data.getVar('KERNEL_RELEASE', d, 1)})
- del runcmd
+do_prepatch() {
+ mv ${WORKDIR}/patches ${S}/patches && cd ${S} && quilt push -av
+ mv patches patches.openmoko
+ mv .pc .pc.old
+ mv ${WORKDIR}/defconfig-${KERNEL_RELEASE} ${WORKDIR}/defconfig
}
+
+addtask prepatch after do_unpack before do_patch
+
diff --git a/packages/linux/linux-openmoko_2.6.24.bb b/packages/linux/linux-openmoko_2.6.24.bb
index b316f4ae4e..0a7b34ba30 100644
--- a/packages/linux/linux-openmoko_2.6.24.bb
+++ b/packages/linux/linux-openmoko_2.6.24.bb
@@ -8,8 +8,13 @@ KERNEL_RELEASE = "2.6.24"
# need to synchronize with LOCALVERSION, if set
KERNEL_VERSION = "${KERNEL_RELEASE}"
-PV = "${VANILLA_VERSION}+svnr${SRCREV}"
-PR = "r3"
+# re-enabled this when feature is fully implemented in OE
+#SRCREV_FORMAT = "patches-rconfig"
+SRCREV_FORMAT = "patches"
+CONFIG_REV = "4165"
+
+PV = "${VANILLA_VERSION}+svnr${SRCREV}-r${CONFIG_REV}"
+PR = "r4"
KERNEL_IMAGETYPE = "uImage"
UBOOT_ENTRYPOINT = "30008000"
@@ -17,11 +22,10 @@ UBOOT_ENTRYPOINT = "30008000"
##############################################################
# source and patches
#
-SRCREV_FORMAT = "patches-rconfig"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${VANILLA_VERSION}.tar.bz2 \
svn://svn.openmoko.org/branches/src/target/kernel/2.6.24.x;module=patches;proto=http;name=patches \
- svn://svn.openmoko.org/branches/src/target/kernel/2.6.24.x;module=config;proto=http;name=config "
+ svn://svn.openmoko.org/branches/src/target/kernel/2.6.24.x;module=config;proto=http;rev=${CONFIG_REV};name=config "
S = "${WORKDIR}/linux-${VANILLA_VERSION}"
diff --git a/packages/linux/linux-rp-2.6.24/defconfig-tosa b/packages/linux/linux-rp-2.6.24/defconfig-tosa
new file mode 100644
index 0000000000..34f0cc1210
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/defconfig-tosa
@@ -0,0 +1,1728 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.24
+# Mon Feb 25 01:57:38 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_PID_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
+# CONFIG_FAIR_CGROUP_SCHED 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
+CONFIG_HAVE_CLOCK_LIB=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=m
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_IOSCHED="noop"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_IOP13XX is not set
+# CONFIG_ARCH_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+CONFIG_DMABOUNCE=y
+
+#
+# Intel PXA2xx/PXA3xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+CONFIG_PXA_SHARPSL=y
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_HX2750 is not set
+# CONFIG_MACH_EM_X270 is not set
+# CONFIG_MACH_ZYLONITE is not set
+# CONFIG_MACH_ARMCORE is not set
+CONFIG_PXA_SHARPSL_25x=y
+# CONFIG_PXA_SHARPSL_27x is not set
+# CONFIG_MACH_HTCUNIVERSAL is not set
+# CONFIG_MACH_POODLE is not set
+# CONFIG_MACH_CORGI is not set
+# CONFIG_MACH_SHEPHERD is not set
+# CONFIG_MACH_HUSKY is not set
+CONFIG_MACH_TOSA=y
+CONFIG_PXA25x=y
+CONFIG_PXA_SSP=y
+# CONFIG_PXA_KEYS is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+# CONFIG_PCMCIA_IOCTL is not set
+
+#
+# PC-card bridges
+#
+CONFIG_PCMCIA_PXA2XX=y
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 dyntick=enable debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+CONFIG_CPU_FREQ_PXA25x=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=m
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+# CONFIG_FPE_NWFPE is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=m
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+CONFIG_NET_KEY=m
+# CONFIG_NET_KEY_MIGRATE is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+# CONFIG_INET_LRO is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK is not set
+# CONFIG_NF_CONNTRACK_ENABLED is not set
+# CONFIG_NF_CONNTRACK is not set
+CONFIG_NETFILTER_XTABLES=m
+# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+# CONFIG_NETFILTER_XT_TARGET_MARK is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
+# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
+# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
+# CONFIG_NETFILTER_XT_MATCH_ESP is not set
+# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set
+# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_MAC is not set
+# CONFIG_NETFILTER_XT_MATCH_MARK is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
+# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
+# CONFIG_NETFILTER_XT_MATCH_STRING is not set
+# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set
+# CONFIG_NETFILTER_XT_MATCH_TIME is not set
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP6_NF_QUEUE is not set
+# CONFIG_IP6_NF_IPTABLES is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+CONFIG_IRDA=m
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+CONFIG_IRNET=m
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+# CONFIG_IRDA_CACHE_LAST_LSAP is not set
+# CONFIG_IRDA_FAST_RR is not set
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_KINGSUN_DONGLE is not set
+# CONFIG_KSDAZZLE_DONGLE is not set
+# CONFIG_KS959_DONGLE is not set
+
+#
+# Old SIR device drivers
+#
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Old Serial dongle support
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_SIGMATEL_FIR is not set
+CONFIG_PXA_FICP=m
+# CONFIG_MCS_FIR is not set
+CONFIG_BT=m
+CONFIG_BT_L2CAP=m
+CONFIG_BT_SCO=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_RFCOMM_TTY=y
+CONFIG_BT_BNEP=m
+CONFIG_BT_BNEP_MC_FILTER=y
+CONFIG_BT_BNEP_PROTO_FILTER=y
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+# CONFIG_BT_HCIBTSDIO is not set
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+# CONFIG_BT_HCIUART_LL is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIDTL1=m
+CONFIG_BT_HCIBT3C=m
+CONFIG_BT_HCIBLUECARD=m
+CONFIG_BT_HCIBTUART=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+# CONFIG_IEEE80211_SOFTMAC is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+# CONFIG_MTD_CFI is not set
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_RAM is not set
+CONFIG_MTD_ROM=y
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_SHARP_SL=y
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_VERIFY_WRITE=y
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+CONFIG_MTD_NAND_TMIO=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+CONFIG_IDE=y
+CONFIG_IDE_MAX_HWIFS=4
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_BLK_DEV_IDEDISK=y
+# CONFIG_IDEDISK_MULTI_MODE is not set
+CONFIG_BLK_DEV_IDECS=y
+CONFIG_BLK_DEV_IDECD=m
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+CONFIG_IDE_PROC_FS=y
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_IDE_GENERIC is not set
+# CONFIG_BLK_DEV_PLATFORM is not set
+# CONFIG_IDE_ARM is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+CONFIG_IDE_ARCH_OBSOLETE_INIT=y
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=m
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+# CONFIG_SCSI_SRP_ATTRS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_ATA is not set
+CONFIG_MD=y
+# CONFIG_BLK_DEV_MD is not set
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_MULTIPATH_RDAC is not set
+# CONFIG_DM_MULTIPATH_HP is not set
+# CONFIG_DM_DELAY is not set
+# CONFIG_DM_UEVENT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_VETH is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+# CONFIG_IBM_NEW_EMAC_ZMII is not set
+# CONFIG_IBM_NEW_EMAC_RGMII is not set
+# CONFIG_IBM_NEW_EMAC_TAH is not set
+# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
+# CONFIG_B44 is not set
+CONFIG_NETDEV_1000=y
+CONFIG_NETDEV_10000=y
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+# CONFIG_USB_NET_DM9601 is not set
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+# CONFIG_USB_NET_ZAURUS is not set
+CONFIG_NET_PCMCIA=y
+# CONFIG_PCMCIA_3C589 is not set
+# CONFIG_PCMCIA_3C574 is not set
+# CONFIG_PCMCIA_FMVJ18X is not set
+CONFIG_PCMCIA_PCNET=m
+# CONFIG_PCMCIA_NMCLAN is not set
+# CONFIG_PCMCIA_SMC91C92 is not set
+# CONFIG_PCMCIA_XIRC2PS is not set
+# CONFIG_PCMCIA_AXNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+# CONFIG_PPP_MPPE is not set
+# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=640
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+# CONFIG_INPUT_POWER is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_CORGI is not set
+# CONFIG_KEYBOARD_SPITZ is not set
+CONFIG_KEYBOARD_TOSA=y
+# CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_CORGI is not set
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+CONFIG_TOUCHSCREEN_WM97XX=y
+# CONFIG_TOUCHSCREEN_WM9705 is not set
+CONFIG_TOUCHSCREEN_WM9712=y
+# CONFIG_TOUCHSCREEN_WM9713 is not set
+# CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE is not set
+CONFIG_TOUCHSCREEN_WM97XX_TOSA=y
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+CONFIG_HAVE_GPIO_LIB=y
+
+#
+# GPIO Support
+#
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+CONFIG_BATTERY_TOSA=y
+# CONFIG_HWMON is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB_POSSIBLE=y
+# CONFIG_SSB is not set
+
+#
+# Multifunction device drivers
+#
+CONFIG_MFD_CORE=y
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+CONFIG_MFD_TC6393XB=y
+# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_ASIC3 is not set
+# CONFIG_HTC_ASIC3_DS1WM is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_VIVI is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+CONFIG_VIDEO_USBVIDEO=m
+CONFIG_USB_VICAM=m
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_OV511=m
+CONFIG_USB_SE401=m
+CONFIG_USB_SN9C102=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+CONFIG_RADIO_ADAPTERS=y
+CONFIG_USB_DSBR=m
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_VIDEO_OUTPUT_CONTROL is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+# CONFIG_FB_DEFERRED_IO is not set
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_W100 is not set
+CONFIG_FB_TMIO=y
+CONFIG_FB_TMIO_ACCELL=y
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_TOSA=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_8x16 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+# CONFIG_SND_SUPPORT_OLD_API is not set
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_DUMMY=m
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+# CONFIG_SND_PXA2XX_AC97 is not set
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# PCMCIA devices
+#
+# CONFIG_SND_VXPOCKET is not set
+# CONFIG_SND_PDAUDIOCF is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_PXA2XX_SOC=y
+CONFIG_SND_PXA2XX_SOC_AC97=y
+CONFIG_SND_PXA2XX_SOC_TOSA=y
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM9712=y
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+# CONFIG_HIDRAW is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_ISD200 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+# CONFIG_USB_SERIAL_AIRCABLE is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+CONFIG_USB_SERIAL_BELKIN=m
+# CONFIG_USB_SERIAL_CH341 is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+# CONFIG_USB_SERIAL_CP2101 is not set
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_EMI62=m
+CONFIG_USB_EMI26=m
+# CONFIG_USB_ADUTUX is not set
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+# CONFIG_USB_BERRY_CHARGE is not set
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+# CONFIG_USB_PHIDGET is not set
+CONFIG_USB_IDMOUSE=m
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
+# CONFIG_USB_GADGET_ATMEL_USBA is not set
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=m
+# CONFIG_USB_PXA2XX_SMALL is not set
+# CONFIG_USB_GADGET_M66592 is not set
+# CONFIG_USB_GADGET_PXA27X is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_S3C2410 is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+CONFIG_SDIO_UART=m
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_TMIO is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_TOSA=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_SYSFS is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+# CONFIG_JFFS2_LZO is not set
+CONFIG_JFFS2_RTIME=y
+CONFIG_JFFS2_RUBIN=y
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+CONFIG_CRAMFS=m
+CONFIG_SQUASHFS=m
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+CONFIG_NETWORK_FILESYSTEMS=y
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+# CONFIG_SUNRPC_BIND34 is not set
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+CONFIG_SMB_NLS_DEFAULT=y
+CONFIG_SMB_NLS_REMOTE="cp437"
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+# CONFIG_CIFS_XATTR is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+# CONFIG_SYSV68_PARTITION is not set
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="cp437"
+CONFIG_NLS_CODEPAGE_437=m
+CONFIG_NLS_CODEPAGE_737=m
+CONFIG_NLS_CODEPAGE_775=m
+CONFIG_NLS_CODEPAGE_850=m
+CONFIG_NLS_CODEPAGE_852=m
+CONFIG_NLS_CODEPAGE_855=m
+CONFIG_NLS_CODEPAGE_857=m
+CONFIG_NLS_CODEPAGE_860=m
+CONFIG_NLS_CODEPAGE_861=m
+CONFIG_NLS_CODEPAGE_862=m
+CONFIG_NLS_CODEPAGE_863=m
+CONFIG_NLS_CODEPAGE_864=m
+CONFIG_NLS_CODEPAGE_865=m
+CONFIG_NLS_CODEPAGE_866=m
+CONFIG_NLS_CODEPAGE_869=m
+CONFIG_NLS_CODEPAGE_936=m
+CONFIG_NLS_CODEPAGE_950=m
+CONFIG_NLS_CODEPAGE_932=m
+CONFIG_NLS_CODEPAGE_949=m
+CONFIG_NLS_CODEPAGE_874=m
+CONFIG_NLS_ISO8859_8=m
+CONFIG_NLS_CODEPAGE_1250=m
+CONFIG_NLS_CODEPAGE_1251=m
+CONFIG_NLS_ASCII=m
+CONFIG_NLS_ISO8859_1=m
+CONFIG_NLS_ISO8859_2=m
+CONFIG_NLS_ISO8859_3=m
+CONFIG_NLS_ISO8859_4=m
+CONFIG_NLS_ISO8859_5=m
+CONFIG_NLS_ISO8859_6=m
+CONFIG_NLS_ISO8859_7=m
+CONFIG_NLS_ISO8859_9=m
+CONFIG_NLS_ISO8859_13=m
+CONFIG_NLS_ISO8859_14=m
+CONFIG_NLS_ISO8859_15=m
+CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
+CONFIG_NLS_UTF8=m
+# CONFIG_DLM is not set
+# CONFIG_INSTRUMENTATION is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_WARN_DEPRECATED=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_SAMPLES is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+# CONFIG_SECURITY_FILE_CAPABILITIES is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_XTS is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_DEFLATE=m
+# CONFIG_CRYPTO_LZO is not set
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_CAMELLIA is not set
+CONFIG_CRYPTO_TEST=m
+# CONFIG_CRYPTO_AUTHENC is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-rp-2.6.24/htcuni.patch b/packages/linux/linux-rp-2.6.24/htcuni.patch
index f462650566..8448c4ec06 100644
--- a/packages/linux/linux-rp-2.6.24/htcuni.patch
+++ b/packages/linux/linux-rp-2.6.24/htcuni.patch
@@ -57,10 +57,10 @@
include/linux/soc/tmio_mmc.h | 17
56 files changed, 7469 insertions(+), 1 deletion(-)
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/Makefile
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/Makefile
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/Makefile 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/Makefile 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,19 @@
+#
+# Makefile for HTC Universal
@@ -81,10 +81,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/Makefile
+obj-$(CONFIG_HTCUNIVERSAL_UDC) += htcuniversal_udc.o
+
+obj-$(CONFIG_HTCUNIVERSAL_AK4641) += htcuniversal_ak4641.o
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,468 @@
+/*
+ * Hardware definitions for HTC Universal
@@ -554,10 +554,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal.c
+ .init_machine = htcuniversal_init,
+ .timer = &pxa_timer,
+MACHINE_END
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,917 @@
+/*
+ * Audio support for codec Asahi Kasei AK4641
@@ -1476,10 +1476,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.c
+MODULE_LICENSE("GPL");
+
+/* end {{ Module }} */
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,65 @@
+/*
+ * Audio support for codec Asahi Kasei AK4641
@@ -1546,10 +1546,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ak4641.h
+void snd_ak4641_hp_detected(struct snd_ak4641 *ak, int detected); /* atomic context */
+
+#endif /* __SOUND_AK4641_H */
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,143 @@
+/*
+ * LEDs support for the HP iPaq hx4700
@@ -1694,10 +1694,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_asic3_leds.c
+MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
+MODULE_DESCRIPTION("htcuniversal LEDs driver");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,61 @@
+/*
+ * Use consistent with the GNU GPL is permitted,
@@ -1760,10 +1760,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bl.c
+MODULE_AUTHOR("Paul Sokolovsky <pmiscml@gmail.com>");
+MODULE_DESCRIPTION("Backlight driver for HTC Universal");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,135 @@
+/* Bluetooth interface driver for TI BRF6150 on HX4700
+ *
@@ -1900,10 +1900,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.c
+
+/* vim600: set noexpandtab sw=8 ts=8 :*/
+
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,17 @@
+/*
+ * Bluetooth support file for calling bluetooth configuration functions
@@ -1922,10 +1922,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_bt.h
+
+
+#endif
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,87 @@
+/*
+ * Buttons driver for HTC Universal
@@ -2014,10 +2014,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_buttons.c
+MODULE_AUTHOR ("Joshua Wise, Pawel Kolodziejski, Paul Sokolosvky");
+MODULE_DESCRIPTION ("Buttons support for HTC Universal");
+MODULE_LICENSE ("GPL");
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,226 @@
+/* Core Hardware driver for Hx4700 (Serial, ASIC3, EGPIOs)
+ *
@@ -2245,10 +2245,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_core.c
+MODULE_LICENSE("GPL");
+
+/* vim600: set noexpandtab sw=8 ts=8 :*/
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,212 @@
+/*
+ * Use consistent with the GNU GPL is permitted,
@@ -2462,10 +2462,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_lcd.c
+MODULE_DESCRIPTION("Framebuffer driver for HTC Universal");
+MODULE_LICENSE("GPL");
+
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,167 @@
+
+/* Phone interface driver for Qualcomm MSM6250 on HTC Universal
@@ -2634,10 +2634,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.c
+MODULE_LICENSE("GPL");
+
+/* vim600: set noexpandtab sw=8 ts=8 :*/
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,16 @@
+/*
+ * Bluetooth support file for calling bluetooth configuration functions
@@ -2655,10 +2655,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_phone.h
+};
+
+#endif
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,69 @@
+/*
+ * MyPal 716 power management support for the original HTC IPL in DoC G3
@@ -2729,10 +2729,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_pm.c
+ pxa_pm_set_ll_ops(&htcuniversal_ll_pm_ops);
+}
+#endif /* CONFIG_PM */
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,97 @@
+/*
+ * pda_power driver for HTC Universal
@@ -2831,10 +2831,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_power2.c
+
+MODULE_DESCRIPTION("Power driver for HTC Universal");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,490 @@
+/* Touch screen driver for the TI something-or-other
+ *
@@ -3326,10 +3326,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_ts2.c
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Aric Blumer, SDG Systems, LLC");
+MODULE_DESCRIPTION("HTC Universal Touch Screen Driver");
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,71 @@
+
+/*
@@ -3402,10 +3402,10 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/htcuniversal_udc.c
+
+module_init(htcuniversal_udc_init);
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h
+Index: linux-2.6.24/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,20 @@
+/*
+ * temporary TSC2046 touchscreen hack
@@ -3427,13 +3427,13 @@ Index: linux-2.6.23/arch/arm/mach-pxa/htcuniversal/tsc2046_ts.h
+#define TSC2046_SAMPLE_Y 0x90
+
+#endif
-Index: linux-2.6.23/arch/arm/mach-pxa/Kconfig
+Index: linux-2.6.24/arch/arm/mach-pxa/Kconfig
===================================================================
---- linux-2.6.23.orig/arch/arm/mach-pxa/Kconfig 2008-01-20 18:59:41.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/Kconfig 2008-01-20 18:59:46.000000000 +0000
-@@ -92,6 +92,14 @@ config MACH_HX2750
- help
- This enables support for the HP iPAQ HX2750 handheld.
+--- linux-2.6.24.orig/arch/arm/mach-pxa/Kconfig 2008-03-10 16:08:01.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/Kconfig 2008-03-10 16:09:23.000000000 +0000
+@@ -92,6 +92,14 @@
+ bool "Sharp PXA270 models (SL-Cxx00)"
+ select PXA27x
+config MACH_HTCUNIVERSAL
+ bool "HTC Universal"
@@ -3446,7 +3446,7 @@ Index: linux-2.6.23/arch/arm/mach-pxa/Kconfig
endchoice
endif
-@@ -111,6 +119,86 @@ endchoice
+@@ -111,6 +119,86 @@
endif
@@ -3533,16 +3533,16 @@ Index: linux-2.6.23/arch/arm/mach-pxa/Kconfig
endmenu
config MACH_POODLE
-@@ -196,4 +284,3 @@ config PXA_KEYS
+@@ -196,4 +284,3 @@
depends on (PXA25x || PXA27x) && INPUT
endif
-
-Index: linux-2.6.23/arch/arm/mach-pxa/Makefile
+Index: linux-2.6.24/arch/arm/mach-pxa/Makefile
===================================================================
---- linux-2.6.23.orig/arch/arm/mach-pxa/Makefile 2008-01-20 18:59:41.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/Makefile 2008-01-20 18:59:46.000000000 +0000
-@@ -23,6 +23,7 @@ obj-$(CONFIG_MACH_POODLE) += poodle.o co
+--- linux-2.6.24.orig/arch/arm/mach-pxa/Makefile 2008-03-10 16:08:01.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/Makefile 2008-03-10 16:09:23.000000000 +0000
+@@ -23,6 +23,7 @@
obj-$(CONFIG_MACH_TOSA) += tosa.o
obj-$(CONFIG_MACH_EM_X270) += em-x270.o
obj-$(CONFIG_MACH_HX2750) += hx2750.o hx2750_test.o
@@ -3550,11 +3550,11 @@ Index: linux-2.6.23/arch/arm/mach-pxa/Makefile
ifeq ($(CONFIG_MACH_ZYLONITE),y)
obj-y += zylonite.o
-Index: linux-2.6.23/drivers/leds/Kconfig
+Index: linux-2.6.24/drivers/leds/Kconfig
===================================================================
---- linux-2.6.23.orig/drivers/leds/Kconfig 2008-01-20 18:59:17.000000000 +0000
-+++ linux-2.6.23/drivers/leds/Kconfig 2008-01-20 18:59:46.000000000 +0000
-@@ -114,6 +114,13 @@ config LEDS_CM_X270
+--- linux-2.6.24.orig/drivers/leds/Kconfig 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/leds/Kconfig 2008-03-10 16:09:23.000000000 +0000
+@@ -114,6 +114,13 @@
help
This option enables support for the CM-X270 LEDs.
@@ -3568,10 +3568,10 @@ Index: linux-2.6.23/drivers/leds/Kconfig
comment "LED Triggers"
config LEDS_TRIGGERS
-Index: linux-2.6.23/drivers/leds/leds-asic3.c
+Index: linux-2.6.24/drivers/leds/leds-asic3.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/drivers/leds/leds-asic3.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/drivers/leds/leds-asic3.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,189 @@
+/*
+ * LEDs support for HTC ASIC3 devices.
@@ -3762,11 +3762,11 @@ Index: linux-2.6.23/drivers/leds/leds-asic3.c
+MODULE_AUTHOR("Anton Vorontsov <cbou@mail.ru>");
+MODULE_DESCRIPTION("HTC ASIC3 LEDs driver");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23/drivers/mfd/Kconfig
+Index: linux-2.6.24/drivers/mfd/Kconfig
===================================================================
---- linux-2.6.23.orig/drivers/mfd/Kconfig 2008-01-20 18:59:38.000000000 +0000
-+++ linux-2.6.23/drivers/mfd/Kconfig 2008-01-20 18:59:46.000000000 +0000
-@@ -21,6 +21,16 @@ config MFD_TSC2101
+--- linux-2.6.24.orig/drivers/mfd/Kconfig 2008-03-10 16:07:51.000000000 +0000
++++ linux-2.6.24/drivers/mfd/Kconfig 2008-03-10 16:09:23.000000000 +0000
+@@ -21,6 +21,16 @@
help
Support for TI TSC2101 Touchscreen and Audio Codec
@@ -3783,10 +3783,10 @@ Index: linux-2.6.23/drivers/mfd/Kconfig
endmenu
menu "Multimedia Capabilities Port drivers"
-Index: linux-2.6.23/drivers/mfd/Makefile
+Index: linux-2.6.24/drivers/mfd/Makefile
===================================================================
---- linux-2.6.23.orig/drivers/mfd/Makefile 2008-01-20 18:59:38.000000000 +0000
-+++ linux-2.6.23/drivers/mfd/Makefile 2008-01-20 18:59:46.000000000 +0000
+--- linux-2.6.24.orig/drivers/mfd/Makefile 2008-03-10 16:07:51.000000000 +0000
++++ linux-2.6.24/drivers/mfd/Makefile 2008-03-10 16:09:23.000000000 +0000
@@ -2,6 +2,8 @@
# Makefile for multifunction miscellaneous devices
#
@@ -3796,10 +3796,10 @@ Index: linux-2.6.23/drivers/mfd/Makefile
obj-$(CONFIG_MFD_SM501) += sm501.o
obj-$(CONFIG_MCP) += mcp-core.o
-Index: linux-2.6.23/drivers/mfd/asic3_base.c
+Index: linux-2.6.24/drivers/mfd/asic3_base.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/drivers/mfd/asic3_base.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/drivers/mfd/asic3_base.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,1208 @@
+/*
+ * Driver interface to HTC "ASIC3"
@@ -5009,10 +5009,10 @@ Index: linux-2.6.23/drivers/mfd/asic3_base.c
+MODULE_AUTHOR("Phil Blundell <pb@handhelds.org>");
+MODULE_DESCRIPTION("Core driver for HTC ASIC3");
+MODULE_SUPPORTED_DEVICE("asic3");
-Index: linux-2.6.23/drivers/mfd/soc-core.c
+Index: linux-2.6.24/drivers/mfd/soc-core.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/drivers/mfd/soc-core.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/drivers/mfd/soc-core.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,106 @@
+/*
+ * drivers/soc/soc-core.c
@@ -5089,7 +5089,7 @@ Index: linux-2.6.23/drivers/mfd/soc-core.c
+ if (blk->res[r].flags & IORESOURCE_MEM) {
+ base = mem->start;
+ } else if ((blk->res[r].flags & IORESOURCE_IRQ) &&
-+ (blk->res[r].flags & IORESOURCE_IRQ_SOC_SUBDEVICE)) {
++ (blk->res[r].flags & IORESOURCE_IRQ_MFD_SUBDEVICE)) {
+ base = irq_base;
+ }
+
@@ -5120,10 +5120,10 @@ Index: linux-2.6.23/drivers/mfd/soc-core.c
+ return NULL;
+}
+EXPORT_SYMBOL_GPL(soc_add_devices);
-Index: linux-2.6.23/drivers/mfd/soc-core.h
+Index: linux-2.6.24/drivers/mfd/soc-core.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/drivers/mfd/soc-core.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/drivers/mfd/soc-core.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,30 @@
+/*
+ * drivers/soc/soc-core.h
@@ -5155,10 +5155,10 @@ Index: linux-2.6.23/drivers/mfd/soc-core.h
+
+void soc_free_devices(struct platform_device *devices, int nr_devs);
+
-Index: linux-2.6.23/include/asm-arm/arch-pxa/clock.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/clock.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/clock.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/clock.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,27 @@
+/*
+ * linux/include/asm-arm/arch-pxa/clock.h
@@ -5187,10 +5187,10 @@ Index: linux-2.6.23/include/asm-arm/arch-pxa/clock.h
+
+extern int clk_register(struct clk *clk);
+extern void clk_unregister(struct clk *clk);
-Index: linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-asic.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-asic.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-asic.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-asic.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,213 @@
+/*
+ * include/asm/arm/arch-pxa/htcuniversal-asic.h
@@ -5405,10 +5405,10 @@ Index: linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-asic.h
+
+#endif /* _HTCUNIVERSAL_ASIC_H_ */
+
-Index: linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-gpio.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-gpio.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-gpio.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-gpio.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,220 @@
+/*
+ * include/asm-arm/arch-pxa/htcuniversal-gpio.h
@@ -5630,10 +5630,10 @@ Index: linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-gpio.h
+#define GPIO_NR_HTCUNIVERSAL_I2C_SDA_MD (118 | GPIO_ALT_FN_1_OUT)
+
+#endif /* _HTCUNIVERSAL_GPIO_H */
-Index: linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-init.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-init.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-init.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal-init.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,14 @@
+/*
+ * include/asm/arm/arch-pxa/htcuniversal-init.h
@@ -5649,18 +5649,18 @@ Index: linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal-init.h
+
+#endif /* _HTCUNIVERSAL_INIT_H_ */
+
-Index: linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/htcuniversal.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/htcuniversal.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,3 @@
+#include <asm/arch/irqs.h>
+
+#define HTCUNIVERSAL_ASIC3_IRQ_BASE IRQ_BOARD_START
-Index: linux-2.6.23/include/asm-arm/arch-pxa/pxa-pm_ll.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/pxa-pm_ll.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/pxa-pm_ll.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/pxa-pm_ll.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,6 @@
+struct pxa_ll_pm_ops {
+ void (*suspend)(unsigned long);
@@ -5668,10 +5668,10 @@ Index: linux-2.6.23/include/asm-arm/arch-pxa/pxa-pm_ll.h
+};
+
+extern struct pxa_ll_pm_ops *pxa_pm_set_ll_ops(struct pxa_ll_pm_ops *new_ops);
-Index: linux-2.6.23/include/asm-arm/hardware/asic3_keys.h
+Index: linux-2.6.24/include/asm-arm/hardware/asic3_keys.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/hardware/asic3_keys.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/hardware/asic3_keys.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,18 @@
+#include <linux/input.h>
+
@@ -5691,10 +5691,10 @@ Index: linux-2.6.23/include/asm-arm/hardware/asic3_keys.h
+ struct input_dev *input;
+ struct device *asic3_dev;
+};
-Index: linux-2.6.23/include/asm-arm/hardware/asic3_leds.h
+Index: linux-2.6.24/include/asm-arm/hardware/asic3_leds.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/hardware/asic3_leds.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/hardware/asic3_leds.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,34 @@
+/*
+ * LEDs support for HTC ASIC3 devices.
@@ -5730,10 +5730,10 @@ Index: linux-2.6.23/include/asm-arm/hardware/asic3_leds.h
+extern int asic3_leds_register(void);
+extern void asic3_leds_unregister(void);
+
-Index: linux-2.6.23/include/asm-arm/hardware/ipaq-asic3.h
+Index: linux-2.6.24/include/asm-arm/hardware/ipaq-asic3.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/hardware/ipaq-asic3.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/hardware/ipaq-asic3.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,602 @@
+/*
+ *
@@ -6337,10 +6337,10 @@ Index: linux-2.6.23/include/asm-arm/hardware/ipaq-asic3.h
+#define IPAQ_ASIC3_MAP_SIZE 0x2000
+
+#endif
-Index: linux-2.6.23/include/linux/gpiodev.h
+Index: linux-2.6.24/include/linux/gpiodev.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/linux/gpiodev.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/linux/gpiodev.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,44 @@
+#ifndef __GPIODEV_H
+#define __GPIODEV_H
@@ -6386,10 +6386,10 @@ Index: linux-2.6.23/include/linux/gpiodev.h
+}
+
+#endif /* __GPIODEV_H */
-Index: linux-2.6.23/include/linux/input_pda.h
+Index: linux-2.6.24/include/linux/input_pda.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/linux/input_pda.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/linux/input_pda.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,47 @@
+#ifndef _INPUT_PDA_H
+#define _INPUT_PDA_H
@@ -6438,10 +6438,10 @@ Index: linux-2.6.23/include/linux/input_pda.h
+#define _KEY_HOMEPAGE _KEY_APP4
+
+#endif
-Index: linux-2.6.23/include/linux/soc/asic3_base.h
+Index: linux-2.6.24/include/linux/soc/asic3_base.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/linux/soc/asic3_base.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/linux/soc/asic3_base.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,104 @@
+#include <asm/types.h>
+#include <linux/gpiodev.h>
@@ -6547,10 +6547,10 @@ Index: linux-2.6.23/include/linux/soc/asic3_base.h
+
+ struct tmio_mmc_hwconfig *tmio_mmc_hwconfig;
+};
-Index: linux-2.6.23/include/linux/soc/tmio_mmc.h
+Index: linux-2.6.24/include/linux/soc/tmio_mmc.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/linux/soc/tmio_mmc.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/linux/soc/tmio_mmc.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,17 @@
+#include <linux/platform_device.h>
+
@@ -6569,10 +6569,10 @@ Index: linux-2.6.23/include/linux/soc/tmio_mmc.h
+ int (*mmc_get_ro)(struct platform_device *pdev);
+ short address_shift;
+};
-Index: linux-2.6.23/include/asm-arm/arch-pxa/pxa-regs.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/pxa-regs.h
===================================================================
---- linux-2.6.23.orig/include/asm-arm/arch-pxa/pxa-regs.h 2008-01-20 18:59:40.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/pxa-regs.h 2008-01-20 18:59:46.000000000 +0000
+--- linux-2.6.24.orig/include/asm-arm/arch-pxa/pxa-regs.h 2008-03-10 16:07:59.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/pxa-regs.h 2008-03-10 16:09:23.000000000 +0000
@@ -2058,6 +2058,8 @@
#define LDCMD_SOFINT (1 << 22)
#define LDCMD_EOFINT (1 << 21)
@@ -6582,25 +6582,11 @@ Index: linux-2.6.23/include/asm-arm/arch-pxa/pxa-regs.h
#define LCCR5_SOFM1 (1<<0) /* Start Of Frame Mask for Overlay 1 (channel 1) */
#define LCCR5_SOFM2 (1<<1) /* Start Of Frame Mask for Overlay 2 (channel 2) */
-Index: linux-2.6.23/drivers/mmc/host/Kconfig
-===================================================================
---- linux-2.6.23.orig/drivers/mmc/host/Kconfig 2008-01-20 18:59:18.000000000 +0000
-+++ linux-2.6.23/drivers/mmc/host/Kconfig 2008-01-20 18:59:46.000000000 +0000
-@@ -130,3 +130,9 @@ config MMC_SPI
-
- If unsure, or if your system has no SPI master driver, say N.
-
-+config MMC_ASIC3
-+ tristate "HTC ASIC3 SD/MMC support"
-+ depends on MMC && HTC_ASIC3
-+ help
-+ This provides support for the ASIC3 SD/MMC controller, used
-+ in the iPAQ hx4700 and others.
-Index: linux-2.6.23/drivers/mmc/host/Makefile
+Index: linux-2.6.24/drivers/mmc/host/Makefile
===================================================================
---- linux-2.6.23.orig/drivers/mmc/host/Makefile 2008-01-20 18:59:18.000000000 +0000
-+++ linux-2.6.23/drivers/mmc/host/Makefile 2008-01-20 21:12:10.000000000 +0000
-@@ -13,6 +13,7 @@ obj-$(CONFIG_MMC_SDHCI) += sdhci.o
+--- linux-2.6.24.orig/drivers/mmc/host/Makefile 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/mmc/host/Makefile 2008-03-10 16:09:23.000000000 +0000
+@@ -13,6 +13,7 @@
obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o
obj-$(CONFIG_MMC_WBSD) += wbsd.o
obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
@@ -6608,10 +6594,10 @@ Index: linux-2.6.23/drivers/mmc/host/Makefile
obj-$(CONFIG_MMC_OMAP) += omap.o
obj-$(CONFIG_MMC_AT91) += at91_mci.o
obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
-Index: linux-2.6.23/drivers/mmc/host/asic3_mmc.c
+Index: linux-2.6.24/drivers/mmc/host/asic3_mmc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/drivers/mmc/host/asic3_mmc.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/drivers/mmc/host/asic3_mmc.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,900 @@
+/* Note that this driver can likely be merged into the tmio driver, so
+ * consider this code temporary. It works, though.
@@ -7513,10 +7499,10 @@ Index: linux-2.6.23/drivers/mmc/host/asic3_mmc.c
+MODULE_AUTHOR("Aric Blumer, SDG Systems, LLC");
+MODULE_LICENSE("GPL");
+
-Index: linux-2.6.23/drivers/mmc/host/asic3_mmc.h
+Index: linux-2.6.24/drivers/mmc/host/asic3_mmc.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/drivers/mmc/host/asic3_mmc.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/drivers/mmc/host/asic3_mmc.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,25 @@
+#ifndef __ASIC3_MMC_H
+#define __ASIC3_MMC_H
@@ -7543,22 +7529,10 @@ Index: linux-2.6.23/drivers/mmc/host/asic3_mmc.h
+#define DONT_CARE_BUFFER_BITS ( SD_CTRL_INTMASKBUFFER_UNK7 | SD_CTRL_INTMASKBUFFER_CMD_BUSY )
+
+#endif // __ASIC3_MMC_H
-Index: linux-2.6.23/drivers/input/keyboard/Makefile
-===================================================================
---- linux-2.6.23.orig/drivers/input/keyboard/Makefile 2008-01-20 18:59:16.000000000 +0000
-+++ linux-2.6.23/drivers/input/keyboard/Makefile 2008-01-20 21:11:40.000000000 +0000
-@@ -15,6 +15,7 @@ obj-$(CONFIG_KEYBOARD_NEWTON) += newton
- obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
- obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
- obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
-+obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
- obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
- obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
- obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
-Index: linux-2.6.23/drivers/input/keyboard/asic3_keys.c
+Index: linux-2.6.24/drivers/input/keyboard/asic3_keys.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/drivers/input/keyboard/asic3_keys.c 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/asic3_keys.c 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,131 @@
+/*
+ * Generic buttons driver for ASIC3 SoC.
@@ -7691,10 +7665,10 @@ Index: linux-2.6.23/drivers/input/keyboard/asic3_keys.c
+MODULE_AUTHOR("Joshua Wise, Pawel Kolodziejski, Paul Sokolovsky");
+MODULE_DESCRIPTION("Buttons driver for HTC ASIC3 SoC");
+MODULE_LICENSE("GPL");
-Index: linux-2.6.23/include/asm-arm/arch-pxa/irqs.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/irqs.h
===================================================================
---- linux-2.6.23.orig/include/asm-arm/arch-pxa/irqs.h 2008-01-20 18:59:28.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/irqs.h 2008-01-20 18:59:46.000000000 +0000
+--- linux-2.6.24.orig/include/asm-arm/arch-pxa/irqs.h 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/irqs.h 2008-03-10 16:09:23.000000000 +0000
@@ -182,6 +182,8 @@
defined(CONFIG_MACH_LOGICPD_PXA270) || \
defined(CONFIG_MACH_MAINSTONE)
@@ -7704,22 +7678,10 @@ Index: linux-2.6.23/include/asm-arm/arch-pxa/irqs.h
#else
#define NR_IRQS (IRQ_BOARD_START)
#endif
-Index: linux-2.6.23/include/linux/ioport.h
-===================================================================
---- linux-2.6.23.orig/include/linux/ioport.h 2008-01-20 18:59:31.000000000 +0000
-+++ linux-2.6.23/include/linux/ioport.h 2008-01-20 18:59:46.000000000 +0000
-@@ -56,6 +56,7 @@ struct resource_list {
- #define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
- #define IORESOURCE_IRQ_LOWLEVEL (1<<3)
- #define IORESOURCE_IRQ_SHAREABLE (1<<4)
-+#define IORESOURCE_IRQ_SOC_SUBDEVICE (1<<5)
-
- /* ISA PnP DMA specific bits (IORESOURCE_BITS) */
- #define IORESOURCE_DMA_TYPE_MASK (3<<0)
-Index: linux-2.6.23/include/asm-arm/arch-pxa/serial.h
+Index: linux-2.6.24/include/asm-arm/arch-pxa/serial.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.23/include/asm-arm/arch-pxa/serial.h 2008-01-20 18:59:46.000000000 +0000
++++ linux-2.6.24/include/asm-arm/arch-pxa/serial.h 2008-03-10 16:09:23.000000000 +0000
@@ -0,0 +1,78 @@
+/*
+ * linux/include/asm-arm/arch-pxa/serial.h
@@ -7799,10 +7761,10 @@ Index: linux-2.6.23/include/asm-arm/arch-pxa/serial.h
+void pxa_set_btuart_info(struct platform_pxa_serial_funcs *btuart_funcs);
+void pxa_set_stuart_info(struct platform_pxa_serial_funcs *stuart_funcs);
+void pxa_set_hwuart_info(struct platform_pxa_serial_funcs *hwuart_funcs);
-Index: linux-2.6.23/drivers/serial/pxa.c
+Index: linux-2.6.24/drivers/serial/pxa.c
===================================================================
---- linux-2.6.23.orig/drivers/serial/pxa.c 2008-01-20 18:59:23.000000000 +0000
-+++ linux-2.6.23/drivers/serial/pxa.c 2008-01-20 18:59:46.000000000 +0000
+--- linux-2.6.24.orig/drivers/serial/pxa.c 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/serial/pxa.c 2008-03-10 16:09:23.000000000 +0000
@@ -47,6 +47,7 @@
#include <asm/io.h>
#include <asm/hardware.h>
@@ -7811,7 +7773,7 @@ Index: linux-2.6.23/drivers/serial/pxa.c
#include <asm/arch/pxa-regs.h>
-@@ -60,6 +61,14 @@ struct uart_pxa_port {
+@@ -60,6 +61,14 @@
char *name;
};
@@ -7826,7 +7788,7 @@ Index: linux-2.6.23/drivers/serial/pxa.c
static inline unsigned int serial_in(struct uart_pxa_port *up, int offset)
{
offset <<= 2;
-@@ -347,6 +356,9 @@ static int serial_pxa_startup(struct uar
+@@ -347,6 +356,9 @@
unsigned long flags;
int retval;
@@ -7836,7 +7798,7 @@ Index: linux-2.6.23/drivers/serial/pxa.c
if (port->line == 3) /* HWUART */
up->mcr |= UART_MCR_AFE;
else
-@@ -404,6 +416,12 @@ static int serial_pxa_startup(struct uar
+@@ -404,6 +416,12 @@
(void) serial_in(up, UART_IIR);
(void) serial_in(up, UART_MSR);
@@ -7849,7 +7811,7 @@ Index: linux-2.6.23/drivers/serial/pxa.c
return 0;
}
-@@ -412,6 +430,8 @@ static void serial_pxa_shutdown(struct u
+@@ -412,6 +430,8 @@
struct uart_pxa_port *up = (struct uart_pxa_port *)port;
unsigned long flags;
@@ -7858,7 +7820,7 @@ Index: linux-2.6.23/drivers/serial/pxa.c
free_irq(up->port.irq, up);
/*
-@@ -433,6 +453,8 @@ static void serial_pxa_shutdown(struct u
+@@ -433,6 +453,8 @@
UART_FCR_CLEAR_RCVR |
UART_FCR_CLEAR_XMIT);
serial_out(up, UART_FCR, 0);
@@ -7867,10 +7829,10 @@ Index: linux-2.6.23/drivers/serial/pxa.c
}
static void
-Index: linux-2.6.23/arch/arm/mach-pxa/generic.c
+Index: linux-2.6.24/arch/arm/mach-pxa/generic.c
===================================================================
---- linux-2.6.23.orig/arch/arm/mach-pxa/generic.c 2008-01-20 18:59:09.000000000 +0000
-+++ linux-2.6.23/arch/arm/mach-pxa/generic.c 2008-01-20 18:59:46.000000000 +0000
+--- linux-2.6.24.orig/arch/arm/mach-pxa/generic.c 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/generic.c 2008-03-10 16:09:23.000000000 +0000
@@ -38,6 +38,7 @@
#include <asm/arch/mmc.h>
#include <asm/arch/irda.h>
@@ -7879,7 +7841,7 @@ Index: linux-2.6.23/arch/arm/mach-pxa/generic.c
#include "devices.h"
#include "generic.h"
-@@ -412,6 +413,18 @@ struct platform_device pxa_device_hwuart
+@@ -412,6 +413,18 @@
.num_resources = ARRAY_SIZE(pxa_resource_hwuart),
};
@@ -7898,11 +7860,11 @@ Index: linux-2.6.23/arch/arm/mach-pxa/generic.c
static struct resource pxai2c_resources[] = {
{
.start = 0x40301680,
-Index: linux-2.6.23/drivers/leds/Makefile
+Index: linux-2.6.24/drivers/leds/Makefile
===================================================================
---- linux-2.6.23.orig/drivers/leds/Makefile 2008-01-20 18:59:17.000000000 +0000
-+++ linux-2.6.23/drivers/leds/Makefile 2008-01-20 21:10:45.000000000 +0000
-@@ -15,6 +15,7 @@ obj-$(CONFIG_LEDS_AMS_DELTA) += leds-am
+--- linux-2.6.24.orig/drivers/leds/Makefile 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/leds/Makefile 2008-03-10 16:09:23.000000000 +0000
+@@ -15,6 +15,7 @@
obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o
obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
@@ -7910,11 +7872,11 @@ Index: linux-2.6.23/drivers/leds/Makefile
obj-$(CONFIG_LEDS_COBALT_QUBE) += leds-cobalt-qube.o
obj-$(CONFIG_LEDS_COBALT_RAQ) += leds-cobalt-raq.o
obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
-Index: linux-2.6.23/drivers/input/keyboard/Kconfig
+Index: linux-2.6.24/drivers/input/keyboard/Kconfig
===================================================================
---- linux-2.6.23.orig/drivers/input/keyboard/Kconfig 2008-01-20 18:59:16.000000000 +0000
-+++ linux-2.6.23/drivers/input/keyboard/Kconfig 2008-01-20 18:59:46.000000000 +0000
-@@ -293,4 +293,11 @@ config KEYBOARD_BFIN
+--- linux-2.6.24.orig/drivers/input/keyboard/Kconfig 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/Kconfig 2008-03-10 16:09:23.000000000 +0000
+@@ -293,4 +293,11 @@
To compile this driver as a module, choose M here: the
module will be called bf54x-keys.
@@ -7926,3 +7888,33 @@ Index: linux-2.6.23/drivers/input/keyboard/Kconfig
+ HTC ASIC3 peripheral controller.
+
endif
+Index: linux-2.6.24/drivers/mmc/host/Kconfig
+===================================================================
+--- linux-2.6.24.orig/drivers/mmc/host/Kconfig 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/mmc/host/Kconfig 2008-03-10 16:09:59.000000000 +0000
+@@ -24,6 +24,13 @@
+
+ If unsure, say N.
+
++config MMC_ASIC3
++ tristate "HTC ASIC3 SD/MMC support"
++ depends on MMC && HTC_ASIC3
++ help
++ This provides support for the ASIC3 SD/MMC controller, used
++ in the iPAQ hx4700 and others.
++
+ config MMC_SDHCI
+ tristate "Secure Digital Host Controller Interface support (EXPERIMENTAL)"
+ depends on PCI && EXPERIMENTAL
+Index: linux-2.6.24/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.24.orig/drivers/input/keyboard/Makefile 2008-01-24 22:58:37.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/Makefile 2008-03-10 16:10:28.000000000 +0000
+@@ -6,6 +6,7 @@
+
+ obj-$(CONFIG_KEYBOARD_ATKBD) += atkbd.o
+ obj-$(CONFIG_KEYBOARD_SUNKBD) += sunkbd.o
++obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
+ obj-$(CONFIG_KEYBOARD_LKKBD) += lkkbd.o
+ obj-$(CONFIG_KEYBOARD_XTKBD) += xtkbd.o
+ obj-$(CONFIG_KEYBOARD_AMIGA) += amikbd.o
diff --git a/packages/linux/linux-rp-2.6.24/sharpsl-rc-r1.patch b/packages/linux/linux-rp-2.6.24/sharpsl-rc-r1.patch
index 453010a197..32a94c7cea 100644
--- a/packages/linux/linux-rp-2.6.24/sharpsl-rc-r1.patch
+++ b/packages/linux/linux-rp-2.6.24/sharpsl-rc-r1.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.24/arch/arm/mach-pxa/spitz.c
===================================================================
---- linux-2.6.24.orig/arch/arm/mach-pxa/spitz.c 2008-01-27 02:10:17.000000000 +0000
-+++ linux-2.6.24/arch/arm/mach-pxa/spitz.c 2008-01-27 02:10:52.000000000 +0000
+--- linux-2.6.24.orig/arch/arm/mach-pxa/spitz.c 2008-03-10 17:05:37.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/spitz.c 2008-03-10 17:05:55.000000000 +0000
@@ -259,6 +259,13 @@
.id = -1,
};
@@ -26,8 +26,8 @@ Index: linux-2.6.24/arch/arm/mach-pxa/spitz.c
&spitzled_device,
Index: linux-2.6.24/drivers/input/keyboard/Kconfig
===================================================================
---- linux-2.6.24.orig/drivers/input/keyboard/Kconfig 2008-01-27 02:10:20.000000000 +0000
-+++ linux-2.6.24/drivers/input/keyboard/Kconfig 2008-01-27 02:10:52.000000000 +0000
+--- linux-2.6.24.orig/drivers/input/keyboard/Kconfig 2008-03-10 17:05:40.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/Kconfig 2008-03-10 17:05:55.000000000 +0000
@@ -154,6 +154,17 @@
To compile this driver as a module, choose M here: the
module will be called spitzkbd.
@@ -48,20 +48,18 @@ Index: linux-2.6.24/drivers/input/keyboard/Kconfig
depends on AMIGA
Index: linux-2.6.24/drivers/input/keyboard/Makefile
===================================================================
---- linux-2.6.24.orig/drivers/input/keyboard/Makefile 2008-01-27 02:10:20.000000000 +0000
-+++ linux-2.6.24/drivers/input/keyboard/Makefile 2008-01-27 02:11:43.000000000 +0000
-@@ -15,6 +15,7 @@
- obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
- obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
- obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
+--- linux-2.6.24.orig/drivers/input/keyboard/Makefile 2008-03-10 17:05:40.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/Makefile 2008-03-10 17:06:17.000000000 +0000
+@@ -26,3 +26,5 @@
+ obj-$(CONFIG_KEYBOARD_HP7XX) += jornada720_kbd.o
+ obj-$(CONFIG_KEYBOARD_MAPLE) += maple_keyb.o
+ obj-$(CONFIG_KEYBOARD_BFIN) += bf54x-keys.o
+obj-$(CONFIG_SHARPSL_RC) += sharpsl_rc.o
- obj-$(CONFIG_KEYBOARD_ASIC3) += asic3_keys.o
- obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
- obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
++
Index: linux-2.6.24/drivers/input/keyboard/sharpsl_rc.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.24/drivers/input/keyboard/sharpsl_rc.c 2008-01-27 02:10:52.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/sharpsl_rc.c 2008-03-10 17:05:55.000000000 +0000
@@ -0,0 +1,291 @@
+/*
+ * Keyboard driver for Sharp Clamshell Models (SL-Cxx00)
@@ -357,7 +355,7 @@ Index: linux-2.6.24/drivers/input/keyboard/sharpsl_rc.c
Index: linux-2.6.24/drivers/input/keyboard/spitzkbd.c
===================================================================
--- linux-2.6.24.orig/drivers/input/keyboard/spitzkbd.c 2008-01-24 22:58:37.000000000 +0000
-+++ linux-2.6.24/drivers/input/keyboard/spitzkbd.c 2008-01-27 02:10:52.000000000 +0000
++++ linux-2.6.24/drivers/input/keyboard/spitzkbd.c 2008-03-10 17:05:55.000000000 +0000
@@ -19,6 +19,7 @@
#include <linux/jiffies.h>
#include <linux/module.h>
@@ -440,8 +438,8 @@ Index: linux-2.6.24/drivers/input/keyboard/spitzkbd.c
del_timer_sync(&spitzkbd->htimer);
Index: linux-2.6.24/arch/arm/mach-pxa/sharpsl.h
===================================================================
---- linux-2.6.24.orig/arch/arm/mach-pxa/sharpsl.h 2008-01-27 02:10:15.000000000 +0000
-+++ linux-2.6.24/arch/arm/mach-pxa/sharpsl.h 2008-01-27 02:10:52.000000000 +0000
+--- linux-2.6.24.orig/arch/arm/mach-pxa/sharpsl.h 2008-03-10 17:05:35.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/sharpsl.h 2008-03-10 17:05:55.000000000 +0000
@@ -37,15 +37,10 @@
*/
#define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
@@ -462,7 +460,7 @@ Index: linux-2.6.24/arch/arm/mach-pxa/sharpsl.h
Index: linux-2.6.24/arch/arm/mach-pxa/sharpsl_pm.c
===================================================================
--- linux-2.6.24.orig/arch/arm/mach-pxa/sharpsl_pm.c 2008-01-24 22:58:37.000000000 +0000
-+++ linux-2.6.24/arch/arm/mach-pxa/sharpsl_pm.c 2008-01-27 02:10:52.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/sharpsl_pm.c 2008-03-10 17:05:55.000000000 +0000
@@ -135,6 +135,8 @@
| MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
}
@@ -475,7 +473,7 @@ Index: linux-2.6.24/arch/arm/mach-pxa/sharpsl_pm.c
Index: linux-2.6.24/include/asm-arm/hardware/sharpsl_pm.h
===================================================================
--- linux-2.6.24.orig/include/asm-arm/hardware/sharpsl_pm.h 2008-01-24 22:58:37.000000000 +0000
-+++ linux-2.6.24/include/asm-arm/hardware/sharpsl_pm.h 2008-01-27 02:10:52.000000000 +0000
++++ linux-2.6.24/include/asm-arm/hardware/sharpsl_pm.h 2008-03-10 17:05:55.000000000 +0000
@@ -104,3 +104,10 @@
irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id);
irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id);
@@ -490,7 +488,7 @@ Index: linux-2.6.24/include/asm-arm/hardware/sharpsl_pm.h
Index: linux-2.6.24/include/linux/input.h
===================================================================
--- linux-2.6.24.orig/include/linux/input.h 2008-01-24 22:58:37.000000000 +0000
-+++ linux-2.6.24/include/linux/input.h 2008-01-27 02:10:52.000000000 +0000
++++ linux-2.6.24/include/linux/input.h 2008-03-10 17:05:55.000000000 +0000
@@ -636,6 +636,7 @@
#define SW_TABLET_MODE 0x01 /* set = tablet mode */
#define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
@@ -501,8 +499,8 @@ Index: linux-2.6.24/include/linux/input.h
Index: linux-2.6.24/arch/arm/mach-pxa/spitz_pm.c
===================================================================
---- linux-2.6.24.orig/arch/arm/mach-pxa/spitz_pm.c 2008-01-24 22:58:37.000000000 +0000
-+++ linux-2.6.24/arch/arm/mach-pxa/spitz_pm.c 2008-01-27 02:10:52.000000000 +0000
+--- linux-2.6.24.orig/arch/arm/mach-pxa/spitz_pm.c 2008-03-10 17:05:40.000000000 +0000
++++ linux-2.6.24/arch/arm/mach-pxa/spitz_pm.c 2008-03-10 17:05:55.000000000 +0000
@@ -162,6 +162,13 @@
if (resume_on_alarm && (PEDR & PWER_RTC))
is_resume |= PWER_RTC;
diff --git a/packages/linux/linux-rp-2.6.24/tosa/.mtn2git_empty b/packages/linux/linux-rp-2.6.24/tosa/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/.mtn2git_empty
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch b/packages/linux/linux-rp-2.6.24/tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch
new file mode 100644
index 0000000000..ba79b4a470
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch
@@ -0,0 +1,201 @@
+From d48a09b301d9a460d5ce027433e8cb8872e7b5c3 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Fri, 4 Jan 2008 18:26:38 +0000
+Subject: [PATCH 01/64] Allow runtime registration of regions of memory that require dma bouncing.
+
+---
+ arch/arm/common/Kconfig | 4 ++
+ arch/arm/common/dmabounce.c | 82 ++++++++++++++++++++++++++++++++++++-
+ arch/arm/common/sa1111.c | 2 +-
+ arch/arm/mach-ixp4xx/Kconfig | 1 +
+ arch/arm/mach-ixp4xx/common-pci.c | 2 +-
+ 5 files changed, 87 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
+index 3e07346..5f357fb 100644
+--- a/arch/arm/common/Kconfig
++++ b/arch/arm/common/Kconfig
+@@ -13,10 +13,14 @@ config ICST307
+ config SA1111
+ bool
+ select DMABOUNCE
++ select PLATFORM_DMABOUNCE
+
+ config DMABOUNCE
+ bool
+
++config PLATFORM_DMABOUNCE
++ bool
++
+ config TIMER_ACORN
+ bool
+
+diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c
+index 52fc6a8..ed80abe 100644
+--- a/arch/arm/common/dmabounce.c
++++ b/arch/arm/common/dmabounce.c
+@@ -16,6 +16,7 @@
+ *
+ * Copyright (C) 2002 Hewlett Packard Company.
+ * Copyright (C) 2004 MontaVista Software, Inc.
++ * Copyright (C) 2007 Dmitry Baryshkov <dbaryshkov@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+@@ -24,6 +25,7 @@
+
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/rwsem.h>
+ #include <linux/slab.h>
+ #include <linux/device.h>
+ #include <linux/dma-mapping.h>
+@@ -80,6 +82,80 @@ struct dmabounce_device_info {
+ rwlock_t lock;
+ };
+
++struct dmabounce_check_entry {
++ struct list_head list;
++ dmabounce_check checker;
++ void *data;
++};
++
++static struct list_head checkers = LIST_HEAD_INIT(checkers);
++static rwlock_t checkers_lock = RW_LOCK_UNLOCKED;
++
++int
++dmabounce_register_checker(dmabounce_check function, void *data)
++{
++ unsigned long flags;
++ struct dmabounce_check_entry *entry =
++ kzalloc(sizeof(struct dmabounce_check_entry), GFP_ATOMIC);
++
++ if (!entry)
++ return ENOMEM;
++
++ INIT_LIST_HEAD(&entry->list);
++ entry->checker = function;
++ entry->data = data;
++
++ write_lock_irqsave(&checkers_lock, flags);
++ list_add(&entry->list, &checkers);
++ write_unlock_irqrestore(&checkers_lock, flags);
++
++ return 0;
++}
++
++void
++dmabounce_remove_checker(dmabounce_check function, void *data)
++{
++ unsigned long flags;
++ struct list_head *pos;
++
++ write_lock_irqsave(&checkers_lock, flags);
++ __list_for_each(pos, &checkers) {
++ struct dmabounce_check_entry *entry = container_of(pos,
++ struct dmabounce_check_entry, list);
++ if (entry->checker == function && entry->data == data) {
++ list_del(pos);
++ write_unlock_irqrestore(&checkers_lock, flags);
++ kfree(entry);
++ return;
++ }
++ }
++
++ write_unlock_irqrestore(&checkers_lock, flags);
++ printk(KERN_WARNING "dmabounce checker not found: %p\n", function);
++}
++
++static int dma_needs_bounce(struct device *dev, dma_addr_t dma, size_t size)
++{
++ unsigned long flags;
++ struct list_head *pos;
++
++ read_lock_irqsave(&checkers_lock, flags);
++ __list_for_each(pos, &checkers) {
++ struct dmabounce_check_entry *entry = container_of(pos,
++ struct dmabounce_check_entry, list);
++ if (entry->checker(dev, dma, size, entry->data)) {
++ read_unlock_irqrestore(&checkers_lock, flags);
++ return 1;
++ }
++ }
++
++ read_unlock_irqrestore(&checkers_lock, flags);
++#ifdef CONFIG_PLATFORM_DMABOUNCE
++ return platform_dma_needs_bounce(dev, dma, size);
++#else
++ return 0;
++#endif
++}
+ #ifdef STATS
+ static ssize_t dmabounce_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+@@ -239,7 +315,7 @@ map_single(struct device *dev, void *ptr, size_t size,
+ struct safe_buffer *buf;
+
+ buf = alloc_safe_buffer(device_info, ptr, size, dir);
+- if (buf == 0) {
++ if (buf == NULL) {
+ dev_err(dev, "%s: unable to map unsafe buffer %p!\n",
+ __func__, ptr);
+ return 0;
+@@ -643,7 +719,6 @@ dmabounce_unregister_dev(struct device *dev)
+ dev->bus_id, dev->bus->name);
+ }
+
+-
+ EXPORT_SYMBOL(dma_map_single);
+ EXPORT_SYMBOL(dma_unmap_single);
+ EXPORT_SYMBOL(dma_map_sg);
+@@ -653,6 +728,9 @@ EXPORT_SYMBOL(dma_sync_single_for_device);
+ EXPORT_SYMBOL(dma_sync_sg);
+ EXPORT_SYMBOL(dmabounce_register_dev);
+ EXPORT_SYMBOL(dmabounce_unregister_dev);
++EXPORT_SYMBOL(dmabounce_register_checker);
++EXPORT_SYMBOL(dmabounce_remove_checker);
++
+
+ MODULE_AUTHOR("Christopher Hoover <ch@hpl.hp.com>, Deepak Saxena <dsaxena@plexity.net>");
+ MODULE_DESCRIPTION("Special dma_{map/unmap/dma_sync}_* routines for systems with limited DMA windows");
+diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
+index eb06d0b..3b8fbdd 100644
+--- a/arch/arm/common/sa1111.c
++++ b/arch/arm/common/sa1111.c
+@@ -778,7 +778,7 @@ static void __sa1111_remove(struct sa1111 *sachip)
+ * This should only get called for sa1111_device types due to the
+ * way we configure our device dma_masks.
+ */
+-int dma_needs_bounce(struct device *dev, dma_addr_t addr, size_t size)
++int platform_dma_needs_bounce(struct device *dev, dma_addr_t addr, size_t size)
+ {
+ /*
+ * Section 4.6 of the "Intel StrongARM SA-1111 Development Module
+diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig
+index 61b2dfc..5870371 100644
+--- a/arch/arm/mach-ixp4xx/Kconfig
++++ b/arch/arm/mach-ixp4xx/Kconfig
+@@ -161,6 +161,7 @@ comment "IXP4xx Options"
+ config DMABOUNCE
+ bool
+ default y
++ select PLATFORM_DMABOUNCE
+ depends on PCI
+
+ config IXP4XX_INDIRECT_PCI
+diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
+index bf04121..ac46492 100644
+--- a/arch/arm/mach-ixp4xx/common-pci.c
++++ b/arch/arm/mach-ixp4xx/common-pci.c
+@@ -336,7 +336,7 @@ static int ixp4xx_pci_platform_notify_remove(struct device *dev)
+ return 0;
+ }
+
+-int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
++int platform_dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
+ {
+ return (dev->bus == &pci_bus_type ) && ((dma_addr + size) >= SZ_64M);
+ }
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch b/packages/linux/linux-rp-2.6.24/tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch
new file mode 100644
index 0000000000..a562ef921b
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch
@@ -0,0 +1,260 @@
+From 8e95f90487d2fb46fd862744ddb34f47c30b0c5a Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Fri, 4 Jan 2008 18:27:50 +0000
+Subject: [PATCH 02/64] Modify dma_alloc_coherent on ARM so that it supports device local DMA.
+
+---
+ arch/arm/mm/consistent.c | 125 +++++++++++++++++++++++++++++++++++++++++
+ include/asm-arm/dma-mapping.h | 37 +++++++------
+ 2 files changed, 145 insertions(+), 17 deletions(-)
+
+diff --git a/arch/arm/mm/consistent.c b/arch/arm/mm/consistent.c
+index 333a82a..3da0f94 100644
+--- a/arch/arm/mm/consistent.c
++++ b/arch/arm/mm/consistent.c
+@@ -3,6 +3,8 @@
+ *
+ * Copyright (C) 2000-2004 Russell King
+ *
++ * Device local coherent memory support added by Ian Molton (spyro@f2s.com)
++ *
+ * 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.
+@@ -20,6 +22,7 @@
+
+ #include <asm/memory.h>
+ #include <asm/cacheflush.h>
++#include <asm/io.h>
+ #include <asm/tlbflush.h>
+ #include <asm/sizes.h>
+
+@@ -35,6 +38,13 @@
+ #define CONSISTENT_PTE_INDEX(x) (((unsigned long)(x) - CONSISTENT_BASE) >> PGDIR_SHIFT)
+ #define NUM_CONSISTENT_PTES (CONSISTENT_DMA_SIZE >> PGDIR_SHIFT)
+
++struct dma_coherent_mem {
++ void *virt_base;
++ u32 device_base;
++ int size;
++ int flags;
++ unsigned long *bitmap;
++};
+
+ /*
+ * These are the page tables (2MB each) covering uncached, DMA consistent allocations
+@@ -153,6 +163,13 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
+ unsigned long order;
+ u64 mask = ISA_DMA_THRESHOLD, limit;
+
++ /* Following is a work-around (a.k.a. hack) to prevent pages
++ * with __GFP_COMP being passed to split_page() which cannot
++ * handle them. The real problem is that this flag probably
++ * should be 0 on ARM as it is not supported on this
++ * platform--see CONFIG_HUGETLB_PAGE. */
++ gfp &= ~(__GFP_COMP);
++
+ if (!consistent_pte[0]) {
+ printk(KERN_ERR "%s: not initialised\n", __func__);
+ dump_stack();
+@@ -160,6 +177,26 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
+ }
+
+ if (dev) {
++
++ if (dev->dma_mem) {
++ unsigned long flags;
++ int pgnum;
++ void *ret;
++
++ spin_lock_irqsave(&consistent_lock, flags);
++ pgnum = bitmap_find_free_region(dev->dma_mem->bitmap,
++ dev->dma_mem->size,
++ get_order(size));
++ spin_unlock_irqrestore(&consistent_lock, flags);
++
++ if (pgnum >= 0) {
++ *handle = dev->dma_mem->device_base + (pgnum << PAGE_SHIFT);
++ ret = dev->dma_mem->virt_base + (pgnum << PAGE_SHIFT);
++ memset(ret, 0, size);
++ return ret;
++ }
++ }
++
+ mask = dev->coherent_dma_mask;
+
+ /*
+@@ -177,6 +214,9 @@ __dma_alloc(struct device *dev, size_t size, dma_addr_t *handle, gfp_t gfp,
+ mask, (unsigned long long)ISA_DMA_THRESHOLD);
+ goto no_page;
+ }
++
++ if (dev->dma_mem && dev->dma_mem->flags & DMA_MEMORY_EXCLUSIVE)
++ return NULL;
+ }
+
+ /*
+@@ -359,6 +399,8 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr
+ pte_t *ptep;
+ int idx;
+ u32 off;
++ struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
++ unsigned long order;
+
+ WARN_ON(irqs_disabled());
+
+@@ -368,6 +410,15 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr
+ }
+
+ size = PAGE_ALIGN(size);
++ order = get_order(size);
++
++ /* What if mem is valid and the range is not? */
++ if (mem && cpu_addr >= mem->virt_base && cpu_addr < (mem->virt_base + (mem->size << PAGE_SHIFT))) {
++ int page = (cpu_addr - mem->virt_base) >> PAGE_SHIFT;
++
++ bitmap_release_region(mem->bitmap, page, order);
++ return;
++ }
+
+ spin_lock_irqsave(&consistent_lock, flags);
+ c = vm_region_find(&consistent_head, (unsigned long)cpu_addr);
+@@ -437,6 +488,80 @@ void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_addr
+ }
+ EXPORT_SYMBOL(dma_free_coherent);
+
++int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
++ dma_addr_t device_addr, size_t size, int flags)
++{
++ void __iomem *mem_base;
++ int pages = size >> PAGE_SHIFT;
++ int bitmap_size = (pages + 31)/32;
++
++ if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
++ goto out;
++ if (!size)
++ goto out;
++ if (dev->dma_mem)
++ goto out;
++
++ /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
++ mem_base = ioremap_nocache(bus_addr, size);
++ if (!mem_base)
++ goto out;
++
++ dev->dma_mem = kzalloc(sizeof(struct dma_coherent_mem), GFP_KERNEL);
++ if (!dev->dma_mem)
++ goto out;
++ memset(dev->dma_mem, 0, sizeof(struct dma_coherent_mem));
++ dev->dma_mem->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
++ if (!dev->dma_mem->bitmap)
++ goto free1_out;
++
++ dev->dma_mem->virt_base = mem_base;
++ dev->dma_mem->device_base = device_addr;
++ dev->dma_mem->size = pages;
++ dev->dma_mem->flags = flags;
++
++ if (flags & DMA_MEMORY_MAP)
++ return DMA_MEMORY_MAP;
++
++ return DMA_MEMORY_IO;
++
++ free1_out:
++ kfree(dev->dma_mem->bitmap);
++ out:
++ return 0;
++}
++EXPORT_SYMBOL(dma_declare_coherent_memory);
++
++void dma_release_declared_memory(struct device *dev)
++{
++ struct dma_coherent_mem *mem = dev->dma_mem;
++
++ if (!mem)
++ return;
++ dev->dma_mem = NULL;
++ kfree(mem->bitmap);
++ kfree(mem);
++}
++EXPORT_SYMBOL(dma_release_declared_memory);
++
++void *dma_mark_declared_memory_occupied(struct device *dev,
++ dma_addr_t device_addr, size_t size)
++{
++ struct dma_coherent_mem *mem = dev->dma_mem;
++ int pages = (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
++ int pos, err;
++
++ if (!mem)
++ return ERR_PTR(-EINVAL);
++
++ pos = (device_addr - mem->device_base) >> PAGE_SHIFT;
++ err = bitmap_allocate_region(mem->bitmap, pos, get_order(pages));
++ if (err != 0)
++ return ERR_PTR(err);
++ return mem->virt_base + (pos << PAGE_SHIFT);
++}
++EXPORT_SYMBOL(dma_mark_declared_memory_occupied);
++
+ /*
+ * Initialise the consistent memory allocation.
+ */
+diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
+index e99406a..f18ba05 100644
+--- a/include/asm-arm/dma-mapping.h
++++ b/include/asm-arm/dma-mapping.h
+@@ -7,6 +7,19 @@
+
+ #include <linux/scatterlist.h>
+
++#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
++extern int
++dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
++ dma_addr_t device_addr, size_t size, int flags);
++
++extern void
++dma_release_declared_memory(struct device *dev);
++
++extern void *
++dma_mark_declared_memory_occupied(struct device *dev,
++ dma_addr_t device_addr, size_t size);
++
++
+ /*
+ * DMA-consistent mapping functions. These allocate/free a region of
+ * uncached, unwrite-buffered mapped memory space for use with DMA
+@@ -433,23 +446,13 @@ extern int dmabounce_register_dev(struct device *, unsigned long, unsigned long)
+ */
+ extern void dmabounce_unregister_dev(struct device *);
+
+-/**
+- * dma_needs_bounce
+- *
+- * @dev: valid struct device pointer
+- * @dma_handle: dma_handle of unbounced buffer
+- * @size: size of region being mapped
+- *
+- * Platforms that utilize the dmabounce mechanism must implement
+- * this function.
+- *
+- * The dmabounce routines call this function whenever a dma-mapping
+- * is requested to determine whether a given buffer needs to be bounced
+- * or not. The function must return 0 if the buffer is OK for
+- * DMA access and 1 if the buffer needs to be bounced.
+- *
+- */
+-extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
++typedef int (*dmabounce_check)(struct device *dev, dma_addr_t dma, size_t size, void *data);
++extern int dmabounce_register_checker(dmabounce_check, void *data);
++extern void dmabounce_remove_checker(dmabounce_check, void *data);
++#ifdef CONFIG_PLATFORM_DMABOUNCE
++extern int platform_dma_needs_bounce(struct device *dev, dma_addr_t dma, size_t size, void *data);
++#endif
++
+ #endif /* CONFIG_DMABOUNCE */
+
+ #endif /* __KERNEL__ */
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0003-Core-MFD-support.patch b/packages/linux/linux-rp-2.6.24/tosa/0003-Core-MFD-support.patch
new file mode 100644
index 0000000000..d84a4f7835
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0003-Core-MFD-support.patch
@@ -0,0 +1,243 @@
+From a07910753f9965842b6647f0561db125b538f5ed Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Fri, 4 Jan 2008 18:32:44 +0000
+Subject: [PATCH 03/64] Core MFD support
+
+This patch provides a common subdevice registration system for MFD type
+chips, using platfrom device.
+
+It also provides a new resource type for IRQs such that a subdevices IRQ may
+be computed based on the MFD cores IRQ handler, since many MFDs provide an IRQ
+multiplex.
+---
+ drivers/mfd/Kconfig | 4 ++
+ drivers/mfd/Makefile | 2 +
+ drivers/mfd/mfd-core.c | 116 ++++++++++++++++++++++++++++++++++++++++++++++
+ include/linux/ioport.h | 1 +
+ include/linux/mfd-core.h | 51 ++++++++++++++++++++
+ 5 files changed, 174 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/mfd-core.c
+ create mode 100644 include/linux/mfd-core.h
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 2571619..1205c89 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -5,6 +5,10 @@
+ menu "Multifunction device drivers"
+ depends on HAS_IOMEM
+
++config MFD_CORE
++ tristate
++ default n
++
+ config MFD_SM501
+ tristate "Support for Silicon Motion SM501"
+ ---help---
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index 5143209..6c20064 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -4,6 +4,8 @@
+
+ obj-$(CONFIG_MFD_SM501) += sm501.o
+
++obj-$(CONFIG_MFD_CORE) += mfd-core.o
++
+ obj-$(CONFIG_MCP) += mcp-core.o
+ obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
+ obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o
+diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
+new file mode 100644
+index 0000000..88874e1
+--- /dev/null
++++ b/drivers/mfd/mfd-core.c
+@@ -0,0 +1,116 @@
++/*
++ * drivers/mfd/mfd-core.c
++ *
++ * core MFD support
++ * Copyright (c) 2006 Ian Molton
++ * Copyright (c) 2007 Dmitry Baryshkov
++ *
++ * 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.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/platform_device.h>
++#include <linux/mfd-core.h>
++
++#define SIGNED_SHIFT(val, shift) ((shift) >= 0 ? \
++ ((val) << (shift)) : \
++ ((val) >> -(shift)))
++
++int mfd_add_devices(
++ struct platform_device *parent,
++ const struct mfd_cell *cells, int n_devs,
++ struct resource *mem,
++ int relative_addr_shift,
++ int irq_base)
++{
++ int i;
++
++ for (i = 0; i < n_devs; i++) {
++ struct resource *res = NULL;
++ const struct mfd_cell *cell = cells + i;
++ struct platform_device *pdev;
++ int ret = -ENOMEM;
++ int r;
++
++ pdev = platform_device_alloc(cell->name, -1);
++ if (!pdev)
++ goto fail_alloc;
++
++ pdev->dev.uevent_suppress = 0;
++ pdev->dev.parent = &parent->dev;
++
++ ret = platform_device_add_data(pdev, &cell, sizeof(struct mfd_cell *));
++ if (ret)
++ goto fail_device;
++
++ res = kzalloc(cell->num_resources * sizeof(struct resource),
++ GFP_KERNEL);
++ if (!res)
++ goto fail_device;
++
++ for (r = 0; r < cell->num_resources; r++) {
++ res[r].name = cell->resources[r].name;
++
++ /* Find out base to use */
++ if (cell->resources[r].flags & IORESOURCE_MEM) {
++ res[r].parent = mem;
++ res[r].start = mem->start +
++ SIGNED_SHIFT(cell->resources[r].start,
++ relative_addr_shift);
++ res[r].end = mem->start +
++ SIGNED_SHIFT(cell->resources[r].end,
++ relative_addr_shift);
++ } else if ((cell->resources[r].flags & IORESOURCE_IRQ) &&
++ (cell->resources[r].flags & IORESOURCE_IRQ_MFD_SUBDEVICE)) {
++ res[r].start = irq_base +
++ cell->resources[r].start;
++ res[r].end = irq_base +
++ cell->resources[r].end;
++ } else {
++ res[r].start = cell->resources[r].start;
++ res[r].end = cell->resources[r].end;
++ }
++
++ res[r].flags = cell->resources[r].flags;
++ }
++
++ ret = platform_device_add_resources(pdev,
++ res,
++ cell->num_resources);
++ kfree(res);
++
++ if (ret)
++ goto fail_device;
++
++ ret = platform_device_add(pdev);
++
++ if (ret) {
++ platform_device_del(pdev);
++fail_device:
++ platform_device_put(pdev);
++fail_alloc:
++ mfd_remove_devices(parent);
++ return ret;
++ }
++ }
++ return 0;
++}
++EXPORT_SYMBOL(mfd_add_devices);
++
++static int mfd_remove_devices_fn(struct device *dev, void *unused)
++{
++ platform_device_unregister(container_of(dev, struct platform_device, dev));
++ return 0;
++}
++
++void mfd_remove_devices(struct platform_device *parent)
++{
++ device_for_each_child(&parent->dev, NULL, mfd_remove_devices_fn);
++}
++EXPORT_SYMBOL(mfd_remove_devices);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Ian Molton, Dmitry Baryshkov");
+diff --git a/include/linux/ioport.h b/include/linux/ioport.h
+index 6187a85..0348c71 100644
+--- a/include/linux/ioport.h
++++ b/include/linux/ioport.h
+@@ -56,6 +56,7 @@ struct resource_list {
+ #define IORESOURCE_IRQ_HIGHLEVEL (1<<2)
+ #define IORESOURCE_IRQ_LOWLEVEL (1<<3)
+ #define IORESOURCE_IRQ_SHAREABLE (1<<4)
++#define IORESOURCE_IRQ_MFD_SUBDEVICE (1<<5)
+
+ /* ISA PnP DMA specific bits (IORESOURCE_BITS) */
+ #define IORESOURCE_DMA_TYPE_MASK (3<<0)
+diff --git a/include/linux/mfd-core.h b/include/linux/mfd-core.h
+new file mode 100644
+index 0000000..0e9de78
+--- /dev/null
++++ b/include/linux/mfd-core.h
+@@ -0,0 +1,51 @@
++#ifndef MFD_CORE_H
++#define MFD_CORE_H
++/*
++ * drivers/mfd/mfd-core.h
++ *
++ * core MFD support
++ * Copyright (c) 2006 Ian Molton
++ * Copyright (c) 2007 Dmitry Baryshkov
++ *
++ * 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.
++ *
++ */
++
++#include <linux/platform_device.h>
++
++struct mfd_cell {
++ const char *name;
++
++ int (*enable)(struct platform_device *dev);
++ int (*disable)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++
++ void *driver_data; /* data passed to drivers */
++
++ /*
++ * This resources can be specified relatievly to the parent device.
++ * For accessing device you should use resources from device
++ */
++ int num_resources;
++ const struct resource *resources;
++};
++
++static inline __maybe_unused struct mfd_cell *
++mfd_get_cell(struct platform_device *pdev)
++{
++ return *((struct mfd_cell **)(pdev->dev.platform_data));
++}
++
++extern int mfd_add_devices(
++ struct platform_device *parent,
++ const struct mfd_cell *cells, int n_devs,
++ struct resource *mem,
++ int relative_addr_shift,
++ int irq_base);
++
++extern void mfd_remove_devices(struct platform_device *parent);
++
++#endif
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0004-Add-support-for-tc6393xb-MFD-core.patch b/packages/linux/linux-rp-2.6.24/tosa/0004-Add-support-for-tc6393xb-MFD-core.patch
new file mode 100644
index 0000000000..a78c0f37f3
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0004-Add-support-for-tc6393xb-MFD-core.patch
@@ -0,0 +1,907 @@
+From 3f56cac281fb407b7d8e574d18ee7d72aa7e7c28 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:02:30 +0000
+Subject: [PATCH 04/64] Add support for tc6393xb MFD core
+
+---
+ drivers/mfd/Kconfig | 6 +
+ drivers/mfd/Makefile | 2 +
+ drivers/mfd/tc6393xb.c | 740 ++++++++++++++++++++++++++++++++++++++++++
+ include/linux/mfd/tc6393xb.h | 108 ++++++
+ 4 files changed, 856 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/tc6393xb.c
+ create mode 100644 include/linux/mfd/tc6393xb.h
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 1205c89..9903d0a 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -9,6 +9,12 @@ config MFD_CORE
+ tristate
+ default n
+
++config MFD_TC6393XB
++ bool "Support Toshiba TC6393XB"
++ select MFD_CORE
++ help
++ Support for Toshiba Mobile IO Controller TC6393XB
++
+ config MFD_SM501
+ tristate "Support for Silicon Motion SM501"
+ ---help---
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index 6c20064..ffd342e 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -6,6 +6,8 @@ obj-$(CONFIG_MFD_SM501) += sm501.o
+
+ obj-$(CONFIG_MFD_CORE) += mfd-core.o
+
++obj-$(CONFIG_MFD_TC6393XB) += tc6393xb.o
++
+ obj-$(CONFIG_MCP) += mcp-core.o
+ obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
+ obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+new file mode 100644
+index 0000000..9439f39
+--- /dev/null
++++ b/drivers/mfd/tc6393xb.c
+@@ -0,0 +1,740 @@
++/*
++ * Toshiba TC6393XB SoC support
++ *
++ * Copyright(c) 2005-2006 Chris Humbert
++ * Copyright(c) 2005 Dirk Opfer
++ * Copyright(c) 2005 Ian Molton <spyro@f2s.com>
++ * Copyright(c) 2007 Dmitry Baryshkov
++ *
++ * Based on code written by Sharp/Lineo for 2.4 kernels
++ * Based on locomo.c
++ *
++ * 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.
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/io.h>
++#include <linux/irq.h>
++#include <linux/platform_device.h>
++#include <linux/fb.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/mfd/tc6393xb.h>
++
++struct tc6393xb_scr {
++ u8 x00[8];
++ u8 revid; /* 0x08 Revision ID */
++ u8 x01[0x47];
++ u8 isr; /* 0x50 Interrupt Status */
++ u8 x02;
++ u8 imr; /* 0x52 Interrupt Mask */
++ u8 x03;
++ u8 irr; /* 0x54 Interrupt Routing */
++ u8 x04[0x0b];
++ u16 gper; /* 0x60 GP Enable */
++ u8 x05[2];
++ u16 gpi_sr[2]; /* 0x64 GPI Status */
++ u16 gpi_imr[2]; /* 0x68 GPI INT Mask */
++ u16 gpi_eder[2]; /* 0x6c GPI Edge Detect Enable */
++ u16 gpi_lir[4]; /* 0x70 GPI Level Invert */
++ u16 gpo_dsr[2]; /* 0x78 GPO Data Set */
++ u16 gpo_doecr[2]; /* 0x7c GPO Data OE Control */
++ u16 gp_iarcr[2]; /* 0x80 GP Internal Active Reg Control */
++ u16 gp_iarlcr[2]; /* 0x84 GP Internal Active Reg Level Con*/
++ u8 gpi_bcr[4]; /* 0x88 GPI Buffer Control */
++ u16 gpa_iarcr; /* 0x8c GPa Internal Active Reg Control */
++ u8 x06[2];
++ u16 gpa_iarlcr; /* 0x90 GPa Internal Active Reg Level Co*/
++ u8 x07[2];
++ u16 gpa_bcr; /* 0x94 GPa Buffer Control */
++ u8 x08[2];
++ u16 ccr; /* 0x98 Clock Control */
++ u16 pll2cr; /* 0x9a PLL2 Control */
++ u16 pll1cr[2]; /* 0x9c PLL1 Control */
++ u8 diarcr; /* 0xa0 Device Internal Active Reg Contr*/
++ u8 dbocr; /* 0xa1 Device Buffer Off Control */
++ u8 x09[0x3e];
++ u8 fer; /* 0xe0 Function Enable */
++ u8 x10[3];
++ u16 mcr; /* 0xe4 Mode Control */
++ u8 x11[0x14];
++ u8 config; /* 0xfc Configuration Control */
++ u8 x12[2];
++ u8 debug; /* 0xff Debug */
++} __attribute__ ((packed));
++
++/*--------------------------------------------------------------------------*/
++
++struct tc6393xb {
++ struct tc6393xb_scr __iomem *scr;
++
++ spinlock_t lock; /* protects RMW cycles */
++
++ struct {
++ union tc6393xb_scr_fer fer;
++ union tc6393xb_scr_ccr ccr;
++ u8 gpi_bcr[4];
++ } suspend_state;
++
++ struct resource rscr;
++ struct resource *iomem;
++ int irq;
++};
++
++/*--------------------------------------------------------------------------*/
++
++static int tc6393xb_mmc_enable(struct platform_device *mmc) {
++ struct platform_device *dev = to_platform_device(mmc->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.ck32ken = 1;
++ iowrite16(ccr.raw, &scr->ccr);
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_mmc_disable(struct platform_device *mmc) {
++ struct platform_device *dev = to_platform_device(mmc->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.ck32ken = 0;
++ iowrite16(ccr.raw, &scr->ccr);
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
++static int tc6393xb_nand_disable(struct platform_device *nand)
++{
++ return 0;
++}
++
++static int tc6393xb_nand_enable(struct platform_device *nand)
++{
++ struct platform_device *dev = to_platform_device(nand->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ /* SMD buffer on */
++ dev_dbg(&dev->dev, "SMD buffer on\n");
++ iowrite8(0xff, scr->gpi_bcr + 1);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++int tc6393xb_lcd_set_power(struct platform_device *fb, bool on)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_fer fer;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ fer.raw = ioread8(&scr->fer);
++ fer.bits.slcden = on ? 1 : 0;
++ iowrite8(fer.raw, &scr->fer);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++EXPORT_SYMBOL(tc6393xb_lcd_set_power);
++
++int tc6393xb_lcd_mode(struct platform_device *fb_dev,
++ struct fb_videomode *mode) {
++ struct tc6393xb *tc6393xb =
++ platform_get_drvdata(to_platform_device(fb_dev->dev.parent));
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++
++ iowrite16(mode->pixclock, scr->pll1cr + 0);
++ iowrite16(mode->pixclock >> 16, scr->pll1cr + 1);
++
++ return 0;
++}
++EXPORT_SYMBOL(tc6393xb_lcd_mode);
++
++static int tc6393xb_ohci_disable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ union tc6393xb_scr_fer fer;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ fer.raw = ioread8(&scr->fer);
++ fer.bits.usben = 0;
++ iowrite8(fer.raw, &scr->fer);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.usbcken = 0;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_ohci_enable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ union tc6393xb_scr_fer fer;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.usbcken = 1;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ fer.raw = ioread8(&scr->fer);
++ fer.bits.usben = 1;
++ iowrite8(fer.raw, &scr->fer);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_fb_disable(struct platform_device *fb)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ union tc6393xb_scr_fer fer;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ /*
++ * FIXME: is this correct or it should be moved to other _disable?
++ */
++ fer.raw = ioread8(&scr->fer);
++ fer.bits.slcden = 0;
++/* fer.bits.lcdcven = 0; */
++ iowrite8(fer.raw, &scr->fer);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.mclksel = disable;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_fb_enable(struct platform_device *fb)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.mclksel = m48MHz;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_fb_suspend(struct platform_device *fb)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.mclksel = disable;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_fb_resume(struct platform_device *fb)
++{
++ struct platform_device *dev = to_platform_device(fb->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.mclksel = m48MHz;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static struct resource tc6393xb_mmc_resources[] = {
++ {
++ .name = TMIO_MMC_CONTROL,
++ .start = 0x800,
++ .end = 0x9ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_CONFIG,
++ .start = 0x200,
++ .end = 0x2ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_IRQ,
++ .start = IRQ_TC6393_MMC,
++ .end = IRQ_TC6393_MMC,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource tc6393xb_nand_resources[] = {
++ {
++ .name = TMIO_NAND_CONFIG,
++ .start = 0x0100,
++ .end = 0x01ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_NAND_CONTROL,
++ .start = 0x1000,
++ .end = 0x1007,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_NAND_IRQ,
++ .start = IRQ_TC6393_NAND,
++ .end = IRQ_TC6393_NAND,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource tc6393xb_ohci_resources[] = {
++ {
++ .name = TMIO_OHCI_CONFIG,
++ .start = 0x0300,
++ .end = 0x03ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_CONTROL,
++ .start = 0x3000,
++ .end = 0x31ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_SRAM,
++ .start = 0x010000,
++ .end = 0x017fff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_SRAM_ALIAS,
++ .start = 0x018000,
++ .end = 0x01ffff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_IRQ,
++ .start = IRQ_TC6393_OHCI,
++ .end = IRQ_TC6393_OHCI,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource tc6393xb_fb_resources[] = {
++ {
++ .name = TMIO_FB_CONFIG,
++ .start = 0x0500,
++ .end = 0x05ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_FB_CONTROL,
++ .start = 0x5000,
++ .end = 0x51ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_FB_VRAM,
++ .start = 0x100000,
++ .end = 0x1fffff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_FB_IRQ,
++ .start = IRQ_TC6393_FB,
++ .end = IRQ_TC6393_FB,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++static struct mfd_cell tc6393xb_cells[] = {
++ {
++ .name = "tmio-nand",
++ .enable = tc6393xb_nand_enable,
++ .disable = tc6393xb_nand_disable,
++ .num_resources = ARRAY_SIZE(tc6393xb_nand_resources),
++ .resources = tc6393xb_nand_resources,
++ },
++ {
++ .name = "tmio-ohci",
++ .enable = tc6393xb_ohci_enable,
++ .disable = tc6393xb_ohci_disable,
++ .num_resources = ARRAY_SIZE(tc6393xb_ohci_resources),
++ .resources = tc6393xb_ohci_resources,
++ },
++ {
++ .name = "tmio-fb",
++ .enable = tc6393xb_fb_enable,
++ .disable = tc6393xb_fb_disable,
++ .suspend = tc6393xb_fb_suspend,
++ .resume = tc6393xb_fb_resume,
++ .num_resources = ARRAY_SIZE(tc6393xb_fb_resources),
++ .resources = tc6393xb_fb_resources,
++ },
++ {
++ .name = "tmio-mmc",
++ .enable = tc6393xb_mmc_enable,
++ .disable = tc6393xb_mmc_disable,
++ .num_resources = ARRAY_SIZE(tc6393xb_mmc_resources),
++ .resources = tc6393xb_mmc_resources,
++ },
++};
++
++/*--------------------------------------------------------------------------*/
++
++static void
++tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned int isr;
++ unsigned int i;
++
++ desc->chip->ack(irq);
++
++ while ((isr = ioread8(&scr->isr) & ~ioread8(&scr->imr)))
++ for (i = 0; i < TC6393XB_NR_IRQS; i++) {
++ if (isr & (1 << i))
++ desc_handle_irq(tcpd->irq_base + i,
++ irq_desc + tcpd->irq_base + i);
++ }
++}
++
++static void tc6393xb_irq_ack(unsigned int irq)
++{
++}
++
++static void tc6393xb_irq_mask(unsigned int irq)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++ iowrite8(ioread8(&scr->imr) | (1 << (irq - tcpd->irq_base)),
++ &scr->imr);
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++}
++
++static void tc6393xb_irq_unmask(unsigned int irq)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++ iowrite8(ioread8(&scr->imr) & ~(1 << (irq - tcpd->irq_base)),
++ &scr->imr);
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++}
++
++static struct irq_chip tc6393xb_chip = {
++ .name = "tc6393xb",
++ .ack = tc6393xb_irq_ack,
++ .mask = tc6393xb_irq_mask,
++ .unmask = tc6393xb_irq_unmask,
++};
++
++static void tc6393xb_attach_irq(struct platform_device *dev)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ unsigned int irq;
++
++ for (
++ irq = tcpd->irq_base;
++ irq <= tcpd->irq_base + TC6393XB_NR_IRQS;
++ irq++) {
++ set_irq_chip(irq, &tc6393xb_chip);
++ set_irq_chip_data(irq, dev);
++ set_irq_handler(irq, handle_edge_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ }
++
++ set_irq_type(tc6393xb->irq, IRQT_FALLING);
++ set_irq_chip_data(tc6393xb->irq, dev);
++ set_irq_chained_handler(tc6393xb->irq, tc6393xb_irq);
++}
++
++static void tc6393xb_detach_irq(struct platform_device *dev)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ unsigned int irq;
++
++ set_irq_chained_handler(tc6393xb->irq, NULL);
++ set_irq_chip_data(tc6393xb->irq, NULL);
++
++ for (
++ irq = tcpd->irq_base;
++ irq <= tcpd->irq_base + TC6393XB_NR_IRQS;
++ irq++) {
++ set_irq_flags(irq, 0);
++ set_irq_chip(irq, NULL);
++ set_irq_chip_data(irq, NULL);
++ }
++}
++
++static int tc6393xb_hw_init(struct platform_device *dev, int resume)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ int ret;
++ int i;
++
++ if (resume)
++ ret = tcpd->resume(dev);
++ else
++ ret = tcpd->enable(dev);
++ if (ret)
++ return ret;
++
++ iowrite8(resume ?
++ tc6393xb->suspend_state.fer.raw :
++ 0, &scr->fer);
++ iowrite16(tcpd->scr_pll2cr, &scr->pll2cr);
++ iowrite16(resume?
++ tc6393xb->suspend_state.ccr.raw :
++ tcpd->scr_ccr.raw, &scr->ccr);
++ iowrite16(tcpd->scr_mcr.raw, &scr->mcr);
++ iowrite16(tcpd->scr_gper, &scr->gper);
++ iowrite8(0, &scr->irr);
++ iowrite8(0xbf, &scr->imr);
++ iowrite16(tcpd->scr_gpo_dsr, scr->gpo_dsr + 0);
++ iowrite16(tcpd->scr_gpo_dsr >> 16, scr->gpo_dsr + 1);
++ iowrite16(tcpd->scr_gpo_doecr, scr->gpo_doecr + 0);
++ iowrite16(tcpd->scr_gpo_doecr >> 16, scr->gpo_doecr + 1);
++
++ if (resume)
++ for (i = 0; i < 4; i++)
++ iowrite8(tc6393xb->suspend_state.gpi_bcr[i],
++ scr->gpi_bcr + i);
++
++ return 0;
++}
++
++static int __devinit tc6393xb_probe(struct platform_device *dev)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb;
++ struct resource *iomem;
++ struct resource *rscr;
++ int retval;
++
++ iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
++ if (!iomem)
++ return -EINVAL;
++
++ tc6393xb = kzalloc(sizeof *tc6393xb, GFP_KERNEL);
++ if (!tc6393xb) {
++ retval = -ENOMEM;
++ goto err_kzalloc;
++ }
++
++ spin_lock_init(&tc6393xb->lock);
++
++ platform_set_drvdata(dev, tc6393xb);
++ tc6393xb->iomem = iomem;
++ tc6393xb->irq = platform_get_irq(dev, 0);
++
++ rscr = &tc6393xb->rscr;
++ rscr->name = "tc6393xb-core";
++ rscr->start = iomem->start;
++ rscr->end = iomem->start + 0xff;
++ rscr->flags = IORESOURCE_MEM;
++
++ retval = request_resource(iomem, rscr);
++ if (retval)
++ goto err_request_scr;
++
++ tc6393xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
++ if (!tc6393xb->scr) {
++ retval = -ENOMEM;
++ goto err_ioremap;
++ }
++
++ retval = tc6393xb_hw_init(dev, 0);
++ if (retval)
++ goto err_hw_init;
++
++ printk(KERN_INFO "Toshiba tc6393xb revision %d at 0x%08lx, irq %d\n",
++ ioread8(&tc6393xb->scr->revid),
++ (unsigned long) iomem->start, tc6393xb->irq);
++
++ if (tc6393xb->irq)
++ tc6393xb_attach_irq(dev);
++
++ tc6393xb_cells[0].driver_data = tcpd->nand_data;
++ tc6393xb_cells[1].driver_data = NULL; /* tcpd->ohci_data; */
++ tc6393xb_cells[2].driver_data = tcpd->fb_data;
++
++ retval = mfd_add_devices(dev,
++ tc6393xb_cells, ARRAY_SIZE(tc6393xb_cells),
++ iomem, 0, tcpd->irq_base);
++
++ if (retval == 0)
++ return 0;
++
++ if (tc6393xb->irq)
++ tc6393xb_detach_irq(dev);
++
++err_hw_init:
++ iounmap(tc6393xb->scr);
++err_ioremap:
++ release_resource(rscr);
++err_request_scr:
++ kfree(tc6393xb);
++err_kzalloc:
++ release_resource(iomem);
++ return retval;
++}
++
++static int __devexit tc6393xb_remove(struct platform_device *dev) {
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ int ret;
++
++ if (tc6393xb->irq)
++ tc6393xb_detach_irq(dev);
++
++ ret = tcpd->disable(dev);
++
++ iounmap(tc6393xb->scr);
++ release_resource(&tc6393xb->rscr);
++ release_resource(tc6393xb->iomem);
++
++ mfd_remove_devices(dev);
++
++ platform_set_drvdata(dev, NULL);
++
++ kfree(tc6393xb);
++
++ return ret;
++}
++
++#ifdef CONFIG_PM
++static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ int i;
++
++
++ tc6393xb->suspend_state.ccr.raw = ioread16(&scr->ccr);
++ tc6393xb->suspend_state.fer.raw = ioread8(&scr->fer);
++ for (i = 0; i < 4; i++)
++ tc6393xb->suspend_state.gpi_bcr[i] =
++ ioread8(scr->gpi_bcr + i);
++
++ return tcpd->suspend(dev);
++}
++
++static int tc6393xb_resume(struct platform_device *dev)
++{
++ return tc6393xb_hw_init(dev, 1);
++}
++#else
++#define tc6393xb_suspend NULL
++#define tc6393xb_resume NULL
++#endif
++
++static struct platform_driver tc6393xb_driver = {
++ .probe = tc6393xb_probe,
++ .remove = __devexit_p(tc6393xb_remove),
++ .suspend = tc6393xb_suspend,
++ .resume = tc6393xb_resume,
++
++ .driver = {
++ .name = "tc6393xb",
++ .owner = THIS_MODULE,
++ },
++};
++
++static int __init tc6393xb_init(void)
++{
++ return platform_driver_register(&tc6393xb_driver);
++}
++
++static void __exit tc6393xb_exit(void)
++{
++ platform_driver_unregister(&tc6393xb_driver);
++}
++
++module_init(tc6393xb_init);
++module_exit(tc6393xb_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Ian Molton, Dmitry Baryshkov and Dirk Opfer");
++MODULE_DESCRIPTION("tc6393xb Toshiba Mobile IO Controller");
+diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
+new file mode 100644
+index 0000000..e699294
+--- /dev/null
++++ b/include/linux/mfd/tc6393xb.h
+@@ -0,0 +1,108 @@
++/*
++ * Toshiba TC6393XB SoC support
++ *
++ * Copyright(c) 2005-2006 Chris Humbert
++ * Copyright(c) 2005 Dirk Opfer
++ * Copyright(c) 2005 Ian Molton <spyro@f2s.com>
++ * Copyright(c) 2007 Dmitry Baryshkov
++ *
++ * Based on code written by Sharp/Lineo for 2.4 kernels
++ * Based on locomo.c
++ *
++ * 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 TC6393XB_H
++#define TC6393XB_H
++
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++
++union tc6393xb_scr_fer {
++ u8 raw;
++struct {
++ unsigned usben:1; /* D0 USB enable */
++ unsigned lcdcven:1; /* D1 polysylicon TFT enable */
++ unsigned slcden:1; /* D2 SLCD enable */
++} __attribute__ ((packed)) bits;
++} __attribute__ ((packed));
++
++union tc6393xb_scr_ccr {
++ u16 raw;
++struct {
++ unsigned ck32ken:1; /* D0 SD host clock enable */
++ unsigned usbcken:1; /* D1 USB host clock enable */
++ unsigned x00:2;
++ unsigned sharp:1; /* D4 ??? set in Sharp's code */
++ unsigned x01:3;
++ enum { disable = 0,
++ m12MHz = 1,
++ m24MHz = 2,
++ m48MHz = 3,
++ } mclksel:3; /* D10-D8 LCD controller clock */
++ unsigned x02:1;
++ enum { h24MHz = 0,
++ h48MHz = 1,
++ } hclksel:2; /* D13-D12 host bus clock */
++ unsigned x03:2;
++} __attribute__ ((packed)) bits;
++} __attribute__ ((packed));
++
++enum pincontrol {
++ opendrain = 0,
++ tristate = 1,
++ pushpull = 2,
++ /* reserved = 3, */
++};
++
++union tc6393xb_scr_mcr {
++ u16 raw;
++struct {
++ enum pincontrol rdyst:2; /* D1-D0 HRDY control */
++ unsigned x00:1;
++ unsigned aren:1; /* D3 HRDY pull up resistance cut off */
++ enum pincontrol intst:2; /* D5-D4 #HINT control */
++ unsigned x01:1;
++ unsigned aien:1; /* D7 #HINT pull up resitance cut off */
++ unsigned x02:8;
++} __attribute__ ((packed)) bits;
++} __attribute__ ((packed));
++
++struct tc6393xb_platform_data {
++ u16 scr_pll2cr; /* PLL2 Control */
++ union tc6393xb_scr_ccr scr_ccr; /* Clock Control */
++ union tc6393xb_scr_mcr scr_mcr; /* Mode Control */
++ u16 scr_gper; /* GP Enable */
++ u32 scr_gpo_doecr; /* GPO Data OE Control */
++ u32 scr_gpo_dsr; /* GPO Data Set */
++
++ int (*enable)(struct platform_device *dev);
++ int (*disable)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++
++ int irq_base; /* a base for cascaded irq */
++
++ struct tmio_nand_data *nand_data;
++ struct tmio_fb_data *fb_data;
++};
++
++extern int tc6393xb_lcd_set_power(struct platform_device *fb_dev, bool on);
++extern int tc6393xb_lcd_mode(struct platform_device *fb_dev,
++ struct fb_videomode *mode);
++
++
++/*
++ * Relative to irq_base
++ */
++#define IRQ_TC6393_NAND 0
++#define IRQ_TC6393_MMC 1
++#define IRQ_TC6393_OHCI 2
++#define IRQ_TC6393_SERIAL 3
++#define IRQ_TC6393_FB 4
++
++#define TC6393XB_NR_IRQS 8
++
++#endif
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0005-Add-support-for-tc6387xb-MFD-core.patch b/packages/linux/linux-rp-2.6.24/tosa/0005-Add-support-for-tc6387xb-MFD-core.patch
new file mode 100644
index 0000000000..7183e3af6d
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0005-Add-support-for-tc6387xb-MFD-core.patch
@@ -0,0 +1,249 @@
+From a6a6faf1dbb90c950fe55a1719720457bfb5830a Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sun, 16 Dec 2007 02:19:49 +0000
+Subject: [PATCH 05/64] Add support for tc6387xb MFD core
+
+---
+ drivers/mfd/Kconfig | 6 ++
+ drivers/mfd/Makefile | 1 +
+ drivers/mfd/tc6387xb.c | 163 ++++++++++++++++++++++++++++++++++++++++++
+ include/linux/mfd/tc6387xb.h | 28 +++++++
+ 4 files changed, 198 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/tc6387xb.c
+ create mode 100644 include/linux/mfd/tc6387xb.h
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 9903d0a..1575323 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -9,6 +9,12 @@ config MFD_CORE
+ tristate
+ default n
+
++config MFD_TC6387XB
++ bool "Support Toshiba TC6387XB"
++ select MFD_CORE
++ help
++ Support for Toshiba Mobile IO Controller TC6387XB
++
+ config MFD_TC6393XB
+ bool "Support Toshiba TC6393XB"
+ select MFD_CORE
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index ffd342e..41b2190 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -6,6 +6,7 @@ obj-$(CONFIG_MFD_SM501) += sm501.o
+
+ obj-$(CONFIG_MFD_CORE) += mfd-core.o
+
++obj-$(CONFIG_MFD_TC6387XB) += tc6387xb.o
+ obj-$(CONFIG_MFD_TC6393XB) += tc6393xb.o
+
+ obj-$(CONFIG_MCP) += mcp-core.o
+diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c
+new file mode 100644
+index 0000000..c81fca2
+--- /dev/null
++++ b/drivers/mfd/tc6387xb.c
+@@ -0,0 +1,163 @@
++/*
++ * Toshiba TC6387XB support
++ * Copyright (c) 2005 Ian Molton
++ *
++ * 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.
++ *
++ * This file contains TC6387XB base support.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++
++#include <asm/hardware.h>
++#include <asm/mach-types.h>
++
++#include <linux/mfd-core.h>
++#include <linux/mfd/tc6387xb.h>
++
++#ifdef CONFIG_PM
++static int tc6387xb_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct tc6387xb_platform_data *pdata = platform_get_drvdata(dev);
++
++ if (pdata && pdata->suspend)
++ pdata->suspend(dev);
++
++ return 0;
++}
++
++static int tc6387xb_resume(struct platform_device *dev)
++{
++ struct tc6387xb_platform_data *pdata = platform_get_drvdata(dev);
++
++ if (pdata && pdata->resume)
++ pdata->resume(dev);
++
++ return 0;
++}
++#else
++#define tc6387xb_suspend NULL
++#define tc6387xb_resume NULL
++#endif
++
++/*--------------------------------------------------------------------------*/
++
++static int tc6387xb_mmc_enable(struct platform_device *mmc) {
++ struct platform_device *dev = to_platform_device(mmc->dev.parent);
++ struct tc6387xb_platform_data *tc6387xb = dev->dev.platform_data;
++
++ if(tc6387xb->enable_mmc_clock)
++ tc6387xb->enable_mmc_clock(dev);
++
++ return 0;
++}
++
++static int tc6387xb_mmc_disable(struct platform_device *mmc) {
++ struct platform_device *dev = to_platform_device(mmc->dev.parent);
++ struct tc6387xb_platform_data *tc6387xb = dev->dev.platform_data;
++
++ if(tc6387xb->disable_mmc_clock)
++ tc6387xb->disable_mmc_clock(dev);
++
++ return 0;
++}
++
++
++/*--------------------------------------------------------------------------*/
++
++static struct resource tc6387xb_mmc_resources[] = {
++ {
++ .name = TMIO_MMC_CONTROL,
++ .start = 0x800,
++ .end = 0x9ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_CONFIG,
++ .start = 0x200,
++ .end = 0x2ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_IRQ,
++ .start = 0,
++ .end = 0,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++static struct mfd_cell tc6387xb_cells[] = {
++ {
++ .name = "tmio-mmc",
++ .enable = tc6387xb_mmc_enable,
++ .disable = tc6387xb_mmc_disable,
++ .num_resources = ARRAY_SIZE(tc6387xb_mmc_resources),
++ .resources = tc6387xb_mmc_resources,
++ },
++};
++
++static int tc6387xb_probe(struct platform_device *dev)
++{
++ struct tc6387xb_platform_data *data = platform_get_drvdata(dev);
++ struct resource *iomem;
++ int irq;
++
++ iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
++ if (!iomem)
++ return -EINVAL;
++
++ irq = platform_get_irq(dev, 0);
++
++ if(data && data->enable)
++ data->enable(dev);
++
++ printk(KERN_INFO "Toshiba tc6393xb initialised\n");
++
++ return mfd_add_devices(dev, tc6387xb_cells, ARRAY_SIZE(tc6387xb_cells),
++ iomem, 0, irq);
++}
++
++static int tc6387xb_remove(struct platform_device *dev)
++{
++ struct tc6387xb_platform_data *data = platform_get_drvdata(dev);
++
++ if(data && data->disable)
++ data->disable(dev);
++
++ return 0;
++}
++
++
++static struct platform_driver tc6387xb_platform_driver = {
++ .driver = {
++ .name = "tc6387xb",
++ },
++ .probe = tc6387xb_probe,
++ .remove = tc6387xb_remove,
++ .suspend = tc6387xb_suspend,
++ .resume = tc6387xb_resume,
++};
++
++
++static int __init tc6387xb_init(void)
++{
++ return platform_driver_register (&tc6387xb_platform_driver);
++}
++
++static void __exit tc6387xb_exit(void)
++{
++ platform_driver_unregister(&tc6387xb_platform_driver);
++}
++
++module_init(tc6387xb_init);
++module_exit(tc6387xb_exit);
++
++MODULE_DESCRIPTION("Toshiba TC6387XB core driver");
++MODULE_LICENSE("GPLv2");
++MODULE_AUTHOR("Ian Molton");
+diff --git a/include/linux/mfd/tc6387xb.h b/include/linux/mfd/tc6387xb.h
+new file mode 100644
+index 0000000..496770b
+--- /dev/null
++++ b/include/linux/mfd/tc6387xb.h
+@@ -0,0 +1,28 @@
++/*
++ * linux/include/asm-arm/hardware/tc6387xb.h
++ *
++ * This file contains the definitions for the TC6393XB
++ *
++ * (C) Copyright 2005 Ian Molton <spyro@f2s.com>
++ *
++ * May be copied or modified under the terms of the GNU General Public
++ * License. See linux/COPYING for more information.
++ *
++ */
++#ifndef MFD_T7L66XB_H
++#define MFD_T7L66XB_H
++
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++
++struct tc6387xb_platform_data
++{
++ int (*enable_mmc_clock)(struct platform_device *dev);
++ int (*disable_mmc_clock)(struct platform_device *dev);
++ int (*enable)(struct platform_device *dev);
++ int (*disable)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++};
++
++#endif
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0006-Add-support-for-t7l66xb-MFD-core.patch b/packages/linux/linux-rp-2.6.24/tosa/0006-Add-support-for-t7l66xb-MFD-core.patch
new file mode 100644
index 0000000000..e7aff2455b
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0006-Add-support-for-t7l66xb-MFD-core.patch
@@ -0,0 +1,653 @@
+From 2e31fea352ca97988452f1f2c94809de2977ce40 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:08:52 +0000
+Subject: [PATCH 06/64] Add support for t7l66xb MFD core
+
+---
+ drivers/mfd/Kconfig | 6 +
+ drivers/mfd/Makefile | 1 +
+ drivers/mfd/t7l66xb.c | 550 +++++++++++++++++++++++++++++++++++++++++++
+ include/linux/mfd/t7l66xb.h | 45 ++++
+ 4 files changed, 602 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mfd/t7l66xb.c
+ create mode 100644 include/linux/mfd/t7l66xb.h
+
+diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
+index 1575323..f79a969 100644
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -9,6 +9,12 @@ config MFD_CORE
+ tristate
+ default n
+
++config MFD_T7L66XB
++ bool "Support Toshiba T7L66XB"
++ select MFD_CORE
++ help
++ Support for Toshiba Mobile IO Controller T7L66XB
++
+ config MFD_TC6387XB
+ bool "Support Toshiba TC6387XB"
+ select MFD_CORE
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index 41b2190..b2037ae 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -6,6 +6,7 @@ obj-$(CONFIG_MFD_SM501) += sm501.o
+
+ obj-$(CONFIG_MFD_CORE) += mfd-core.o
+
++obj-$(CONFIG_MFD_T7L66XB) += t7l66xb.o
+ obj-$(CONFIG_MFD_TC6387XB) += tc6387xb.o
+ obj-$(CONFIG_MFD_TC6393XB) += tc6393xb.o
+
+diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
+new file mode 100644
+index 0000000..308776a
+--- /dev/null
++++ b/drivers/mfd/t7l66xb.c
+@@ -0,0 +1,550 @@
++/*
++ *
++ * Toshiba T7L66XB core mfd support
++ *
++ * Copyright (c) 2005 Ian Molton
++ * Copyright (c) 2007 Ian Molton
++ *
++ * 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.
++ *
++ * T7L66 features:
++ *
++ * Supported in this driver:
++ * SD/MMC
++ * SM/NAND flash controller
++ * OHCI controller
++ *
++ * As yet not supported
++ * GPIO interface (on NAND pins)
++ * Serial interface
++ * TFT 'interface converter'
++ * PCMCIA interface logic
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/io.h>
++#include <linux/irq.h>
++#include <linux/platform_device.h>
++#include <linux/fb.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/mfd/t7l66xb.h>
++
++union t7l66xb_dev_ctl {
++ u8 raw;
++struct {
++ unsigned usb_en:1; /* D0 USB enable */
++ unsigned mmc_en:1; /* D1 MMC enable */
++} __attribute__ ((packed));
++} __attribute__ ((packed));
++
++
++struct t7l66xb_scr {
++ u8 x00[8];
++ u8 revid; /* 0x08 Revision ID */
++ u8 x01[57];
++ u8 imr; /* 0x42 Interrupt Mask */
++ u8 x03[157];
++ union t7l66xb_dev_ctl dev_ctl; /* 0xe0 Device control */
++ u8 isr; /* 0xe1 Interrupt Status */
++ u8 x04[14];
++ u8 gpio_output_ctl; /* 0xf0 */
++ u8 gpio_output_status; /* 0xf1 */
++ u16 gpio_input_status; /* 0xf2 */
++ u8 x05[4];
++ u8 active_pullup_down_ctl; /* 0xf8 */
++ u8 x06[7];
++} __attribute__ ((packed));
++
++
++/*--------------------------------------------------------------------------*/
++
++struct t7l66xb
++{
++ struct t7l66xb_scr __iomem *scr;
++ spinlock_t lock;
++
++ struct resource rscr;
++ struct resource *iomem;
++ int irq;
++};
++
++/*--------------------------------------------------------------------------*/
++
++static int t7l66xb_ohci_enable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ dev_ctl.usb_en = 1;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++static int t7l66xb_ohci_disable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ dev_ctl.usb_en = 0;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
++static int t7l66xb_mmc_enable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ if(pdata->enable_clk32k)
++ pdata->enable_clk32k(dev);
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ dev_ctl.mmc_en = 1;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++static int t7l66xb_mmc_disable(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ dev_ctl.mmc_en = 0;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++ if(pdata->disable_clk32k)
++ pdata->disable_clk32k(dev);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
++static int t7l66xb_nand_disable(struct platform_device *nand)
++{
++ struct platform_device *dev = to_platform_device(nand->dev.parent);
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++// dev_ctl.nand_en = 0;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++static int t7l66xb_nand_enable(struct platform_device *nand)
++{
++ struct platform_device *dev = to_platform_device(nand->dev.parent);
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++ union t7l66xb_dev_ctl dev_ctl;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++
++ dev_ctl.raw = readb(&scr->dev_ctl);
++ // dev_ctl.nand_en = 1;
++ writeb(dev_ctl.raw, &scr->dev_ctl);
++
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
++const static struct resource t7l66xb_mmc_resources[] = {
++ {
++ .name = TMIO_MMC_CONTROL,
++ .start = 0x800,
++ .end = 0x9ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_CONFIG,
++ .start = 0x200,
++ .end = 0x2ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_MMC_IRQ,
++ .start = IRQ_T7L66XB_MMC,
++ .end = IRQ_T7L66XB_MMC,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource t7l66xb_ohci_resources[] = {
++ {
++ .name = TMIO_OHCI_CONFIG,
++ .start = 0x0300,
++ .end = 0x03ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_CONTROL,
++ .start = 0xa00,
++ .end = 0xbff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_SRAM,
++ .start = 0x01000,
++ .end = 0x02fff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_OHCI_IRQ,
++ .start = IRQ_T7L66XB_OHCI,
++ .end = IRQ_T7L66XB_OHCI,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++const static struct resource t7l66xb_nand_resources[] = {
++ {
++ .name = TMIO_NAND_CONFIG,
++ .start = 0x0100,
++ .end = 0x01ff,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_NAND_CONTROL,
++ .start = 0xc00,
++ .end = 0xc07,
++ .flags = IORESOURCE_MEM,
++ },
++ {
++ .name = TMIO_NAND_IRQ,
++ .start = IRQ_T7L66XB_NAND,
++ .end = IRQ_T7L66XB_NAND,
++ .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_MFD_SUBDEVICE,
++ },
++};
++
++static struct mfd_cell t7l66xb_cells[] = {
++ {
++ .name = "tmio-mmc",
++ .enable = t7l66xb_mmc_enable,
++ .disable = t7l66xb_mmc_disable,
++ .num_resources = ARRAY_SIZE(t7l66xb_mmc_resources),
++ .resources = t7l66xb_mmc_resources,
++ },
++ {
++ .name = "tmio-ohci",
++ .enable = t7l66xb_ohci_enable,
++ .disable = t7l66xb_ohci_disable,
++ .num_resources = ARRAY_SIZE(t7l66xb_ohci_resources),
++ .resources = t7l66xb_ohci_resources,
++ },
++ {
++ .name = "tmio-nand",
++ .enable = t7l66xb_nand_enable,
++ .disable = t7l66xb_nand_disable,
++ .num_resources = ARRAY_SIZE(t7l66xb_nand_resources),
++ .resources = t7l66xb_nand_resources,
++ },
++};
++
++/*--------------------------------------------------------------------------*/
++
++/* Handle the T7L66XB interrupt mux */
++static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned int isr;
++ unsigned int i;
++
++ desc->chip->ack(irq);
++ while ((isr = readb(&scr->isr) & ~readb(&scr->imr)))
++ for (i = 0; i < T7L66XB_NR_IRQS; i++)
++ if (isr & (1 << i))
++ desc_handle_irq(tcpd->irq_base + i,
++ irq_desc + tcpd->irq_base + i);
++}
++
++static void t7l66xb_irq_mask(unsigned int irq)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++ iowrite8(ioread8(&scr->imr) | (1 << (irq - tcpd->irq_base)),
++ &scr->imr);
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++}
++
++static void t7l66xb_irq_unmask(unsigned int irq)
++{
++ struct platform_device *dev = get_irq_chip_data(irq);
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ struct t7l66xb_scr __iomem *scr = t7l66xb->scr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&t7l66xb->lock, flags);
++ iowrite8(ioread8(&scr->imr) & ~(1 << (irq - tcpd->irq_base)),
++ &scr->imr);
++ spin_unlock_irqrestore(&t7l66xb->lock, flags);
++}
++
++static struct irq_chip t7l66xb_chip = {
++ .name = "t7l66xb",
++ .ack = t7l66xb_irq_mask,
++ .mask = t7l66xb_irq_mask,
++ .unmask = t7l66xb_irq_unmask,
++};
++
++/*--------------------------------------------------------------------------*/
++
++/* Install the IRQ handler */
++static void t7l66xb_attach_irq(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ unsigned int irq;
++
++ for (
++ irq = tcpd->irq_base;
++ irq <= tcpd->irq_base + T7L66XB_NR_IRQS;
++ irq++) {
++ set_irq_chip (irq, &t7l66xb_chip);
++ set_irq_chip_data (irq, dev);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ }
++
++ set_irq_type (t7l66xb->irq, IRQT_FALLING);
++ set_irq_chip_data (t7l66xb->irq, dev);
++ set_irq_chained_handler (t7l66xb->irq, t7l66xb_irq);
++}
++
++static void t7l66xb_detach_irq(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *tcpd = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ unsigned int irq;
++
++ set_irq_chained_handler(t7l66xb->irq, NULL);
++ set_irq_chip_data(t7l66xb->irq, NULL);
++
++ for (
++ irq = tcpd->irq_base;
++ irq <= tcpd->irq_base + T7L66XB_NR_IRQS;
++ irq++) {
++ set_irq_flags(irq, 0);
++ set_irq_chip(irq, NULL);
++ set_irq_chip_data(irq, NULL);
++ }
++}
++
++/*--------------------------------------------------------------------------*/
++
++#ifdef CONFIG_PM
++static int t7l66xb_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++
++
++ if (pdata && pdata->suspend)
++ pdata->suspend(dev);
++
++ return 0;
++}
++
++static int t7l66xb_resume(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++
++ if (pdata && pdata->resume)
++ pdata->resume(dev);
++
++ return 0;
++}
++#else
++#define t7l66xb_suspend NULL
++#define t7l66xb_resume NULL
++#endif
++
++/*--------------------------------------------------------------------------*/
++
++static int t7l66xb_probe(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb;
++ struct resource *iomem;
++ struct resource *rscr;
++ int retval = -ENOMEM;
++
++ iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
++ if (!iomem)
++ return -EINVAL;
++
++ t7l66xb = kzalloc (sizeof *t7l66xb, GFP_KERNEL);
++ if (!t7l66xb)
++ goto err_kzalloc;
++
++ spin_lock_init(&t7l66xb->lock);
++
++ platform_set_drvdata(dev, t7l66xb);
++ t7l66xb->iomem = iomem;
++ t7l66xb->irq = platform_get_irq(dev, 0);
++
++ rscr = &t7l66xb->rscr;
++ rscr->name = "t7l66xb-core";
++ rscr->start = iomem->start;
++ rscr->end = iomem->start + 0xff;
++ rscr->flags = IORESOURCE_MEM;
++
++ if((retval = request_resource(iomem, rscr)))
++ goto err_request_scr;
++
++ t7l66xb->scr = ioremap(rscr->start, rscr->end - rscr->start + 1);
++ if (!t7l66xb->scr) {
++ retval = -ENOMEM;
++ goto err_ioremap;
++ }
++
++ if (pdata && pdata->enable)
++ pdata->enable(dev);
++
++ writeb(0xbf, &t7l66xb->scr->imr); /* Mask all interrupts */
++
++ printk(KERN_INFO "%s rev %d @ 0x%08lx, irq %d\n",
++ dev->name, readb(&t7l66xb->scr->revid),
++ (unsigned long)t7l66xb->scr, t7l66xb->irq);
++
++ if(t7l66xb->irq)
++ t7l66xb_attach_irq(dev);
++
++ t7l66xb_cells[2].driver_data = pdata->nand_data;
++
++ if(!(retval = mfd_add_devices(dev, t7l66xb_cells,
++ ARRAY_SIZE(t7l66xb_cells),
++ iomem, 0, pdata->irq_base)))
++ return 0;
++
++ if(t7l66xb->irq)
++ t7l66xb_detach_irq(dev);
++
++ iounmap(t7l66xb->scr);
++err_ioremap:
++ release_resource(rscr);
++err_request_scr:
++ kfree(t7l66xb);
++err_kzalloc:
++ release_resource(iomem);
++ return retval;
++}
++
++static int t7l66xb_remove(struct platform_device *dev)
++{
++ struct t7l66xb_platform_data *pdata = dev->dev.platform_data;
++ struct t7l66xb *t7l66xb = platform_get_drvdata(dev);
++ int ret;
++
++ if (t7l66xb->irq)
++ t7l66xb_detach_irq(dev);
++
++ ret = pdata->disable(dev);
++
++ iounmap(t7l66xb->scr);
++ release_resource(&t7l66xb->rscr);
++ release_resource(t7l66xb->iomem);
++
++ mfd_remove_devices(dev);
++
++ platform_set_drvdata(dev, NULL);
++
++ kfree(t7l66xb);
++
++ return ret;
++
++}
++
++static struct platform_driver t7l66xb_platform_driver = {
++ .driver = {
++ .name = "t7l66xb",
++ .owner = THIS_MODULE,
++ },
++ .suspend = t7l66xb_suspend,
++ .resume = t7l66xb_resume,
++ .probe = t7l66xb_probe,
++ .remove = t7l66xb_remove,
++};
++
++/*--------------------------------------------------------------------------*/
++
++static int __init t7l66xb_init(void)
++{
++ int retval = 0;
++
++ retval = platform_driver_register (&t7l66xb_platform_driver);
++ return retval;
++}
++
++static void __exit t7l66xb_exit(void)
++{
++ platform_driver_unregister(&t7l66xb_platform_driver);
++}
++
++module_init(t7l66xb_init);
++module_exit(t7l66xb_exit);
++
++MODULE_DESCRIPTION("Toshiba T7L66XB core driver");
++MODULE_LICENSE("GPLv2");
++MODULE_AUTHOR("Ian Molton");
++
+diff --git a/include/linux/mfd/t7l66xb.h b/include/linux/mfd/t7l66xb.h
+new file mode 100644
+index 0000000..06b8de5
+--- /dev/null
++++ b/include/linux/mfd/t7l66xb.h
+@@ -0,0 +1,45 @@
++/*
++ * linux/include/asm-arm/hardware/t7l66xb.h
++ *
++ * This file contains the definitions for the T7L66XB
++ *
++ * (C) Copyright 2005 Ian Molton <spyro@f2s.com>
++ *
++ * 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_ARCH_T7L66XB_SOC
++#define _ASM_ARCH_T7L66XB_SOC
++
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++
++
++struct t7l66xb_platform_data
++{
++ int (*enable_clk32k)(struct platform_device *dev);
++ int (*disable_clk32k)(struct platform_device *dev);
++
++ int (*enable)(struct platform_device *dev);
++ int (*disable)(struct platform_device *dev);
++ int (*suspend)(struct platform_device *dev);
++ int (*resume)(struct platform_device *dev);
++
++ int irq_base; /* a base for cascaded irq */
++
++ struct tmio_nand_data *nand_data;
++};
++
++
++#define T7L66XB_NAND_CNF_BASE (0x000100)
++#define T7L66XB_NAND_CTL_BASE (0x001000)
++
++#define IRQ_T7L66XB_NAND (3)
++#define IRQ_T7L66XB_MMC (1)
++#define IRQ_T7L66XB_OHCI (2)
++
++#define T7L66XB_NR_IRQS 8
++
++#endif
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch b/packages/linux/linux-rp-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch
new file mode 100644
index 0000000000..2f5f11400c
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch
@@ -0,0 +1,81 @@
+From d6e8b347dbcce9e0e8d2204b774c1c33cfcb483e Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:27:43 +0000
+Subject: [PATCH 07/64] Common headers for TMIO MFD subdevices
+
+---
+ include/linux/mfd/tmio.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 62 insertions(+), 0 deletions(-)
+ create mode 100644 include/linux/mfd/tmio.h
+
+diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
+new file mode 100644
+index 0000000..b42a4c3
+--- /dev/null
++++ b/include/linux/mfd/tmio.h
+@@ -0,0 +1,62 @@
++#ifndef MFD_TMIO_H
++#define MFD_TMIO_H
++
++#include <linux/io.h>
++#include <linux/platform_device.h>
++
++struct fb_videomode;
++
++/*
++ * data for the NAND controller
++ */
++struct tmio_nand_data {
++ struct nand_bbt_descr *badblock_pattern;
++ struct mtd_partition *partition;
++ unsigned int num_partitions;
++};
++
++struct tmio_fb_data {
++ int (*lcd_set_power)(struct platform_device *fb_dev,
++ bool on);
++ int (*lcd_mode)(struct platform_device *fb_dev,
++ struct fb_videomode *mode);
++ int num_modes;
++ struct fb_videomode *modes;
++};
++
++static u32 __maybe_unused tmio_ioread32(const void __iomem *addr)
++{
++ return ((u32) ioread16(addr)) | (((u32) ioread16(addr + 2)) << 16);
++}
++
++static u32 __maybe_unused tmio_iowrite32(u32 val, const void __iomem *addr)
++{
++ iowrite16(val, addr);
++ iowrite16(val >> 16, addr + 2);
++ return val;
++}
++
++#define FBIO_TMIO_ACC_WRITE 0x7C639300
++#define FBIO_TMIO_ACC_SYNC 0x7C639301
++
++#define TMIO_MMC_CONFIG "tmio-mmc-config"
++#define TMIO_MMC_CONTROL "tmio-mmc-control"
++#define TMIO_MMC_IRQ "tmio-mmc"
++
++#define TMIO_NAND_CONFIG "tmio-nand-config"
++#define TMIO_NAND_CONTROL "tmio-nand-control"
++#define TMIO_NAND_IRQ "tmio-nand"
++
++#define TMIO_FB_CONFIG "tmio-fb-config"
++#define TMIO_FB_CONTROL "tmio-fb-control"
++#define TMIO_FB_VRAM "tmio-fb-vram"
++#define TMIO_FB_IRQ "tmio-fb"
++
++#define TMIO_OHCI_CONFIG "tmio-ohci-config"
++#define TMIO_OHCI_CONTROL "tmio-ohci-control"
++#define TMIO_OHCI_SRAM "tmio-ohci-sram"
++#define TMIO_OHCI_SRAM_ALIAS "tmio-ohci-sram-alias"
++#define TMIO_OHCI_IRQ "tmio-ohci"
++
++#endif
++
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0008-Nand-driver-for-TMIO-devices.patch b/packages/linux/linux-rp-2.6.24/tosa/0008-Nand-driver-for-TMIO-devices.patch
new file mode 100644
index 0000000000..48b8000ab7
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0008-Nand-driver-for-TMIO-devices.patch
@@ -0,0 +1,608 @@
+From 917b3997a39396f5f51418930de7b933ad053bad Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:14:23 +0000
+Subject: [PATCH 08/64] Nand driver for TMIO devices
+
+---
+ drivers/mtd/nand/Kconfig | 7 +
+ drivers/mtd/nand/Makefile | 1 +
+ drivers/mtd/nand/tmio_nand.c | 557 ++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 565 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mtd/nand/tmio_nand.c
+
+diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
+index 246d451..43e489a 100644
+--- a/drivers/mtd/nand/Kconfig
++++ b/drivers/mtd/nand/Kconfig
+@@ -284,6 +284,13 @@ config MTD_NAND_CM_X270
+ depends on MTD_NAND && MACH_ARMCORE
+
+
++config MTD_NAND_TMIO
++ tristate "NAND Flash device on Toshiba Mobile IO Controller"
++ depends on MTD_NAND && MFD_CORE
++ help
++ Support for NAND flash connected to a Toshiba Mobile IO
++ Controller in some PDAs, including the Sharp SL6000x.
++
+ config MTD_NAND_NANDSIM
+ tristate "Support for NAND Flash Simulator"
+ depends on MTD_PARTITIONS
+diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
+index 3ad6c01..d839ebd 100644
+--- a/drivers/mtd/nand/Makefile
++++ b/drivers/mtd/nand/Makefile
+@@ -27,6 +27,7 @@ obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
+ obj-$(CONFIG_MTD_NAND_AT91) += at91_nand.o
+ obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
+ obj-$(CONFIG_MTD_NAND_BASLER_EXCITE) += excite_nandflash.o
++obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
+ obj-$(CONFIG_MTD_NAND_PLATFORM) += plat_nand.o
+ obj-$(CONFIG_MTD_ALAUDA) += alauda.o
+
+diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
+new file mode 100644
+index 0000000..450b4ec
+--- /dev/null
++++ b/drivers/mtd/nand/tmio_nand.c
+@@ -0,0 +1,557 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/delay.h>
++#include <linux/io.h>
++#include <linux/irq.h>
++#include <linux/interrupt.h>
++#include <linux/ioport.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/nand.h>
++#include <linux/mtd/nand_ecc.h>
++#include <linux/mtd/partitions.h>
++
++/*--------------------------------------------------------------------------*/
++
++/* tmio_nfcr.mode Register Command List */
++#define FCR_MODE_DATA 0x94 /* Data Data_Mode */
++#define FCR_MODE_COMMAND 0x95 /* Data Command_Mode */
++#define FCR_MODE_ADDRESS 0x96 /* Data Address_Mode */
++
++#define FCR_MODE_HWECC_CALC 0xB4 /* HW-ECC Data */
++#define FCR_MODE_HWECC_RESULT 0xD4 /* HW-ECC Calculation Result Read_Mode */
++#define FCR_MODE_HWECC_RESET 0xF4 /* HW-ECC Reset */
++
++#define FCR_MODE_POWER_ON 0x0C /* Power Supply ON to SSFDC card */
++#define FCR_MODE_POWER_OFF 0x08 /* Power Supply OFF to SSFDC card */
++
++#define FCR_MODE_LED_OFF 0x00 /* LED OFF */
++#define FCR_MODE_LED_ON 0x04 /* LED ON */
++
++#define FCR_MODE_EJECT_ON 0x68 /* Ejection Demand from Penguin is Advanced */
++#define FCR_MODE_EJECT_OFF 0x08 /* Ejection Demand from Penguin is Not Advanced */
++
++#define FCR_MODE_LOCK 0x6C /* Operates By Lock_Mode. Ejection Switch is Invalid */
++#define FCR_MODE_UNLOCK 0x0C /* Operates By UnLock_Mode.Ejection Switch is Effective */
++
++#define FCR_MODE_CONTROLLER_ID 0x40 /* Controller ID Read */
++#define FCR_MODE_STANDBY 0x00 /* SSFDC card Changes Standby State */
++
++#define FCR_MODE_WE 0x80
++#define FCR_MODE_ECC1 0x40
++#define FCR_MODE_ECC0 0x20
++#define FCR_MODE_CE 0x10
++#define FCR_MODE_PCNT1 0x08
++#define FCR_MODE_PCNT0 0x04
++#define FCR_MODE_ALE 0x02
++#define FCR_MODE_CLE 0x01
++
++#define FCR_STATUS_BUSY 0x80
++
++/*
++ *NAND Flash Host Controller Configuration Register
++ */
++struct tmio_nfhccr {
++ u8 x00[4];
++ u16 command; /* 0x04 Command */
++ u8 x01[0x0a];
++ u16 base[2]; /* 0x10 NAND Flash Control Reg Base Addr*/
++ u8 x02[0x29];
++ u8 intp; /* 0x3d Interrupt Pin */
++ u8 x03[0x0a];
++ u8 inte; /* 0x48 Interrupt Enable */
++ u8 x04;
++ u8 ec; /* 0x4a Event Control */
++ u8 x05;
++ u8 icc; /* 0x4c Internal Clock Control */
++ u8 x06[0x0e];
++ u8 eccc; /* 0x5b ECC Control */
++ u8 x07[4];
++ u8 nftc; /* 0x60 NAND Flash Transaction Control */
++ u8 nfm; /* 0x61 NAND Flash Monitor */
++ u8 nfpsc; /* 0x62 NAND Flash Power Supply Control */
++ u8 nfdc; /* 0x63 NAND Flash Detect Control */
++ u8 x08[0x9c];
++} __attribute__ ((packed));
++
++/*
++ *NAND Flash Control Register
++ */
++struct tmio_nfcr {
++union {
++ u8 u8; /* 0x00 Data Register */
++ u16 u16;
++ u32 u32;
++} __attribute__ ((packed));
++ u8 mode; /* 0x04 Mode Register */
++ u8 status; /* 0x05 Status Register */
++ u8 isr; /* 0x06 Interrupt Status Register */
++ u8 imr; /* 0x07 Interrupt Mask Register */
++} __attribute__ ((packed));
++
++struct tmio_nand {
++ struct mtd_info mtd;
++ struct nand_chip chip;
++
++ struct platform_device *dev;
++
++ struct tmio_nfhccr __iomem *ccr;
++ struct tmio_nfcr __iomem *fcr;
++
++ unsigned int irq;
++
++ /* for tmio_nand_read_byte */
++ u8 read;
++ unsigned read_good:1;
++};
++
++#define mtd_to_tmio(m) container_of(m, struct tmio_nand, mtd)
++
++#ifdef CONFIG_MTD_CMDLINE_PARTS
++static const char *part_probes[] = { "cmdlinepart", NULL };
++#endif
++
++/*--------------------------------------------------------------------------*/
++
++static void tmio_nand_hwcontrol(struct mtd_info *mtd, int cmd,
++ unsigned int ctrl)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ struct nand_chip *chip = mtd->priv;
++
++ if (ctrl & NAND_CTRL_CHANGE) {
++ u8 mode;
++
++ if (ctrl & NAND_NCE) {
++ mode = FCR_MODE_DATA;
++
++ if (ctrl & NAND_CLE)
++ mode |= FCR_MODE_CLE;
++ else
++ mode &= ~FCR_MODE_CLE;
++
++ if (ctrl & NAND_ALE)
++ mode |= FCR_MODE_ALE;
++ else
++ mode &= ~FCR_MODE_ALE;
++ } else {
++ mode = FCR_MODE_STANDBY;
++ }
++
++ iowrite8(mode, &fcr->mode);
++ tmio->read_good = 0;
++ }
++
++ if (cmd != NAND_CMD_NONE)
++ writeb(cmd, chip->IO_ADDR_W);
++}
++
++static int tmio_nand_dev_ready(struct mtd_info *mtd)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ return !(ioread8(&fcr->status) & FCR_STATUS_BUSY);
++}
++
++static irqreturn_t tmio_irq(int irq, void *__dev)
++{
++ struct platform_device *dev = __dev;
++ struct tmio_nand *tmio = platform_get_drvdata(dev);
++ struct nand_chip *nand_chip = &tmio->chip;
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ /* disable RDYREQ interrupt */
++ iowrite8(0x00, &fcr->imr);
++
++ if (unlikely(!waitqueue_active(&nand_chip->controller->wq)))
++ dev_warn(&dev->dev, "spurious interrupt\n");
++
++ wake_up(&nand_chip->controller->wq);
++ return IRQ_HANDLED;
++}
++
++/*
++ *The TMIO core has a RDYREQ interrupt on the posedge of #SMRB.
++ *This interrupt is normally disabled, but for long operations like
++ *erase and write, we enable it to wake us up. The irq handler
++ *disables the interrupt.
++ */
++static int
++tmio_nand_wait(struct mtd_info *mtd, struct nand_chip *nand_chip)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ long timeout;
++
++ /* enable RDYREQ interrupt */
++ iowrite8(0x0f, &fcr->isr);
++ iowrite8(0x81, &fcr->imr);
++
++ timeout = wait_event_timeout(nand_chip->controller->wq, tmio_nand_dev_ready(mtd),
++ msecs_to_jiffies(nand_chip->state == FL_ERASING ? 400 : 20));
++
++ if (unlikely(!tmio_nand_dev_ready(mtd))) {
++ iowrite8(0x00, &fcr->imr);
++ dev_warn(&tmio->dev->dev, "still busy with %s after %d ms\n",
++ nand_chip->state == FL_ERASING ? "erase" : "program",
++ nand_chip->state == FL_ERASING ? 400 : 20);
++
++ } else if (unlikely(!timeout)) {
++ iowrite8(0x00, &fcr->imr);
++ dev_warn(&tmio->dev->dev, "timeout waiting for interrupt\n");
++ }
++
++ nand_chip->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1);
++ return nand_chip->read_byte(mtd);
++}
++
++/*
++ *The TMIO controller combines two 8-bit data bytes into one 16-bit
++ *word. This function separates them so nand_base.c works as expected,
++ *especially its NAND_CMD_READID routines.
++ *
++ *To prevent stale data from being read, tmio_nand_hwcontrol() clears
++ *tmio->read_good.
++ */
++static u_char tmio_nand_read_byte(struct mtd_info *mtd)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ unsigned int data;
++
++ if (tmio->read_good--)
++ return tmio->read;
++
++ data = ioread16(&fcr->u16);
++ tmio->read = data >> 8;
++ return data;
++}
++
++/*
++ *The TMIO controller converts an 8-bit NAND interface to a 16-bit
++ *bus interface, so all data reads and writes must be 16-bit wide.
++ *Thus, we implement 16-bit versions of the read, write, and verify
++ *buffer functions.
++ */
++static void
++tmio_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ iowrite16_rep(&fcr->u16, buf, len >> 1);
++}
++
++static void tmio_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ ioread16_rep(&fcr->u16, buf, len >> 1);
++}
++
++static int
++tmio_nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ u16 *p = (u16 *) buf;
++
++ for (len >>= 1; len; len--)
++ if (*(p++) != ioread16(&fcr->u16))
++ return -EFAULT;
++ return 0;
++}
++
++static void tmio_nand_enable_hwecc(struct mtd_info *mtd, int mode)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ iowrite8(FCR_MODE_HWECC_RESET, &fcr->mode);
++ ioread8(&fcr->u8); /* dummy read */
++ iowrite8(FCR_MODE_HWECC_CALC, &fcr->mode);
++}
++
++static int tmio_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
++ u_char *ecc_code)
++{
++ struct tmio_nand *tmio = mtd_to_tmio(mtd);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ unsigned int ecc;
++
++ iowrite8(FCR_MODE_HWECC_RESULT, &fcr->mode);
++
++ ecc = ioread16(&fcr->u16);
++ ecc_code[1] = ecc; /* 000-255 LP7-0 */
++ ecc_code[0] = ecc >> 8; /* 000-255 LP15-8 */
++ ecc = ioread16(&fcr->u16);
++ ecc_code[2] = ecc; /* 000-255 CP5-0,11b */
++ ecc_code[4] = ecc >> 8; /* 256-511 LP7-0 */
++ ecc = ioread16(&fcr->u16);
++ ecc_code[3] = ecc; /* 256-511 LP15-8 */
++ ecc_code[5] = ecc >> 8; /* 256-511 CP5-0,11b */
++
++ iowrite8(FCR_MODE_DATA, &fcr->mode);
++ return 0;
++}
++
++static int tmio_hw_init(struct platform_device *dev, struct tmio_nand *tmio)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ const struct resource *nfcr = NULL;
++ struct tmio_nfhccr __iomem *ccr = tmio->ccr;
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++ unsigned long base;
++ int i;
++
++ for (i = 0; i < cell->num_resources; i++)
++ if (!strcmp((cell->resources+i)->name, TMIO_NAND_CONTROL))
++ nfcr = &cell->resources[i];
++
++ if (nfcr == NULL)
++ return -ENOMEM;
++
++ if (!cell->enable) {
++ printk(KERN_ERR "null cell enable!");
++ return -EINVAL;
++ }
++
++ cell->enable(dev);
++
++ /* (4Ch) CLKRUN Enable 1st spcrunc */
++ iowrite8(0x81, &ccr->icc);
++
++ /* (10h)BaseAddress 0x1000 spba.spba2 */
++ base = nfcr->start;
++ iowrite16(base, ccr->base + 0);
++ iowrite16(base >> 16, ccr->base + 1);
++
++ /* (04h)Command Register I/O spcmd */
++ iowrite8(0x02, &ccr->command);
++
++ /* (62h) Power Supply Control ssmpwc */
++ /* HardPowerOFF - SuspendOFF - PowerSupplyWait_4MS */
++ iowrite8(0x02, &ccr->nfpsc);
++
++ /* (63h) Detect Control ssmdtc */
++ iowrite8(0x02, &ccr->nfdc);
++
++ /* Interrupt status register clear sintst */
++ iowrite8(0x0f, &fcr->isr);
++
++ /* After power supply, Media are reset smode */
++ iowrite8(FCR_MODE_POWER_ON, &fcr->mode);
++ iowrite8(FCR_MODE_COMMAND, &fcr->mode);
++ iowrite8(NAND_CMD_RESET, &fcr->u8);
++
++ /* Standby Mode smode */
++ iowrite8(FCR_MODE_STANDBY, &fcr->mode);
++
++ mdelay(5);
++
++ return 0;
++}
++
++static void tmio_hw_stop(struct platform_device *dev, struct tmio_nand *tmio)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_nfcr __iomem *fcr = tmio->fcr;
++
++ iowrite8(FCR_MODE_POWER_OFF, &fcr->mode);
++ cell->disable(dev);
++}
++
++static int tmio_probe(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_nand_data *data = cell->driver_data;
++ struct resource *ccr = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_NAND_CONFIG);
++ struct resource *fcr = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_NAND_CONTROL);
++ int irq = platform_get_irq(dev, 0);
++ struct tmio_nand *tmio;
++ struct mtd_info *mtd;
++ struct nand_chip *nand_chip;
++ struct mtd_partition *parts;
++ int nbparts = 0;
++ int retval;
++
++ if (data == NULL) {
++ dev_err(&dev->dev, "NULL platform data!\n");
++ return -EINVAL;
++ }
++
++ tmio = kzalloc(sizeof *tmio, GFP_KERNEL);
++ if (!tmio) {
++ retval = -ENOMEM;
++ goto err_kzalloc;
++ }
++
++ tmio->dev = dev;
++
++ platform_set_drvdata(dev, tmio);
++ mtd = &tmio->mtd;
++ nand_chip = &tmio->chip;
++ mtd->priv = nand_chip;
++ mtd->name = "tmio-nand";
++
++ tmio->ccr = ioremap(ccr->start, ccr->end - ccr->start + 1);
++ if (!tmio->ccr) {
++ retval = -EIO;
++ goto err_iomap_ccr;
++ }
++
++ tmio->fcr = ioremap(fcr->start, fcr->end - fcr->start + 1);
++ if (!tmio->fcr) {
++ retval = -EIO;
++ goto err_iomap_fcr;
++ }
++
++ retval = tmio_hw_init(dev, tmio);
++ if (retval)
++ goto err_hwinit;
++
++ /* Set address of NAND IO lines */
++ nand_chip->IO_ADDR_R = tmio->fcr;
++ nand_chip->IO_ADDR_W = tmio->fcr;
++
++ /* Set address of hardware control function */
++ nand_chip->cmd_ctrl = tmio_nand_hwcontrol;
++ nand_chip->dev_ready = tmio_nand_dev_ready;
++ nand_chip->read_byte = tmio_nand_read_byte;
++ nand_chip->write_buf = tmio_nand_write_buf;
++ nand_chip->read_buf = tmio_nand_read_buf;
++ nand_chip->verify_buf = tmio_nand_verify_buf;
++
++ /* set eccmode using hardware ECC */
++ nand_chip->ecc.mode = NAND_ECC_HW;
++ nand_chip->ecc.size = 512;
++ nand_chip->ecc.bytes = 6;
++ nand_chip->ecc.hwctl = tmio_nand_enable_hwecc;
++ nand_chip->ecc.calculate = tmio_nand_calculate_ecc;
++ nand_chip->ecc.correct = nand_correct_data;
++ nand_chip->badblock_pattern = data->badblock_pattern;
++
++ /* 15 us command delay time */
++ nand_chip->chip_delay = 15;
++
++ retval = request_irq(irq, &tmio_irq,
++ IRQF_DISABLED, dev->dev.bus_id, dev);
++ if (retval) {
++ dev_err(&dev->dev, "request_irq error %d\n", retval);
++ goto err_irq;
++ }
++
++ tmio->irq = irq;
++ nand_chip->waitfunc = tmio_nand_wait;
++
++ /* Scan to find existence of the device */
++ if (nand_scan(mtd, 1)) {
++ retval = -ENODEV;
++ goto err_scan;
++ }
++ /* Register the partitions */
++#ifdef CONFIG_MTD_PARTITIONS
++#ifdef CONFIG_MTD_CMDLINE_PARTS
++ nbparts = parse_mtd_partitions(mtd, part_probes, &parts, 0);
++#endif
++ if (nbparts <= 0) {
++ parts = data->partition;
++ nbparts = data->num_partitions;
++ }
++
++ retval = add_mtd_partitions(mtd, parts, nbparts);
++#else
++ retval = add_mtd_device(mtd);
++#endif
++
++ if (!retval)
++ return retval;
++
++ nand_release(mtd);
++
++err_scan:
++ if (tmio->irq)
++ free_irq(tmio->irq, dev);
++err_irq:
++ tmio_hw_stop(dev, tmio);
++err_hwinit:
++ iounmap(tmio->fcr);
++err_iomap_fcr:
++ iounmap(tmio->ccr);
++err_iomap_ccr:
++ kfree(tmio);
++err_kzalloc:
++ return retval;
++}
++
++static int tmio_remove(struct platform_device *dev)
++{
++ struct tmio_nand *tmio = platform_get_drvdata(dev);
++
++ nand_release(&tmio->mtd);
++ if (tmio->irq)
++ free_irq(tmio->irq, tmio);
++ tmio_hw_stop(dev, tmio);
++ iounmap(tmio->fcr);
++ iounmap(tmio->ccr);
++ kfree(tmio);
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int tmio_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++
++ if (cell->suspend)
++ cell->suspend(dev);
++
++ tmio_hw_stop(dev, platform_get_drvdata(dev));
++ return 0;
++}
++
++static int tmio_resume(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++
++ tmio_hw_init(dev, platform_get_drvdata(dev));
++
++ if (cell->resume)
++ cell->resume(dev);
++
++ return 0;
++}
++#endif
++
++static struct platform_driver tmio_driver = {
++ .driver.name = "tmio-nand",
++ .driver.owner = THIS_MODULE,
++ .probe = tmio_probe,
++ .remove = tmio_remove,
++#ifdef CONFIG_PM
++ .suspend = tmio_suspend,
++ .resume = tmio_resume,
++#endif
++};
++
++static int __init tmio_init(void)
++{
++ return platform_driver_register(&tmio_driver);
++}
++
++static void __exit tmio_exit(void)
++{
++ platform_driver_unregister(&tmio_driver);
++}
++
++module_init(tmio_init);
++module_exit(tmio_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Dirk Opfer, Chris Humbert, Dmitry Baryshkov");
++MODULE_DESCRIPTION("NAND flash driver on Toshiba Mobile IO controller");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0009-FB-driver-for-TMIO-devices.patch b/packages/linux/linux-rp-2.6.24/tosa/0009-FB-driver-for-TMIO-devices.patch
new file mode 100644
index 0000000000..5fc96f8973
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0009-FB-driver-for-TMIO-devices.patch
@@ -0,0 +1,1128 @@
+From 519d015892ab0a7cad1f6b26fcd38117171384ce Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Tue, 1 Jan 2008 21:22:23 +0000
+Subject: [PATCH 09/64] FB driver for TMIO devices
+
+---
+ drivers/video/Kconfig | 22 +
+ drivers/video/Makefile | 1 +
+ drivers/video/tmiofb.c | 1062 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 1085 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/video/tmiofb.c
+
+diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
+index 5b3dbcf..6d0df58 100644
+--- a/drivers/video/Kconfig
++++ b/drivers/video/Kconfig
+@@ -1782,6 +1782,28 @@ config FB_W100
+
+ If unsure, say N.
+
++config FB_TMIO
++ tristate "Toshiba Mobice IO FrameBuffer support"
++ depends on FB && MFD_CORE
++ select FB_CFB_FILLRECT
++ select FB_CFB_COPYAREA
++ select FB_CFB_IMAGEBLIT
++ ---help---
++ Frame buffer driver for the Toshiba Mobile IO integrated as found
++ on the Sharp SL-6000 series
++
++ This driver is also available as a module ( = code which can be
++ inserted and removed from the running kernel whenever you want). The
++ module will be called tmiofb. If you want to compile it as a module,
++ say M here and read <file:Documentation/kbuild/modules.txt>.
++
++ If unsure, say N.
++
++config FB_TMIO_ACCELL
++ bool "tmiofb acceleration"
++ depends on FB_TMIO
++ default y
++
+ config FB_S3C2410
+ tristate "S3C2410 LCD framebuffer support"
+ depends on FB && ARCH_S3C2410
+diff --git a/drivers/video/Makefile b/drivers/video/Makefile
+index 83e02b3..74e9384 100644
+--- a/drivers/video/Makefile
++++ b/drivers/video/Makefile
+@@ -97,6 +97,7 @@ obj-$(CONFIG_FB_CIRRUS) += cirrusfb.o
+ obj-$(CONFIG_FB_ASILIANT) += asiliantfb.o
+ obj-$(CONFIG_FB_PXA) += pxafb.o
+ obj-$(CONFIG_FB_W100) += w100fb.o
++obj-$(CONFIG_FB_TMIO) += tmiofb.o
+ obj-$(CONFIG_FB_AU1100) += au1100fb.o
+ obj-$(CONFIG_FB_AU1200) += au1200fb.o
+ obj-$(CONFIG_FB_PMAG_AA) += pmag-aa-fb.o
+diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
+new file mode 100644
+index 0000000..6b963a1
+--- /dev/null
++++ b/drivers/video/tmiofb.c
+@@ -0,0 +1,1062 @@
++/*
++ * Frame Buffer Device for Toshiba Mobile IO(TMIO) controller
++ *
++ * Copyright(C) 2005-2006 Chris Humbert
++ * Copyright(C) 2005 Dirk Opfer
++ *
++ * Based on:
++ * drivers/video/w100fb.c
++ * code written by Sharp/Lineo for 2.4 kernels
++ *
++ * 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.
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/fb.h>
++#include <linux/interrupt.h>
++#include <linux/delay.h>
++/* Why should fb driver call console functions? because acquire_console_sem() */
++#include <linux/console.h>
++#include <linux/uaccess.h>
++#include <linux/vmalloc.h>
++
++/*
++ * accelerator commands
++ */
++#define TMIOFB_ACC_CSADR(x) (0x00000000 | ((x) & 0x001ffffe))
++#define TMIOFB_ACC_CHPIX(x) (0x01000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_CVPIX(x) (0x02000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_PSADR(x) (0x03000000 | ((x) & 0x00fffffe))
++#define TMIOFB_ACC_PHPIX(x) (0x04000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_PVPIX(x) (0x05000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_PHOFS(x) (0x06000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_PVOFS(x) (0x07000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_POADR(x) (0x08000000 | ((x) & 0x00fffffe))
++#define TMIOFB_ACC_RSTR(x) (0x09000000 | ((x) & 0x000000ff))
++#define TMIOFB_ACC_TCLOR(x) (0x0A000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_FILL(x) (0x0B000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_DSADR(x) (0x0C000000 | ((x) & 0x00fffffe))
++#define TMIOFB_ACC_SSADR(x) (0x0D000000 | ((x) & 0x00fffffe))
++#define TMIOFB_ACC_DHPIX(x) (0x0E000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_DVPIX(x) (0x0F000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_SHPIX(x) (0x10000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_SVPIX(x) (0x11000000 | ((x) & 0x000003ff))
++#define TMIOFB_ACC_LBINI(x) (0x12000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_LBK2(x) (0x13000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_SHBINI(x) (0x14000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_SHBK2(x) (0x15000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_SVBINI(x) (0x16000000 | ((x) & 0x0000ffff))
++#define TMIOFB_ACC_SVBK2(x) (0x17000000 | ((x) & 0x0000ffff))
++
++#define TMIOFB_ACC_CMGO 0x20000000
++#define TMIOFB_ACC_CMGO_CEND 0x00000001
++#define TMIOFB_ACC_CMGO_INT 0x00000002
++#define TMIOFB_ACC_CMGO_CMOD 0x00000010
++#define TMIOFB_ACC_CMGO_CDVRV 0x00000020
++#define TMIOFB_ACC_CMGO_CDHRV 0x00000040
++#define TMIOFB_ACC_CMGO_RUND 0x00008000
++#define TMIOFB_ACC_SCGO 0x21000000
++#define TMIOFB_ACC_SCGO_CEND 0x00000001
++#define TMIOFB_ACC_SCGO_INT 0x00000002
++#define TMIOFB_ACC_SCGO_ROP3 0x00000004
++#define TMIOFB_ACC_SCGO_TRNS 0x00000008
++#define TMIOFB_ACC_SCGO_DVRV 0x00000010
++#define TMIOFB_ACC_SCGO_DHRV 0x00000020
++#define TMIOFB_ACC_SCGO_SVRV 0x00000040
++#define TMIOFB_ACC_SCGO_SHRV 0x00000080
++#define TMIOFB_ACC_SCGO_DSTXY 0x00008000
++#define TMIOFB_ACC_SBGO 0x22000000
++#define TMIOFB_ACC_SBGO_CEND 0x00000001
++#define TMIOFB_ACC_SBGO_INT 0x00000002
++#define TMIOFB_ACC_SBGO_DVRV 0x00000010
++#define TMIOFB_ACC_SBGO_DHRV 0x00000020
++#define TMIOFB_ACC_SBGO_SVRV 0x00000040
++#define TMIOFB_ACC_SBGO_SHRV 0x00000080
++#define TMIOFB_ACC_SBGO_SBMD 0x00000100
++#define TMIOFB_ACC_FLGO 0x23000000
++#define TMIOFB_ACC_FLGO_CEND 0x00000001
++#define TMIOFB_ACC_FLGO_INT 0x00000002
++#define TMIOFB_ACC_FLGO_ROP3 0x00000004
++#define TMIOFB_ACC_LDGO 0x24000000
++#define TMIOFB_ACC_LDGO_CEND 0x00000001
++#define TMIOFB_ACC_LDGO_INT 0x00000002
++#define TMIOFB_ACC_LDGO_ROP3 0x00000004
++#define TMIOFB_ACC_LDGO_ENDPX 0x00000008
++#define TMIOFB_ACC_LDGO_LVRV 0x00000010
++#define TMIOFB_ACC_LDGO_LHRV 0x00000020
++#define TMIOFB_ACC_LDGO_LDMOD 0x00000040
++
++/* a FIFO is always allocated, even if acceleration is not used */
++#define TMIOFB_FIFO_SIZE 512
++
++/*
++ * LCD Host Controller Configuration Register
++ *
++ * This iomem area supports only 16-bit IO.
++ */
++struct tmio_lhccr {
++ u16 x00[2];
++ u16 cmd; /* 0x04 Command */
++ u16 x01;
++ u16 revid; /* 0x08 Revision ID */
++ u16 x02[3];
++ u16 basel; /* 0x10 LCD Control Reg Base Addr Low */
++ u16 baseh; /* 0x12 LCD Control Reg Base Addr High */
++ u16 x03[0x16];
++ u16 ugcc; /* 0x40 Unified Gated Clock Control */
++ u16 gcc; /* 0x42 Gated Clock Control */
++ u16 x04[6];
++ u16 usc; /* 0x50 Unified Software Clear */
++ u16 x05[7];
++ u16 vramrtc; /* 0x60 VRAM Timing Control */
++ /* 0x61 VRAM Refresh Control */
++ u16 vramsac; /* 0x62 VRAM Access Control */
++ /* 0x63 VRAM Status */
++ u16 vrambc; /* 0x64 VRAM Block Control */
++ u16 x06[0x4d];
++};
++
++/*
++ * LCD Control Register
++ *
++ * This iomem area supports only 16-bit IO.
++ */
++struct tmio_lcr {
++ u16 uis; /* 0x000 Unified Interrupt Status */
++ u16 x00[3];
++ u16 vhpn; /* 0x008 VRAM Horizontal Pixel Number */
++ u16 cfsal; /* 0x00a Command FIFO Start Address Low */
++ u16 cfsah; /* 0x00c Command FIFO Start Address High */
++ u16 cfs; /* 0x00e Command FIFO Size */
++ u16 cfws; /* 0x010 Command FIFO Writeable Size */
++ u16 bbie; /* 0x012 BitBLT Interrupt Enable */
++ u16 bbisc; /* 0x014 BitBLT Interrupt Status and Clear */
++ u16 ccs; /* 0x016 Command Count Status */
++ u16 bbes; /* 0x018 BitBLT Execution Status */
++ u16 x01;
++ u16 cmdl; /* 0x01c Command Low */
++ u16 cmdh; /* 0x01e Command High */
++ u16 x02;
++ u16 cfc; /* 0x022 Command FIFO Clear */
++ u16 ccifc; /* 0x024 CMOS Camera IF Control */
++ u16 hwt; /* 0x026 Hardware Test */
++ u16 x03[0x6c];
++ u16 lcdccrc;/* 0x100 LCDC Clock and Reset Control */
++ u16 lcdcc; /* 0x102 LCDC Control */
++ u16 lcdcopc;/* 0x104 LCDC Output Pin Control */
++ u16 x04;
++ u16 lcdis; /* 0x108 LCD Interrupt Status */
++ u16 lcdim; /* 0x10a LCD Interrupt Mask */
++ u16 lcdie; /* 0x10c LCD Interrupt Enable */
++ u16 x05[10];
++ u16 gdsal; /* 0x122 Graphics Display Start Address Low */
++ u16 gdsah; /* 0x124 Graphics Display Start Address High */
++ u16 x06[2];
++ u16 vhpcl; /* 0x12a VRAM Horizontal Pixel Count Low */
++ u16 vhpch; /* 0x12c VRAM Horizontal Pixel Count High */
++ u16 gm; /* 0x12e Graphic Mode(VRAM access enable) */
++ u16 x07[8];
++ u16 ht; /* 0x140 Horizontal Total */
++ u16 hds; /* 0x142 Horizontal Display Start */
++ u16 hss; /* 0x144 H-Sync Start */
++ u16 hse; /* 0x146 H-Sync End */
++ u16 x08[2];
++ u16 hnp; /* 0x14c Horizontal Number of Pixels */
++ u16 x09;
++ u16 vt; /* 0x150 Vertical Total */
++ u16 vds; /* 0x152 Vertical Display Start */
++ u16 vss; /* 0x154 V-Sync Start */
++ u16 vse; /* 0x156 V-Sync End */
++ u16 x0a[4];
++ u16 cdln; /* 0x160 Current Display Line Number */
++ u16 iln; /* 0x162 Interrupt Line Number */
++ u16 sp; /* 0x164 Sync Polarity */
++ u16 misc; /* 0x166 MISC(RGB565 mode) */
++ u16 x0b;
++ u16 vihss; /* 0x16a Video Interface H-Sync Start */
++ u16 vivs; /* 0x16c Video Interface Vertical Start */
++ u16 vive; /* 0x16e Video Interface Vertical End */
++ u16 vivss; /* 0x170 Video Interface V-Sync Start */
++ u16 x0c[6];
++ u16 vccis; /* 0x17e Video / CMOS Camera Interface Select */
++ u16 vidwsal;/* 0x180 VI Data Write Start Address Low */
++ u16 vidwsah;/* 0x182 VI Data Write Start Address High */
++ u16 vidrsal;/* 0x184 VI Data Read Start Address Low */
++ u16 vidrsah;/* 0x186 VI Data Read Start Address High */
++ u16 vipddst;/* 0x188 VI Picture Data Display Start Timing */
++ u16 vipddet;/* 0x186 VI Picture Data Display End Timing */
++ u16 vie; /* 0x18c Video Interface Enable */
++ u16 vcs; /* 0x18e Video/Camera Select */
++ u16 x0d[2];
++ u16 vphwc; /* 0x194 Video Picture Horizontal Wait Count */
++ u16 vphs; /* 0x196 Video Picture Horizontal Size */
++ u16 vpvwc; /* 0x198 Video Picture Vertical Wait Count */
++ u16 vpvs; /* 0x19a Video Picture Vertical Size */
++ u16 x0e[2];
++ u16 plhpix; /* 0x1a0 PLHPIX */
++ u16 xs; /* 0x1a2 XStart */
++ u16 xckhw; /* 0x1a4 XCK High Width */
++ u16 x0f;
++ u16 sths; /* 0x1a8 STH Start */
++ u16 vt2; /* 0x1aa Vertical Total */
++ u16 ycksw; /* 0x1ac YCK Start Wait */
++ u16 ysts; /* 0x1ae YST Start */
++ u16 ppols; /* 0x1b0 #PPOL Start */
++ u16 precw; /* 0x1b2 PREC Width */
++ u16 vclkhw; /* 0x1b4 VCLK High Width */
++ u16 oc; /* 0x1b6 Output Control */
++ u16 x10[0x24];
++};
++static char *mode_option __devinitdata;
++
++struct tmiofb_par {
++ u32 pseudo_palette[16];
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++ wait_queue_head_t wait_acc;
++ bool use_polling;
++#endif
++
++ struct tmio_lhccr __iomem *ccr;
++ struct tmio_lcr __iomem *lcr;
++ void __iomem *vram;
++};
++
++/*--------------------------------------------------------------------------*/
++
++static irqreturn_t tmiofb_irq(int irq, void *__info);
++
++/*--------------------------------------------------------------------------*/
++
++
++/*
++ * Turns off the LCD controller and LCD host controller.
++ */
++static int tmiofb_hw_stop(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_fb_data *data = cell->driver_data;
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct tmiofb_par *par = info->par;
++ struct tmio_lhccr __iomem *ccr = par->ccr;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++
++ iowrite16(0, &ccr->ugcc);
++ iowrite16(0, &lcr->gm);
++ data->lcd_set_power(dev, 0);
++ iowrite16(0x0010, &lcr->lcdccrc);
++
++ return 0;
++}
++
++/*
++ * Initializes the LCD host controller.
++ */
++static int tmiofb_hw_init(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_fb_data *data = cell->driver_data;
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct tmiofb_par *par = info->par;
++ struct tmio_lhccr __iomem *ccr = par->ccr;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ const struct resource *nlcr = NULL;
++ const struct resource *vram = NULL;
++ unsigned long base;
++ int i;
++
++ for (i = 0; i < cell->num_resources; i++) {
++ if (!strcmp((cell->resources+i)->name, TMIO_FB_CONTROL))
++ nlcr = &cell->resources[i];
++ if (!strcmp((cell->resources+i)->name, TMIO_FB_VRAM))
++ vram = &cell->resources[i];
++ }
++
++ if (nlcr == NULL || vram == NULL)
++ return -EINVAL;
++
++ base = nlcr->start;
++
++ if (info->mode == NULL) {
++ printk(KERN_ERR "tmio-fb: null info->mode\n");
++ info->mode = data->modes;
++ }
++
++ data->lcd_mode(dev, info->mode);
++
++ iowrite16(0x003a, &ccr->ugcc);
++ iowrite16(0x003a, &ccr->gcc);
++ iowrite16(0x3f00, &ccr->usc);
++
++ data->lcd_set_power(dev, 1);
++ mdelay(2);
++
++ iowrite16(0x0000, &ccr->usc);
++ iowrite16(base >> 16, &ccr->baseh);
++ iowrite16(base, &ccr->basel);
++ iowrite16(0x0002, &ccr->cmd); /* base address enable */
++ iowrite16(0x40a8, &ccr->vramrtc); /* VRAMRC, VRAMTC */
++ iowrite16(0x0018, &ccr->vramsac); /* VRAMSTS, VRAMAC */
++ iowrite16(0x0002, &ccr->vrambc);
++ mdelay(2);
++ iowrite16(0x000b, &ccr->vrambc);
++
++ base = vram->start + info->screen_size;
++ iowrite16(base >> 16, &lcr->cfsah);
++ iowrite16(base, &lcr->cfsal);
++ iowrite16(TMIOFB_FIFO_SIZE - 1, &lcr->cfs);
++ iowrite16(1, &lcr->cfc);
++ iowrite16(1, &lcr->bbie);
++ iowrite16(0, &lcr->cfws);
++
++ return 0;
++}
++
++/*
++ * Sets the LCD controller's output resolution and pixel clock
++ */
++static void tmiofb_hw_mode(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_fb_data *data = cell->driver_data;
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct fb_videomode *mode = info->mode;
++ struct tmiofb_par *par = info->par;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ unsigned int i;
++
++ iowrite16(0, &lcr->gm);
++ data->lcd_set_power(dev, 0);
++ iowrite16(0x0010, &lcr->lcdccrc);
++ data->lcd_mode(dev, mode);
++ data->lcd_set_power(dev, 1);
++
++ iowrite16(i = mode->xres * 2, &lcr->vhpn);
++ iowrite16(0, &lcr->gdsah);
++ iowrite16(0, &lcr->gdsal);
++ iowrite16(i >> 16, &lcr->vhpch);
++ iowrite16(i, &lcr->vhpcl);
++ iowrite16(i = 0, &lcr->hss);
++ iowrite16(i += mode->hsync_len, &lcr->hse);
++ iowrite16(i += mode->left_margin, &lcr->hds);
++ iowrite16(i += mode->xres + mode->right_margin, &lcr->ht);
++ iowrite16(mode->xres, &lcr->hnp);
++ iowrite16(i = 0, &lcr->vss);
++ iowrite16(i += mode->vsync_len, &lcr->vse);
++ iowrite16(i += mode->upper_margin, &lcr->vds);
++ iowrite16(i += mode->yres, &lcr->iln);
++ iowrite16(i += mode->lower_margin, &lcr->vt);
++ iowrite16(3, /* RGB565 mode */ &lcr->misc);
++ iowrite16(1, /* VRAM enable */ &lcr->gm);
++ iowrite16(0x4007, &lcr->lcdcc);
++ iowrite16(3, /* sync polarity */ &lcr->sp);
++
++ iowrite16(0x0010, &lcr->lcdccrc);
++ mdelay(5);
++ iowrite16(0x0014, &lcr->lcdccrc); /* STOP_CKP */
++ mdelay(5);
++ iowrite16(0x0015, &lcr->lcdccrc); /* STOP_CKP | SOFT_RESET */
++ iowrite16(0xfffa, &lcr->vcs);
++}
++
++/*--------------------------------------------------------------------------*/
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++static int __must_check
++tmiofb_acc_wait(struct fb_info *info, unsigned int ccs)
++{
++ struct tmiofb_par *par = info->par;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ if (in_atomic() || par->use_polling) {
++ int i = 0;
++ while (ioread16(&lcr->ccs) > ccs) {
++ udelay(1);
++ i++;
++ if (i > 10000) {
++ printk(KERN_ERR "tmiofb: timeout waiting for %d\n", ccs);
++ return -ETIMEDOUT;
++ }
++ tmiofb_irq(-1, info);
++ }
++ } else {
++ if (!wait_event_interruptible_timeout(par->wait_acc,
++ ioread16(&par->lcr->ccs) <= ccs, 1000)) {
++ printk(KERN_ERR "tmiofb: timeout waiting for %d\n", ccs);
++ return -ETIMEDOUT;
++ }
++ }
++
++ return 0;
++}
++
++/*
++ * Writes an accelerator command to the accelerator's FIFO.
++ */
++static int
++tmiofb_acc_write(struct fb_info *info, const u32 *cmd, unsigned int count)
++{
++ struct tmiofb_par *par = info->par;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ int ret;
++
++ ret = tmiofb_acc_wait(info, TMIOFB_FIFO_SIZE - count);
++ if (ret)
++ return ret;
++
++ for (; count; count--, cmd++) {
++ iowrite16(*cmd >> 16, &lcr->cmdh);
++ iowrite16(*cmd, &lcr->cmdl);
++ }
++
++ return ret;
++}
++
++/*
++ * Wait for the accelerator to finish its operations before writing
++ * to the framebuffer for consistent display output.
++ */
++static int tmiofb_sync(struct fb_info *fbi)
++{
++ struct tmiofb_par *par = fbi->par;
++
++ int ret;
++ int i = 0;
++
++ ret = tmiofb_acc_wait(fbi, 0);
++
++ while (ioread16(&par->lcr->bbes) & 2) { /* blit active */
++ udelay(1);
++ i++ ;
++ if (i > 10000) {
++ printk(KERN_ERR "timeout waiting for blit to end!\n");
++ return -ETIMEDOUT;
++ }
++ }
++
++ return ret;
++}
++
++static void
++tmiofb_fillrect(struct fb_info *fbi, const struct fb_fillrect *rect)
++{
++ const u32 cmd [] = {
++ TMIOFB_ACC_DSADR((rect->dy * fbi->mode->xres + rect->dx) * 2),
++ TMIOFB_ACC_DHPIX(rect->width - 1),
++ TMIOFB_ACC_DVPIX(rect->height - 1),
++ TMIOFB_ACC_FILL(rect->color),
++ TMIOFB_ACC_FLGO,
++ };
++
++ if (fbi->state != FBINFO_STATE_RUNNING ||
++ fbi->flags & FBINFO_HWACCEL_DISABLED) {
++ cfb_fillrect(fbi, rect);
++ return;
++ }
++
++ tmiofb_acc_write(fbi, cmd, ARRAY_SIZE(cmd));
++}
++
++static void
++tmiofb_copyarea(struct fb_info *fbi, const struct fb_copyarea *area)
++{
++ const u32 cmd [] = {
++ TMIOFB_ACC_DSADR((area->dy * fbi->mode->xres + area->dx) * 2),
++ TMIOFB_ACC_DHPIX(area->width - 1),
++ TMIOFB_ACC_DVPIX(area->height - 1),
++ TMIOFB_ACC_SSADR((area->sy * fbi->mode->xres + area->sx) * 2),
++ TMIOFB_ACC_SCGO,
++ };
++
++ if (fbi->state != FBINFO_STATE_RUNNING ||
++ fbi->flags & FBINFO_HWACCEL_DISABLED) {
++ cfb_copyarea(fbi, area);
++ return;
++ }
++
++ tmiofb_acc_write(fbi, cmd, ARRAY_SIZE(cmd));
++}
++#endif
++
++static void tmiofb_clearscreen(struct fb_info *info)
++{
++ const struct fb_fillrect rect = {
++ .dx = 0,
++ .dy = 0,
++ .width = info->mode->xres,
++ .height = info->mode->yres,
++ .color = 0,
++ };
++
++ info->fbops->fb_fillrect(info, &rect);
++}
++
++static int tmiofb_vblank(struct fb_info *fbi, struct fb_vblank *vblank)
++{
++ struct tmiofb_par *par = fbi->par;
++ struct fb_videomode *mode = fbi->mode;
++ unsigned int vcount = ioread16(&par->lcr->cdln);
++ unsigned int vds = mode->vsync_len + mode->upper_margin;
++
++ vblank->vcount = vcount;
++ vblank->flags = FB_VBLANK_HAVE_VBLANK | FB_VBLANK_HAVE_VCOUNT
++ | FB_VBLANK_HAVE_VSYNC;
++
++ if (vcount < mode->vsync_len)
++ vblank->flags |= FB_VBLANK_VSYNCING;
++
++ if (vcount < vds || vcount > vds + mode->yres)
++ vblank->flags |= FB_VBLANK_VBLANKING;
++
++ return 0;
++}
++
++
++static int tmiofb_ioctl(struct fb_info *fbi,
++ unsigned int cmd, unsigned long arg)
++{
++ switch (cmd) {
++ case FBIOGET_VBLANK: {
++ struct fb_vblank vblank = {0};
++ void __user *argp = (void __user *) arg;
++
++ tmiofb_vblank(fbi, &vblank);
++ if (copy_to_user(argp, &vblank, sizeof vblank))
++ return -EFAULT;
++ return 0;
++ }
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++ case FBIO_TMIO_ACC_SYNC:
++ tmiofb_sync(fbi);
++ return 0;
++
++ case FBIO_TMIO_ACC_WRITE: {
++ u32 __user *argp = (void __user *) arg;
++ u32 len;
++ u32 acc [16];
++
++ if (copy_from_user(&len, argp, sizeof(u32)))
++ return -EFAULT;
++ if (len > ARRAY_SIZE(acc))
++ return -EINVAL;
++ if (copy_from_user(acc, argp + 1, sizeof(u32) * len))
++ return -EFAULT;
++
++ return tmiofb_acc_write(fbi, acc, len);
++ }
++#endif
++ }
++
++ return -EINVAL;
++}
++
++/*--------------------------------------------------------------------------*/
++
++/* Select the smallest mode that allows the desired resolution to be
++ * displayed. If desired, the x and y parameters can be rounded up to
++ * match the selected mode.
++ */
++static struct fb_videomode*
++tmiofb_find_mode(struct fb_info *info, struct fb_var_screeninfo *var)
++{
++ struct mfd_cell *cell = mfd_get_cell(to_platform_device(info->device));
++ struct tmio_fb_data *data = cell->driver_data;
++ struct fb_videomode *best = NULL;
++ int i;
++
++ for (i = 0; i < data->num_modes; i++) {
++ struct fb_videomode *mode = data->modes + i;
++
++ if (mode->xres >= var->xres && mode->yres >= var->yres
++ && (!best || (mode->xres < best->xres
++ && mode->yres < best->yres)))
++ best = mode;
++ }
++
++ return best;
++}
++
++static int tmiofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
++{
++
++ struct fb_videomode *mode;
++
++ mode = tmiofb_find_mode(info, var);
++ if (!mode || var->bits_per_pixel > 16)
++ return -EINVAL;
++
++ fb_videomode_to_var(var, mode);
++
++ var->xres_virtual = mode->xres;
++ var->yres_virtual = info->screen_size / (mode->xres * 2);
++ var->xoffset = 0;
++ var->yoffset = 0;
++ var->bits_per_pixel = 16;
++ var->grayscale = 0;
++ var->red.offset = 11; var->red.length = 5;
++ var->green.offset = 5; var->green.length = 6;
++ var->blue.offset = 0; var->blue.length = 5;
++ var->transp.offset = 0; var->transp.length = 0;
++ var->nonstd = 0;
++ var->height = 82; /* mm */
++ var->width = 60; /* mm */
++ var->rotate = 0;
++ return 0;
++}
++
++static int tmiofb_set_par(struct fb_info *info)
++{
++/* struct fb_var_screeninfo *var = &info->var;
++ struct fb_videomode *mode;
++
++ mode = tmiofb_find_mode(info, var);
++ if (!mode)
++ return -EINVAL;
++
++ if (info->mode == mode)
++ return 0;
++
++ info->mode = mode; */
++ info->fix.line_length = info->mode->xres * 2;
++
++ tmiofb_hw_mode(to_platform_device(info->device));
++ tmiofb_clearscreen(info);
++ return 0;
++}
++
++static int tmiofb_setcolreg(unsigned regno, unsigned red, unsigned green,
++ unsigned blue, unsigned transp,
++ struct fb_info *info)
++{
++ struct tmiofb_par *par = info->par;
++
++ if (regno < ARRAY_SIZE(par->pseudo_palette)) {
++ par->pseudo_palette [regno] =
++ ((red & 0xf800)) |
++ ((green & 0xfc00) >> 5) |
++ ((blue & 0xf800) >> 11);
++ return 0;
++ }
++
++ return 1;
++}
++
++static struct fb_ops tmiofb_ops = {
++ .owner = THIS_MODULE,
++
++ .fb_ioctl = tmiofb_ioctl,
++ .fb_check_var = tmiofb_check_var,
++ .fb_set_par = tmiofb_set_par,
++ .fb_setcolreg = tmiofb_setcolreg,
++ .fb_imageblit = cfb_imageblit,
++#ifdef CONFIG_FB_TMIO_ACCELL
++ .fb_sync = tmiofb_sync,
++ .fb_fillrect = tmiofb_fillrect,
++ .fb_copyarea = tmiofb_copyarea,
++#else
++ .fb_fillrect = cfb_fillrect,
++ .fb_copyarea = cfb_copyarea,
++#endif
++};
++
++/*--------------------------------------------------------------------------*/
++
++/*
++ * reasons for an interrupt:
++ * uis bbisc lcdis
++ * 0100 0001 accelerator command completed
++ * 2000 0001 vsync start
++ * 2000 0002 display start
++ * 2000 0004 line number match(0x1ff mask???)
++ */
++static irqreturn_t tmiofb_irq(int irq, void *__info)
++{
++ struct fb_info *info = __info;
++ struct tmiofb_par *par = info->par;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++ unsigned int bbisc = ioread16(&lcr->bbisc);
++
++
++ if (unlikely(par->use_polling && irq != -1)) {
++ printk(KERN_INFO "tmiofb: switching to waitq\n");
++ par->use_polling = false;
++ }
++
++ iowrite16(bbisc, &lcr->bbisc);
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++ if (bbisc & 1)
++ wake_up(&par->wait_acc);
++#endif
++
++ return IRQ_HANDLED;
++}
++
++static int tmiofb_probe(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_fb_data *data = cell->driver_data;
++ struct resource *ccr = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_FB_CONFIG);
++ struct resource *lcr = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_FB_CONTROL);
++ struct resource *vram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_FB_VRAM);
++ int irq = platform_get_irq(dev, 0);
++ struct fb_info *info;
++ struct tmiofb_par *par;
++ int retval;
++
++ if (data == NULL) {
++ dev_err(&dev->dev, "NULL platform data!\n");
++ return -EINVAL;
++ }
++
++ info = framebuffer_alloc(sizeof(struct tmiofb_par), &dev->dev);
++
++ if (!info) {
++ retval = -ENOMEM;
++ goto err_framebuffer_alloc;
++ }
++
++ par = info->par;
++ platform_set_drvdata(dev, info);
++
++#ifdef CONFIG_FB_TMIO_ACCELL
++ init_waitqueue_head(&par->wait_acc);
++
++ par->use_polling = true;
++
++ info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_COPYAREA
++ | FBINFO_HWACCEL_FILLRECT;
++#else
++ info->flags = FBINFO_DEFAULT;
++#endif
++
++ info->fbops = &tmiofb_ops;
++
++ strcpy(info->fix.id, "tmio-fb");
++ info->fix.smem_start = vram->start;
++ info->fix.smem_len = vram->end - vram->start + 1;
++ info->fix.type = FB_TYPE_PACKED_PIXELS;
++ info->fix.visual = FB_VISUAL_TRUECOLOR;
++ info->fix.mmio_start = lcr->start;
++ info->fix.mmio_len = lcr->end - lcr->start + 1;
++ info->fix.accel = FB_ACCEL_NONE;
++ info->screen_size = info->fix.smem_len - (4 * TMIOFB_FIFO_SIZE);
++ info->pseudo_palette = par->pseudo_palette;
++
++ par->ccr = ioremap(ccr->start, ccr->end - ccr->start + 1);
++ if (!par->ccr) {
++ retval = -ENOMEM;
++ goto err_ioremap_ccr;
++ }
++
++ par->lcr = ioremap(info->fix.mmio_start, info->fix.mmio_len);
++ if (!par->lcr) {
++ retval = -ENOMEM;
++ goto err_ioremap_lcr;
++ }
++
++ par->vram = ioremap(info->fix.smem_start, info->fix.smem_len);
++ if (!par->vram) {
++ retval = -ENOMEM;
++ goto err_ioremap_vram;
++ }
++ info->screen_base = par->vram;
++
++ retval = request_irq(irq, &tmiofb_irq, IRQF_DISABLED,
++ dev->dev.bus_id, info);
++
++ if (retval)
++ goto err_request_irq;
++
++ retval = fb_find_mode(&info->var, info, mode_option,
++ data->modes, data->num_modes,
++ data->modes, 16);
++ if (!retval) {
++ retval = -EINVAL;
++ goto err_find_mode;
++ }
++
++ retval = cell->enable(dev);
++ if (retval)
++ goto err_enable;
++
++ retval = tmiofb_hw_init(dev);
++ if (retval)
++ goto err_hw_init;
++
++/* retval = tmiofb_set_par(info);
++ if (retval)
++ goto err_set_par;*/
++
++ retval = register_framebuffer(info);
++ if (retval < 0)
++ goto err_register_framebuffer;
++
++ printk(KERN_INFO "fb%d: %s frame buffer device\n",
++ info->node, info->fix.id);
++
++ return 0;
++
++err_register_framebuffer:
++/*err_set_par:*/
++ tmiofb_hw_stop(dev);
++err_hw_init:
++ cell->disable(dev);
++err_enable:
++err_find_mode:
++ free_irq(irq, info);
++err_request_irq:
++ iounmap(par->vram);
++err_ioremap_vram:
++ iounmap(par->lcr);
++err_ioremap_lcr:
++ iounmap(par->ccr);
++err_ioremap_ccr:
++ platform_set_drvdata(dev, NULL);
++ framebuffer_release(info);
++err_framebuffer_alloc:
++ return retval;
++}
++
++static int __devexit tmiofb_remove(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct fb_info *info = platform_get_drvdata(dev);
++ int irq = platform_get_irq(dev, 0);
++ struct tmiofb_par *par;
++
++ if (info) {
++ par = info->par;
++ unregister_framebuffer(info);
++
++ tmiofb_hw_stop(dev);
++
++ cell->disable(dev);
++
++ free_irq(irq, info);
++
++ iounmap(par->vram);
++ iounmap(par->lcr);
++ iounmap(par->ccr);
++
++ framebuffer_release(info);
++ platform_set_drvdata(dev, NULL);
++ }
++
++ return 0;
++}
++
++#if 0
++static void tmiofb_dump_regs(struct platform_device *dev)
++{
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct tmiofb_par *par = info->par;
++ struct tmio_lhccr __iomem *ccr = par->ccr;
++ struct tmio_lcr __iomem *lcr = par->lcr;
++
++ printk("lhccr:\n");
++#define CCR_PR(n) printk("\t" #n " = \t%04x\n", ioread16(&ccr->n));
++ CCR_PR(cmd);
++ CCR_PR(revid);
++ CCR_PR(basel);
++ CCR_PR(baseh);
++ CCR_PR(ugcc);
++ CCR_PR(gcc);
++ CCR_PR(usc);
++ CCR_PR(vramrtc);
++ CCR_PR(vramsac);
++ CCR_PR(vrambc);
++#undef CCR_PR
++
++ printk("lcr: \n");
++#define LCR_PR(n) printk("\t" #n " = \t%04x\n", ioread16(&lcr->n));
++ LCR_PR(uis);
++ LCR_PR(vhpn);
++ LCR_PR(cfsal);
++ LCR_PR(cfsah);
++ LCR_PR(cfs);
++ LCR_PR(cfws);
++ LCR_PR(bbie);
++ LCR_PR(bbisc);
++ LCR_PR(ccs);
++ LCR_PR(bbes);
++ LCR_PR(cmdl);
++ LCR_PR(cmdh);
++ LCR_PR(cfc);
++ LCR_PR(ccifc);
++ LCR_PR(hwt);
++ LCR_PR(lcdccrc);
++ LCR_PR(lcdcc);
++ LCR_PR(lcdcopc);
++ LCR_PR(lcdis);
++ LCR_PR(lcdim);
++ LCR_PR(lcdie);
++ LCR_PR(gdsal);
++ LCR_PR(gdsah);
++ LCR_PR(vhpcl);
++ LCR_PR(vhpch);
++ LCR_PR(gm);
++ LCR_PR(ht);
++ LCR_PR(hds);
++ LCR_PR(hss);
++ LCR_PR(hse);
++ LCR_PR(hnp);
++ LCR_PR(vt);
++ LCR_PR(vds);
++ LCR_PR(vss);
++ LCR_PR(vse);
++ LCR_PR(cdln);
++ LCR_PR(iln);
++ LCR_PR(sp);
++ LCR_PR(misc);
++ LCR_PR(vihss);
++ LCR_PR(vivs);
++ LCR_PR(vive);
++ LCR_PR(vivss);
++ LCR_PR(vccis);
++ LCR_PR(vidwsal);
++ LCR_PR(vidwsah);
++ LCR_PR(vidrsal);
++ LCR_PR(vidrsah);
++ LCR_PR(vipddst);
++ LCR_PR(vipddet);
++ LCR_PR(vie);
++ LCR_PR(vcs);
++ LCR_PR(vphwc);
++ LCR_PR(vphs);
++ LCR_PR(vpvwc);
++ LCR_PR(vpvs);
++ LCR_PR(plhpix);
++ LCR_PR(xs);
++ LCR_PR(xckhw);
++ LCR_PR(sths);
++ LCR_PR(vt2);
++ LCR_PR(ycksw);
++ LCR_PR(ysts);
++ LCR_PR(ppols);
++ LCR_PR(precw);
++ LCR_PR(vclkhw);
++ LCR_PR(oc);
++#undef LCR_PR
++}
++#endif
++
++#ifdef CONFIG_PM
++static int tmiofb_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct tmiofb_par *par = info->par;
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ int retval = 0;
++
++ acquire_console_sem();
++
++ fb_set_suspend(info, 1);
++
++ if (info->fbops->fb_sync)
++ info->fbops->fb_sync(info);
++
++
++ printk(KERN_INFO "tmiofb: switching to polling\n");
++ par->use_polling = true;
++ tmiofb_hw_stop(dev);
++
++ if (cell->suspend)
++ retval = cell->suspend(dev);
++
++ release_console_sem();
++
++ return retval;
++}
++
++static int tmiofb_resume(struct platform_device *dev)
++{
++ struct fb_info *info = platform_get_drvdata(dev);
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ int retval;
++
++ acquire_console_sem();
++
++ if (cell->resume) {
++ retval = cell->resume(dev);
++ if (retval)
++ return retval;
++ }
++
++ tmiofb_irq(-1, info);
++
++ tmiofb_hw_init(dev);
++
++ tmiofb_hw_mode(dev);
++
++ fb_set_suspend(info, 0);
++ release_console_sem();
++ return 0;
++}
++#endif
++
++static struct platform_driver tmiofb_driver = {
++ .driver.name = "tmio-fb",
++ .driver.owner = THIS_MODULE,
++ .probe = tmiofb_probe,
++ .remove = __devexit_p(tmiofb_remove),
++#ifdef CONFIG_PM
++ .suspend = tmiofb_suspend,
++ .resume = tmiofb_resume,
++#endif
++};
++
++/*--------------------------------------------------------------------------*/
++
++#ifndef MODULE
++static void __init tmiofb_setup(char *options)
++{
++ char *this_opt;
++
++ if (!options || !*options)
++ return;
++
++ while ((this_opt = strsep(&options, ",")) != NULL) {
++ if (!*this_opt) continue;
++ /*
++ * FIXME
++ */
++ }
++}
++#endif
++
++static int __init tmiofb_init(void)
++{
++#ifndef MODULE
++ char *option = NULL;
++
++ if (fb_get_options("tmiofb", &option))
++ return -ENODEV;
++ tmiofb_setup(option);
++#endif
++ return platform_driver_register(&tmiofb_driver);
++}
++
++static void __exit tmiofb_cleanup(void)
++{
++ platform_driver_unregister(&tmiofb_driver);
++}
++
++module_init(tmiofb_init);
++module_exit(tmiofb_cleanup);
++
++MODULE_DESCRIPTION("TMIO framebuffer driver");
++MODULE_AUTHOR("Chris Humbert, Dirk Opfer, Dmitry Baryshkov");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0010-OHCI-driver-for-TMIO-devices.patch b/packages/linux/linux-rp-2.6.24/tosa/0010-OHCI-driver-for-TMIO-devices.patch
new file mode 100644
index 0000000000..f358c069d0
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0010-OHCI-driver-for-TMIO-devices.patch
@@ -0,0 +1,431 @@
+From e5f06830bc8d3ef4792c9c0569825d0347b39852 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Fri, 4 Jan 2008 18:43:31 +0000
+Subject: [PATCH 10/64] OHCI driver for TMIO devices
+
+---
+ drivers/usb/Kconfig | 1 +
+ drivers/usb/host/Kconfig | 1 +
+ drivers/usb/host/ohci-hcd.c | 5 +
+ drivers/usb/host/ohci-tmio.c | 369 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 376 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/usb/host/ohci-tmio.c
+
+diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig
+index 7580aa5..8912042 100644
+--- a/drivers/usb/Kconfig
++++ b/drivers/usb/Kconfig
+@@ -36,6 +36,7 @@ config USB_ARCH_HAS_OHCI
+ default y if ARCH_EP93XX
+ default y if ARCH_AT91
+ default y if ARCH_PNX4008
++ default y if MFD_TC6393XB
+ # PPC:
+ default y if STB03xxx
+ default y if PPC_MPC52xx
+diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
+index 49a91c5..5ae3589 100644
+--- a/drivers/usb/host/Kconfig
++++ b/drivers/usb/host/Kconfig
+@@ -101,6 +101,7 @@ config USB_OHCI_HCD
+ depends on USB && USB_ARCH_HAS_OHCI
+ select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3
+ select I2C if ARCH_PNX4008
++ select DMABOUNCE if MFD_TC6393XB
+ ---help---
+ The Open Host Controller Interface (OHCI) is a standard for accessing
+ USB 1.1 host controller hardware. It does more in hardware than Intel's
+diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
+index ecfe800..77abf3e 100644
+--- a/drivers/usb/host/ohci-hcd.c
++++ b/drivers/usb/host/ohci-hcd.c
+@@ -1043,6 +1043,11 @@ MODULE_LICENSE ("GPL");
+ #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
+ #endif
+
++#ifdef CONFIG_MFD_TC6393XB
++#include "ohci-tmio.c"
++#define PLATFORM_DRIVER ohci_hcd_tmio_driver
++#endif
++
+ #ifdef CONFIG_USB_OHCI_HCD_SSB
+ #include "ohci-ssb.c"
+ #define SSB_OHCI_DRIVER ssb_ohci_driver
+diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
+new file mode 100644
+index 0000000..be609f3
+--- /dev/null
++++ b/drivers/usb/host/ohci-tmio.c
+@@ -0,0 +1,369 @@
++/*
++ * OHCI HCD(Host Controller Driver) for USB.
++ *
++ *(C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
++ *(C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
++ *(C) Copyright 2002 Hewlett-Packard Company
++ *
++ * Bus glue for Toshiba Mobile IO(TMIO) Controller's OHCI core
++ *(C) Copyright 2005 Chris Humbert <mahadri-usb@drigon.com>
++ *
++ * This is known to work with the following variants:
++ * TC6393XB revision 3 (32kB SRAM)
++ *
++ * The TMIO's OHCI core DMAs through a small internal buffer that
++ * is directly addressable by the CPU. dma_declare_coherent_memory
++ * and DMA bounce buffers allow the higher-level OHCI host driver to
++ * work. However, the dma API doesn't handle dma mapping failures
++ * well(dma_sg_map() is a prime example), so it is unusable.
++ *
++ * This HC pretends be a PIO-ish controller and uses the kernel's
++ * generic allocator for the entire SRAM. Using the USB core's
++ * usb_operations, we provide hcd_buffer_alloc/free. Using the OHCI's
++ * ohci_ops, we provide memory management for OHCI's TDs and EDs. We
++ * internally queue a URB's TDs until enough dma memory is available
++ * to enqueue them with the HC.
++ *
++ * Written from sparse documentation from Toshiba and Sharp's driver
++ * for the 2.4 kernel,
++ * usb-ohci-tc6393.c(C) Copyright 2004 Lineo Solutions, Inc.
++ *
++ * 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.
++ */
++
++/*#include <linux/fs.h>
++#include <linux/mount.h>
++#include <linux/pagemap.h>
++#include <linux/init.h>
++#include <linux/namei.h>
++#include <linux/sched.h>*/
++#include <linux/platform_device.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++#include <linux/dma-mapping.h>
++
++/*-------------------------------------------------------------------------*/
++
++/*
++ * USB Host Controller Configuration Register
++ */
++struct tmio_uhccr {
++ u8 x00[8];
++ u8 revid; /* 0x08 Revision ID */
++ u8 x01[7];
++ u16 basel; /* 0x10 USB Control Register Base Address Low */
++ u16 baseh; /* 0x12 USB Control Register Base Address High */
++ u8 x02[0x2c];
++ u8 ilme; /* 0x40 Internal Local Memory Enable */
++ u8 x03[0x0b];
++ u16 pm; /* 0x4c Power Management */
++ u8 x04[2];
++ u8 intc; /* 0x50 INT Control */
++ u8 x05[3];
++ u16 lmw1l; /* 0x54 Local Memory Window 1 LMADRS Low */
++ u16 lmw1h; /* 0x56 Local Memory Window 1 LMADRS High */
++ u16 lmw1bl; /* 0x58 Local Memory Window 1 Base Address Low */
++ u16 lmw1bh; /* 0x5A Local Memory Window 1 Base Address High */
++ u16 lmw2l; /* 0x5C Local Memory Window 2 LMADRS Low */
++ u16 lmw2h; /* 0x5E Local Memory Window 2 LMADRS High */
++ u16 lmw2bl; /* 0x60 Local Memory Window 2 Base Address Low */
++ u16 lmw2bh; /* 0x62 Local Memory Window 2 Base Address High */
++ u8 x06[0x98];
++ u8 misc; /* 0xFC MISC */
++ u8 x07[3];
++} __attribute__((packed));
++
++#define UHCCR_PM_GKEN 0x0001
++#define UHCCR_PM_CKRNEN 0x0002
++#define UHCCR_PM_USBPW1 0x0004
++#define UHCCR_PM_USBPW2 0x0008
++#define UHCCR_PM_PMEE 0x0100
++#define UHCCR_PM_PMES 0x8000
++
++/*-------------------------------------------------------------------------*/
++
++struct tmio_hcd {
++ struct tmio_uhccr __iomem *ccr;
++};
++
++#define hcd_to_tmio(hcd) ((struct tmio_hcd *)(hcd_to_ohci(hcd) + 1))
++#define ohci_to_tmio(ohci) ((struct tmio_hcd *)(ohci + 1))
++
++/*-------------------------------------------------------------------------*/
++
++static void tmio_stop_hc(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ u16 pm;
++
++ pm = UHCCR_PM_GKEN | UHCCR_PM_CKRNEN | UHCCR_PM_USBPW1 | UHCCR_PM_USBPW2;
++ iowrite8(0, &ccr->intc);
++ iowrite8(0, &ccr->ilme);
++ iowrite16(0, &ccr->basel);
++ iowrite16(0, &ccr->baseh);
++ iowrite16(pm, &ccr->pm);
++
++ cell->disable(dev);
++}
++
++static void tmio_start_hc(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ u16 pm;
++ unsigned long base = hcd->rsrc_start;
++
++ pm = UHCCR_PM_CKRNEN | UHCCR_PM_GKEN | UHCCR_PM_PMEE | UHCCR_PM_PMES;
++ cell->enable(dev);
++
++ iowrite16(pm, &ccr->pm);
++ iowrite16(base, &ccr->basel);
++ iowrite16(base >> 16, &ccr->baseh);
++ iowrite8(1, &ccr->ilme);
++ iowrite8(2, &ccr->intc);
++
++ dev_info(&dev->dev, "revision %d @ 0x%08llx, irq %d\n",
++ ioread8(&ccr->revid), hcd->rsrc_start, hcd->irq);
++}
++
++static int usb_hcd_tmio_probe(const struct hc_driver *driver,
++ struct platform_device *dev)
++{
++ struct resource *config = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_CONFIG);
++ struct resource *regs = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_CONTROL);
++ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
++ int irq = platform_get_irq(dev, 0);
++ struct tmio_hcd *tmio;
++ struct ohci_hcd *ohci;
++ struct usb_hcd *hcd;
++ int retval;
++
++ if (usb_disabled())
++ return -ENODEV;
++
++ hcd = usb_create_hcd(driver, &dev->dev, dev->dev.bus_id);
++ if (!hcd) {
++ retval = -ENOMEM;
++ goto err_usb_create_hcd;
++ }
++
++ hcd->rsrc_start = regs->start;
++ hcd->rsrc_len = regs->end - regs->start + 1;
++
++ tmio = hcd_to_tmio(hcd);
++
++ tmio->ccr = ioremap(config->start, config->end - config->start + 1);
++ if (!tmio->ccr) {
++ retval = -ENOMEM;
++ goto err_ioremap_ccr;
++ }
++
++ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
++ if (!hcd->regs) {
++ retval = -ENOMEM;
++ goto err_ioremap_regs;
++ }
++
++ if (dma_declare_coherent_memory(&dev->dev, sram->start,
++ sram->start,
++ sram->end - sram->start + 1,
++ DMA_MEMORY_MAP) != DMA_MEMORY_MAP) {
++ retval = -EBUSY;
++ goto err_dma_declare;
++ }
++
++ retval = dmabounce_register_dev(&dev->dev, 512, 4096);
++ if (retval)
++ goto err_dmabounce_register_dev;
++
++ tmio_start_hc(dev);
++ ohci = hcd_to_ohci(hcd);
++ ohci_hcd_init(ohci);
++
++ retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
++
++ if (retval == 0)
++ return retval;
++
++ tmio_stop_hc(dev);
++
++ dmabounce_unregister_dev(&dev->dev);
++err_dmabounce_register_dev:
++ dma_release_declared_memory(&dev->dev);
++err_dma_declare:
++ iounmap(hcd->regs);
++err_ioremap_regs:
++ iounmap(tmio->ccr);
++err_ioremap_ccr:
++ usb_put_hcd(hcd);
++err_usb_create_hcd:
++
++ return retval;
++}
++
++static void usb_hcd_tmio_remove(struct usb_hcd *hcd, struct platform_device *dev)
++{
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++
++ usb_remove_hcd(hcd);
++ tmio_stop_hc(dev);
++ dmabounce_unregister_dev(&dev->dev);
++ dma_release_declared_memory(&dev->dev);
++ iounmap(hcd->regs);
++ iounmap(tmio->ccr);
++ usb_put_hcd(hcd);
++}
++
++static int __devinit
++ohci_tmio_start(struct usb_hcd *hcd)
++{
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++ int retval;
++
++ if ((retval = ohci_init(ohci)) < 0)
++ return retval;
++
++ if ((retval = ohci_run(ohci)) < 0) {
++ err("can't start %s", hcd->self.bus_name);
++ ohci_stop(hcd);
++ return retval;
++ }
++
++ return 0;
++}
++
++static const struct hc_driver ohci_tmio_hc_driver = {
++ .description = hcd_name,
++ .product_desc = "TMIO OHCI USB Host Controller",
++ .hcd_priv_size = sizeof(struct ohci_hcd) + sizeof (struct tmio_hcd),
++
++ /* generic hardware linkage */
++ .irq = ohci_irq,
++ .flags = HCD_USB11 | HCD_MEMORY,
++
++ /* basic lifecycle operations */
++ .start = ohci_tmio_start,
++ .stop = ohci_stop,
++ .shutdown = ohci_shutdown,
++
++ /* managing i/o requests and associated device resources */
++ .urb_enqueue = ohci_urb_enqueue,
++ .urb_dequeue = ohci_urb_dequeue,
++ .endpoint_disable = ohci_endpoint_disable,
++
++ /* scheduling support */
++ .get_frame_number = ohci_get_frame,
++
++ /* root hub support */
++ .hub_status_data = ohci_hub_status_data,
++ .hub_control = ohci_hub_control,
++ .hub_irq_enable = ohci_rhsc_enable,
++#ifdef CONFIG_PM
++ .bus_suspend = ohci_bus_suspend,
++ .bus_resume = ohci_bus_resume,
++#endif
++ .start_port_reset = ohci_start_port_reset,
++};
++
++/*-------------------------------------------------------------------------*/
++static struct platform_driver ohci_hcd_tmio_driver;
++
++static int
++tmio_dmabounce_check(struct device *dev, dma_addr_t dma, size_t size, void *data)
++{
++ struct resource *sram = data;
++#ifdef DEBUG
++ printk(KERN_ERR "tmio_dmabounce_check: %08x %d\n", dma, size);
++#endif
++
++ if (dev->driver != &ohci_hcd_tmio_driver.driver)
++ return 0;
++
++ if (sram->start <= dma && dma + size <= sram->end)
++ return 0;
++
++ return 1;
++}
++
++static u64 dma_mask = DMA_32BIT_MASK;
++
++static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
++{
++ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
++
++ dev->dev.dma_mask = &dma_mask;
++ dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
++
++ dmabounce_register_checker(tmio_dmabounce_check, sram);
++
++ return usb_hcd_tmio_probe(&ohci_tmio_hc_driver, dev);
++}
++
++static int ohci_hcd_tmio_drv_remove(struct platform_device *dev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
++
++ usb_hcd_tmio_remove(hcd, dev);
++
++ platform_set_drvdata(dev, NULL);
++
++ dmabounce_remove_checker(tmio_dmabounce_check, sram);
++
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int ohci_hcd_tmio_drv_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++
++ if (time_before(jiffies, ohci->next_statechange))
++ msleep(5);
++ ohci->next_statechange = jiffies;
++
++ tmio_stop_hc(dev);
++ hcd->state = HC_STATE_SUSPENDED;
++ dev->dev.power.power_state = PMSG_SUSPEND;
++
++ return 0;
++}
++
++static int ohci_hcd_tmio_drv_resume(struct platform_device *dev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++
++ if (time_before(jiffies, ohci->next_statechange))
++ msleep(5);
++ ohci->next_statechange = jiffies;
++
++ tmio_start_hc(dev);
++
++ dev->dev.power.power_state = PMSG_ON;
++ usb_hcd_resume_root_hub(hcd);
++
++ return 0;
++}
++#endif
++
++static struct platform_driver ohci_hcd_tmio_driver = {
++ .probe = ohci_hcd_tmio_drv_probe,
++ .remove = ohci_hcd_tmio_drv_remove,
++ .shutdown = usb_hcd_platform_shutdown,
++#ifdef CONFIG_PM
++ .suspend = ohci_hcd_tmio_drv_suspend,
++ .resume = ohci_hcd_tmio_drv_resume,
++#endif
++ .driver = {
++ .name = "tmio-ohci",
++ },
++};
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0011-MMC-driver-for-TMIO-devices.patch b/packages/linux/linux-rp-2.6.24/tosa/0011-MMC-driver-for-TMIO-devices.patch
new file mode 100644
index 0000000000..6ff752d1ff
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0011-MMC-driver-for-TMIO-devices.patch
@@ -0,0 +1,891 @@
+From b358a64c1fdd1eb80da57f919c893d910db95e37 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Sat, 29 Dec 2007 15:26:19 +0000
+Subject: [PATCH 11/64] MMC driver for TMIO devices
+
+---
+ drivers/mmc/host/Kconfig | 6 +
+ drivers/mmc/host/Makefile | 1 +
+ drivers/mmc/host/tmio_mmc.c | 633 +++++++++++++++++++++++++++++++++++++++++++
+ drivers/mmc/host/tmio_mmc.h | 205 ++++++++++++++
+ 4 files changed, 845 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/mmc/host/tmio_mmc.c
+ create mode 100644 drivers/mmc/host/tmio_mmc.h
+
+diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
+index 5fef678..f8f9b7e 100644
+--- a/drivers/mmc/host/Kconfig
++++ b/drivers/mmc/host/Kconfig
+@@ -130,3 +130,9 @@ config MMC_SPI
+
+ If unsure, or if your system has no SPI master driver, say N.
+
++config MMC_TMIO
++ tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support"
++ depends on MMC
++ help
++ This provides support for the SD/MMC cell found in TC6393XB,
++ T7L66XB and also ipaq ASIC3
+diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
+index 3877c87..7ac956b 100644
+--- a/drivers/mmc/host/Makefile
++++ b/drivers/mmc/host/Makefile
+@@ -17,4 +17,5 @@ obj-$(CONFIG_MMC_OMAP) += omap.o
+ obj-$(CONFIG_MMC_AT91) += at91_mci.o
+ obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o
+ obj-$(CONFIG_MMC_SPI) += mmc_spi.o
++obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o
+
+diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
+new file mode 100644
+index 0000000..735c386
+--- /dev/null
++++ b/drivers/mmc/host/tmio_mmc.c
+@@ -0,0 +1,633 @@
++/*
++ * linux/drivers/mmc/tmio_mmc.c
++ *
++ * Copyright (C) 2004 Ian Molton
++ * Copyright (C) 2007 Ian Molton
++ *
++ * 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.
++ *
++ * Driver for the MMC / SD / SDIO cell found in:
++ *
++ * TC6393XB TC6391XB TC6387XB T7L66XB
++ *
++ * This driver draws mainly on scattered spec sheets, Reverse engineering
++ * of the toshiba e800 SD driver and some parts of the 2.4 ASIC3 driver (4 bit
++ * support). (Further 4 bit support from a later datasheet).
++ *
++ * TODO:
++ * Investigate using a workqueue for PIO transfers
++ * Eliminate FIXMEs
++ * SDIO support
++ * Better Power management
++ * Handle MMC errors better
++ * double buffer support
++ *
++ */
++#include <linux/module.h>
++#include <linux/irq.h>
++#include <linux/device.h>
++#include <linux/delay.h>
++#include <linux/mmc/mmc.h>
++#include <linux/mmc/host.h>
++#include <linux/mfd-core.h>
++#include <linux/mfd/tmio.h>
++
++#include "tmio_mmc.h"
++
++/*
++ * Fixme - documentation conflicts on what the clock values are for the
++ * various dividers.
++ * One document I have says that its a divisor of a 24MHz clock, another 33.
++ * This probably depends on HCLK for a given platform, so we may need to
++ * require HCLK be passed to us from the MFD core.
++ *
++ */
++
++static void tmio_mmc_set_clock (struct tmio_mmc_host *host, int new_clock) {
++ struct tmio_mmc_cnf __iomem *cnf = host->cnf;
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ u32 clk = 0, clock;
++
++ if (new_clock) {
++ for(clock = 46875, clk = 0x100; new_clock >= (clock<<1); ){
++ clock <<= 1;
++ clk >>= 1;
++ }
++ if(clk & 0x1)
++ clk = 0x20000;
++
++ clk >>= 2;
++ if(clk & 0x8000) /* For full speed we disable the divider. */
++ writeb(0, &cnf->sd_clk_mode);
++ else
++ writeb(1, &cnf->sd_clk_mode);
++ clk |= 0x100;
++ }
++
++ writew(clk, &ctl->sd_card_clk_ctl);
++}
++
++static void tmio_mmc_clk_stop (struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ writew(0x0000, &ctl->clk_and_wait_ctl);
++ msleep(10);
++ writew(readw(&ctl->sd_card_clk_ctl) & ~0x0100, &ctl->sd_card_clk_ctl);
++ msleep(10);
++}
++
++static void tmio_mmc_clk_start (struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ writew(readw(&ctl->sd_card_clk_ctl) | 0x0100, &ctl->sd_card_clk_ctl);
++ msleep(10);
++ writew(0x0100, &ctl->clk_and_wait_ctl);
++ msleep(10);
++}
++
++static void reset(struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ /* FIXME - should we set stop clock reg here */
++ writew(0x0000, &ctl->reset_sd);
++ writew(0x0000, &ctl->reset_sdio);
++ msleep(10);
++ writew(0x0001, &ctl->reset_sd);
++ writew(0x0001, &ctl->reset_sdio);
++ msleep(10);
++}
++
++static void
++tmio_mmc_finish_request(struct tmio_mmc_host *host)
++{
++ struct mmc_request *mrq = host->mrq;
++
++ host->mrq = NULL;
++ host->cmd = NULL;
++ host->data = NULL;
++
++ mmc_request_done(host->mmc, mrq);
++}
++
++/* These are the bitmasks the tmio chip requires to implement the MMC response
++ * types. Note that R1 and R6 are the same in this scheme. */
++#define APP_CMD 0x0040
++#define RESP_NONE 0x0300
++#define RESP_R1 0x0400
++#define RESP_R1B 0x0500
++#define RESP_R2 0x0600
++#define RESP_R3 0x0700
++#define DATA_PRESENT 0x0800
++#define TRANSFER_READ 0x1000
++#define TRANSFER_MULTI 0x2000
++#define SECURITY_CMD 0x4000
++
++static void
++tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command *cmd)
++{
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ struct mmc_data *data = host->data;
++ int c = cmd->opcode;
++
++ if(cmd->opcode == MMC_STOP_TRANSMISSION) {
++ writew(0x001, &ctl->stop_internal_action);
++ return;
++ }
++
++ switch(mmc_resp_type(cmd)) {
++ case MMC_RSP_NONE: c |= RESP_NONE; break;
++ case MMC_RSP_R1: c |= RESP_R1; break;
++ case MMC_RSP_R1B: c |= RESP_R1B; break;
++ case MMC_RSP_R2: c |= RESP_R2; break;
++ case MMC_RSP_R3: c |= RESP_R3; break;
++ default:
++ DBG("Unknown response type %d\n", mmc_resp_type(cmd));
++ }
++
++ host->cmd = cmd;
++
++/* FIXME - this seems to be ok comented out but the spec suggest this bit should
++ * be set when issuing app commands.
++ * if(cmd->flags & MMC_FLAG_ACMD)
++ * c |= APP_CMD;
++ */
++ if(data) {
++ c |= DATA_PRESENT;
++ if(data->blocks > 1) {
++ writew(0x100, &ctl->stop_internal_action);
++ c |= TRANSFER_MULTI;
++ }
++ if(data->flags & MMC_DATA_READ)
++ c |= TRANSFER_READ;
++ }
++
++ enable_mmc_irqs(ctl, TMIO_MASK_CMD);
++
++ /* Fire off the command */
++ tmio_iowrite32(cmd->arg, ctl->arg_reg);
++ writew(c, &ctl->sd_cmd);
++}
++
++/* This chip always returns (at least?) as much data as you ask for.
++ * Im unsure what happens if you ask for less than a block. This should be
++ * looked into to ensure that a funny length read doesnt hose the controller.
++ *
++ * FIXME - this chip cannot do 1 and 2 byte data requests in 4 bit mode
++ */
++static inline void tmio_mmc_pio_irq(struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ struct mmc_data *data = host->data;
++ unsigned short *buf;
++ unsigned int count;
++ unsigned long flags;
++
++ if(!data){
++ DBG("Spurious PIO IRQ\n");
++ return;
++ }
++
++ buf = (unsigned short *)(tmio_mmc_kmap_atomic(host, &flags) +
++ host->sg_off);
++
++ /* Ensure we dont read more than one block. The chip will interrupt us
++ * When the next block is available.
++ * FIXME - this is probably not true now IRQ handling is fixed
++ */
++ count = host->sg_ptr->length - host->sg_off;
++ if(count > data->blksz)
++ count = data->blksz;
++
++ DBG("count: %08x offset: %08x flags %08x\n",
++ count, host->sg_off, data->flags);
++
++ /* Transfer the data */
++ if(data->flags & MMC_DATA_READ)
++ readsw(&ctl->sd_data_port[0], buf, count >> 1);
++ else
++ writesw(&ctl->sd_data_port[0], buf, count >> 1);
++
++ host->sg_off += count;
++
++ tmio_mmc_kunmap_atomic(host, &flags);
++
++ if(host->sg_off == host->sg_ptr->length)
++ tmio_mmc_next_sg(host);
++
++ return;
++}
++
++static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ struct mmc_data *data = host->data;
++
++ host->data = NULL;
++
++ if(!data){
++ DBG("Spurious data end IRQ\n");
++ return;
++ }
++
++ /* FIXME - return correct transfer count on errors */
++ if (!data->error)
++ data->bytes_xfered = data->blocks * data->blksz;
++ else
++ data->bytes_xfered = 0;
++
++ DBG("Completed data request\n");
++
++ /*FIXME - other drivers allow an optional stop command of any given type
++ * which we dont do, as the chip can auto generate them.
++ * Perhaps we can be smarter about when to use auto CMD12 and
++ * only issue the auto request when we know this is the desired
++ * stop command, allowing fallback to the stop command the
++ * upper layers expect. For now, we do what works.
++ */
++
++ writew(0x000, &ctl->stop_internal_action);
++
++ if(data->flags & MMC_DATA_READ)
++ disable_mmc_irqs(ctl, TMIO_MASK_READOP);
++ else
++ disable_mmc_irqs(ctl, TMIO_MASK_WRITEOP);
++
++ tmio_mmc_finish_request(host);
++}
++
++static inline void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, unsigned int stat) {
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ struct mmc_command *cmd = host->cmd;
++
++ if(!host->cmd) {
++ DBG("Spurious CMD irq\n");
++ return;
++ }
++
++ host->cmd = NULL;
++
++ /* This controller is sicker than the PXA one. not only do we need to
++ * drop the top 8 bits of the first response word, we also need to
++ * modify the order of the response for short response command types.
++ */
++
++ /* FIXME - this works but readl is wrong and will break on asic3... */
++ cmd->resp[3] = tmio_ioread32(&ctl->response[0]);
++ cmd->resp[2] = tmio_ioread32(&ctl->response[2]);
++ cmd->resp[1] = tmio_ioread32(&ctl->response[4]);
++ cmd->resp[0] = tmio_ioread32(&ctl->response[6]);
++
++ if(cmd->flags & MMC_RSP_136) {
++ cmd->resp[0] = (cmd->resp[0] <<8) | (cmd->resp[1] >>24);
++ cmd->resp[1] = (cmd->resp[1] <<8) | (cmd->resp[2] >>24);
++ cmd->resp[2] = (cmd->resp[2] <<8) | (cmd->resp[3] >>24);
++ cmd->resp[3] <<= 8;
++ }
++ else if(cmd->flags & MMC_RSP_R3) {
++ cmd->resp[0] = cmd->resp[3];
++ }
++
++ if (stat & TMIO_STAT_CMDTIMEOUT)
++ cmd->error = -ETIMEDOUT;
++ else if (stat & TMIO_STAT_CRCFAIL && cmd->flags & MMC_RSP_CRC)
++ cmd->error = -EILSEQ;
++
++ /* If there is data to handle we enable data IRQs here, and
++ * we will ultimatley finish the request in the data_end handler.
++ * If theres no data or we encountered an error, finish now.
++ */
++ if(host->data && !cmd->error){
++ if(host->data->flags & MMC_DATA_READ)
++ enable_mmc_irqs(ctl, TMIO_MASK_READOP);
++ else
++ enable_mmc_irqs(ctl, TMIO_MASK_WRITEOP);
++ }
++ else {
++ tmio_mmc_finish_request(host);
++ }
++
++ return;
++}
++
++
++static irqreturn_t tmio_mmc_irq(int irq, void *devid)
++{
++ struct tmio_mmc_host *host = devid;
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++ unsigned int ireg, irq_mask, status;
++
++ DBG("MMC IRQ begin\n");
++
++ status = tmio_ioread32(ctl->status);
++ irq_mask = tmio_ioread32(ctl->irq_mask);
++ ireg = status & TMIO_MASK_IRQ & ~irq_mask;
++
++#ifdef CONFIG_MMC_DEBUG
++ debug_status(status);
++ debug_status(ireg);
++#endif
++ if (!ireg) {
++ disable_mmc_irqs(ctl, status & ~irq_mask);
++#ifdef CONFIG_MMC_DEBUG
++ WARN("tmio_mmc: Spurious MMC irq, disabling! 0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg);
++ debug_status(status);
++#endif
++ goto out;
++ }
++
++ while (ireg) {
++ /* Card insert / remove attempts */
++ if (ireg & (TMIO_STAT_CARD_INSERT | TMIO_STAT_CARD_REMOVE)){
++ ack_mmc_irqs(ctl, TMIO_STAT_CARD_INSERT | TMIO_STAT_CARD_REMOVE);
++ mmc_detect_change(host->mmc,0);
++ }
++
++ /* CRC and other errors */
++/* if (ireg & TMIO_STAT_ERR_IRQ)
++ * handled |= tmio_error_irq(host, irq, stat);
++ */
++
++ /* Command completion */
++ if (ireg & TMIO_MASK_CMD) {
++ tmio_mmc_cmd_irq(host, status);
++ ack_mmc_irqs(ctl, TMIO_MASK_CMD);
++ }
++
++ /* Data transfer */
++ if (ireg & (TMIO_STAT_RXRDY | TMIO_STAT_TXRQ)) {
++ ack_mmc_irqs(ctl, TMIO_STAT_RXRDY | TMIO_STAT_TXRQ);
++ tmio_mmc_pio_irq(host);
++ }
++
++ /* Data transfer completion */
++ if (ireg & TMIO_STAT_DATAEND) {
++ tmio_mmc_data_irq(host);
++ ack_mmc_irqs(ctl, TMIO_STAT_DATAEND);
++ }
++
++ /* Check status - keep going until we've handled it all */
++ status = tmio_ioread32(ctl->status);
++ irq_mask = tmio_ioread32(ctl->irq_mask);
++ ireg = status & TMIO_MASK_IRQ & ~irq_mask;
++
++#ifdef CONFIG_MMC_DEBUG
++ DBG("Status at end of loop: %08x\n", status);
++ debug_status(status);
++#endif
++ }
++ DBG("MMC IRQ end\n");
++
++out:
++ return IRQ_HANDLED;
++}
++
++static void tmio_mmc_start_data(struct tmio_mmc_host *host, struct mmc_data *data)
++{
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ DBG("setup data transfer: blocksize %08x nr_blocks %d\n",
++ data->blksz, data->blocks);
++
++ tmio_mmc_init_sg(host, data);
++ host->data = data;
++
++ /* Set transfer length / blocksize */
++ writew(data->blksz, &ctl->sd_xfer_len);
++ writew(data->blocks, &ctl->xfer_blk_count);
++}
++
++/* Process requests from the MMC layer */
++static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
++{
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++
++ WARN_ON(host->mrq != NULL);
++
++ host->mrq = mrq;
++
++ /* If we're performing a data request we need to setup some
++ extra information */
++ if (mrq->data)
++ tmio_mmc_start_data(host, mrq->data);
++
++ tmio_mmc_start_command(host, mrq->cmd);
++}
++
++/* Set MMC clock / power.
++ * Note: This controller uses a simple divider scheme therefore it cannot
++ * run a MMC card at full speed (20MHz). The max clock is 24MHz on SD, but as
++ * MMC wont run that fast, it has to be clocked at 12MHz which is the next
++ * slowest setting.
++ */
++static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
++{
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++ struct tmio_mmc_cnf __iomem *cnf = host->cnf;
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ if(ios->clock)
++ tmio_mmc_set_clock (host, ios->clock);
++
++ /* Power sequence - OFF -> ON -> UP */
++ switch (ios->power_mode) {
++ case MMC_POWER_OFF:
++ writeb(0x00, &cnf->pwr_ctl[1]); /* power down SD bus */
++ tmio_mmc_clk_stop(host);
++ break;
++ case MMC_POWER_ON:
++ writeb(0x02, &cnf->pwr_ctl[1]); /* power up SD bus */
++ break;
++ case MMC_POWER_UP:
++ tmio_mmc_clk_start(host); /* start bus clock */
++ break;
++ }
++
++ switch (ios->bus_width) {
++ case MMC_BUS_WIDTH_1:
++ writew(0x80e0, &ctl->sd_mem_card_opt);
++ break;
++ case MMC_BUS_WIDTH_4:
++ writew(0x00e0, &ctl->sd_mem_card_opt);
++ break;
++ }
++
++ /* Potentially we may need a 140us pause here. FIXME */
++ udelay(140);
++}
++
++static int tmio_mmc_get_ro(struct mmc_host *mmc) {
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++ struct tmio_mmc_ctl __iomem *ctl = host->ctl;
++
++ return (readw(&ctl->status[0]) & TMIO_STAT_WRPROTECT)?0:1;
++}
++
++static struct mmc_host_ops tmio_mmc_ops = {
++ .request = tmio_mmc_request,
++ .set_ios = tmio_mmc_set_ios,
++ .get_ro = tmio_mmc_get_ro,
++};
++
++static int tmio_mmc_suspend(struct platform_device *dev, pm_message_t state) {
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct mmc_host *mmc = platform_get_drvdata(dev);
++ int ret;
++
++ ret = mmc_suspend_host(mmc, state);
++
++ /* Tell MFD core it can disable us now.*/
++ if(!ret && cell->disable)
++ cell->disable(dev);
++
++ return ret;
++}
++
++static int tmio_mmc_resume(struct platform_device *dev) {
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct mmc_host *mmc = platform_get_drvdata(dev);
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++ struct tmio_mmc_cnf __iomem *cnf = host->cnf;
++
++ /* Enable the MMC/SD Control registers */
++ writew(SDCREN, &cnf->cmd);
++ writel(dev->resource[0].start & 0xfffe, &cnf->ctl_base);
++
++ /* Tell the MFD core we are ready to be enabled */
++ if(cell->enable)
++ cell->enable(dev);
++
++ mmc_resume_host(mmc);
++
++ return 0;
++}
++
++static int __devinit tmio_mmc_probe(struct platform_device *dev)
++{
++ struct mfd_cell *cell = mfd_get_cell(dev);
++ struct tmio_mmc_cnf __iomem *cnf;
++ struct tmio_mmc_ctl __iomem *ctl;
++ struct tmio_mmc_host *host;
++ struct mmc_host *mmc;
++ int ret = -ENOMEM;
++
++ mmc = mmc_alloc_host(sizeof(struct tmio_mmc_host), &dev->dev);
++ if (!mmc) {
++ goto out;
++ }
++
++ host = mmc_priv(mmc);
++ host->mmc = mmc;
++ platform_set_drvdata(dev, mmc); /* Used so we can de-init safely. */
++
++ host->cnf = cnf = ioremap((unsigned long)dev->resource[1].start,
++ (unsigned long)dev->resource[1].end -
++ (unsigned long)dev->resource[1].start);
++ if(!host->cnf)
++ goto host_free;
++
++ host->ctl = ctl = ioremap((unsigned long)dev->resource[0].start,
++ (unsigned long)dev->resource[0].end -
++ (unsigned long)dev->resource[0].start);
++ if (!host->ctl) {
++ goto unmap_cnf;
++ }
++
++ mmc->ops = &tmio_mmc_ops;
++ mmc->caps = MMC_CAP_4_BIT_DATA;
++ mmc->f_min = 46875;
++ mmc->f_max = 24000000;
++ mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
++
++ /* Enable the MMC/SD Control registers */
++ writew(SDCREN, &cnf->cmd);
++ writel(dev->resource[0].start & 0xfffe, &cnf->ctl_base);
++
++ /* Tell the MFD core we are ready to be enabled */
++ if(cell->enable)
++ cell->enable(dev);
++
++ writeb(0x01,&cnf->pwr_ctl[2]); /* Disable SD power during suspend */
++ writeb(0x1f, &cnf->stop_clk_ctl); /* Route clock to SDIO??? FIXME */
++ writeb(0x0, &cnf->pwr_ctl[1]); /* Power down SD bus*/
++ tmio_mmc_clk_stop(host); /* Stop bus clock */
++ reset(host); /* Reset MMC HC */
++
++ host->irq = (unsigned long)dev->resource[2].start;
++ ret = request_irq(host->irq, tmio_mmc_irq, IRQF_DISABLED, "tmio-mmc", host);
++ if (ret){
++ ret = -ENODEV;
++ DBG("Failed to allocate IRQ.\n");
++ goto unmap_ctl;
++ }
++ set_irq_type(host->irq, IRQT_FALLING);
++
++ mmc_add_host(mmc);
++
++ printk(KERN_INFO "%s at 0x%08lx irq %d\n", mmc_hostname(host->mmc),
++ (unsigned long)host->ctl, host->irq);
++
++ /* Lets unmask the IRQs we want to know about */
++ disable_mmc_irqs(ctl, TMIO_MASK_ALL);
++ enable_mmc_irqs(ctl, TMIO_MASK_IRQ);
++
++ return 0;
++
++unmap_ctl:
++ iounmap(host->ctl);
++unmap_cnf:
++ iounmap(host->cnf);
++host_free:
++ mmc_free_host(mmc);
++out:
++ return ret;
++}
++
++static int __devexit tmio_mmc_remove(struct platform_device *dev)
++{
++ struct mmc_host *mmc = platform_get_drvdata(dev);
++
++ platform_set_drvdata(dev, NULL);
++
++ if (mmc) {
++ struct tmio_mmc_host *host = mmc_priv(mmc);
++ mmc_remove_host(mmc);
++ free_irq(host->irq, host);
++ /* FIXME - we might want to consider stopping the chip here. */
++ iounmap(host->ctl);
++ iounmap(host->cnf);
++ mmc_free_host(mmc); /* FIXME - why does this call hang ? */
++ }
++ return 0;
++}
++
++/* ------------------- device registration ----------------------- */
++
++static struct platform_driver tmio_mmc_driver = {
++ .driver = {
++ .name = "tmio-mmc",
++ },
++ .probe = tmio_mmc_probe,
++ .remove = __devexit_p(tmio_mmc_remove),
++#ifdef CONFIG_PM
++ .suspend = tmio_mmc_suspend,
++ .resume = tmio_mmc_resume,
++#endif
++};
++
++
++static int __init tmio_mmc_init(void)
++{
++ return platform_driver_register (&tmio_mmc_driver);
++}
++
++static void __exit tmio_mmc_exit(void)
++{
++ platform_driver_unregister (&tmio_mmc_driver);
++}
++
++module_init(tmio_mmc_init);
++module_exit(tmio_mmc_exit);
++
++MODULE_DESCRIPTION("Toshiba TMIO SD/MMC driver");
++MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
++MODULE_LICENSE("GPLv2");
+diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
+new file mode 100644
+index 0000000..d4d9f8f
+--- /dev/null
++++ b/drivers/mmc/host/tmio_mmc.h
+@@ -0,0 +1,205 @@
++/* Definitons for use with the tmio_mmc.c
++ *
++ * (c) 2005 Ian Molton <spyro@f2s.com>
++ * (c) 2007 Ian Molton <spyro@f2s.com>
++ *
++ * 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.
++ *
++ */
++
++struct tmio_mmc_cnf {
++ u8 x00[4];
++ u16 cmd;
++ u8 x01[10];
++ u32 ctl_base;
++ u8 x02[41];
++ u8 int_pin;
++ u8 x03[2];
++ u8 stop_clk_ctl;
++ u8 gclk_ctl; /* Gated Clock Control */
++ u8 sd_clk_mode; /* 0x42 */
++ u8 x04;
++ u16 pin_status;
++ u8 x05[2];
++ u8 pwr_ctl[3];
++ u8 x06;
++ u8 card_detect_mode;
++ u8 x07[3];
++ u8 sd_slot;
++ u8 x08[159];
++ u8 ext_gclk_ctl_1; /* Extended Gated Clock Control 1 */
++ u8 ext_gclk_ctl_2; /* Extended Gated Clock Control 2 */
++ u8 x09[7];
++ u8 ext_gclk_ctl_3; /* Extended Gated Clock Control 3 */
++ u8 sd_led_en_1;
++ u8 x10[3];
++ u8 sd_led_en_2;
++ u8 x11;
++} __attribute__ ((packed));
++
++#define SDCREN 0x2 /* Enable access to MMC CTL regs. (flag in COMMAND_REG)*/
++
++struct tmio_mmc_ctl {
++ u16 sd_cmd;
++ u16 x00;
++ u16 arg_reg[2];
++ u16 stop_internal_action;
++ u16 xfer_blk_count;
++ u16 response[8];
++ u16 status[2];
++ u16 irq_mask[2];
++ u16 sd_card_clk_ctl;
++ u16 sd_xfer_len;
++ u16 sd_mem_card_opt;
++ u16 x01;
++ u16 sd_error_detail_status[2];
++ u16 sd_data_port[2];
++ u16 transaction_ctl;
++ u16 x02[85];
++ u16 reset_sd;
++ u16 x03[15];
++ u16 sdio_regs[28];
++ u16 clk_and_wait_ctl;
++ u16 x04[83];
++ u16 reset_sdio;
++ u16 x05[15];
++} __attribute__ ((packed));
++
++/* Definitions for values the CTRL_STATUS register can take. */
++#define TMIO_STAT_CMDRESPEND 0x00000001
++#define TMIO_STAT_DATAEND 0x00000004
++#define TMIO_STAT_CARD_REMOVE 0x00000008
++#define TMIO_STAT_CARD_INSERT 0x00000010
++#define TMIO_STAT_SIGSTATE 0x00000020
++#define TMIO_STAT_WRPROTECT 0x00000080
++#define TMIO_STAT_CARD_REMOVE_A 0x00000100
++#define TMIO_STAT_CARD_INSERT_A 0x00000200
++#define TMIO_STAT_SIGSTATE_A 0x00000400
++#define TMIO_STAT_CMD_IDX_ERR 0x00010000
++#define TMIO_STAT_CRCFAIL 0x00020000
++#define TMIO_STAT_STOPBIT_ERR 0x00040000
++#define TMIO_STAT_DATATIMEOUT 0x00080000
++#define TMIO_STAT_RXOVERFLOW 0x00100000
++#define TMIO_STAT_TXUNDERRUN 0x00200000
++#define TMIO_STAT_CMDTIMEOUT 0x00400000
++#define TMIO_STAT_RXRDY 0x01000000
++#define TMIO_STAT_TXRQ 0x02000000
++#define TMIO_STAT_ILL_FUNC 0x20000000
++#define TMIO_STAT_CMD_BUSY 0x40000000
++#define TMIO_STAT_ILL_ACCESS 0x80000000
++
++/* Define some IRQ masks */
++/* This is the mask used at reset by the chip */
++#define TMIO_MASK_ALL 0x837f031d
++#define TMIO_MASK_READOP (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND | \
++ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
++#define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND | \
++ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
++#define TMIO_MASK_CMD (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \
++ TMIO_STAT_CARD_REMOVE | TMIO_STAT_CARD_INSERT)
++#define TMIO_MASK_IRQ (TMIO_MASK_READOP | TMIO_MASK_WRITEOP | TMIO_MASK_CMD)
++
++#define enable_mmc_irqs(ctl, i) \
++ do { \
++ u32 mask;\
++ mask = tmio_ioread32((ctl)->irq_mask); \
++ mask &= ~((i) & TMIO_MASK_IRQ); \
++ tmio_iowrite32(mask, (ctl)->irq_mask); \
++ } while (0)
++
++#define disable_mmc_irqs(ctl, i) \
++ do { \
++ u32 mask;\
++ mask = tmio_ioread32((ctl)->irq_mask); \
++ mask |= ((i) & TMIO_MASK_IRQ); \
++ tmio_iowrite32(mask, (ctl)->irq_mask); \
++ } while (0)
++
++#define ack_mmc_irqs(ctl, i) \
++ do { \
++ u32 mask;\
++ mask = tmio_ioread32((ctl)->status); \
++ mask &= ~((i) & TMIO_MASK_IRQ); \
++ tmio_iowrite32(mask, (ctl)->status); \
++ } while (0)
++
++
++struct tmio_mmc_host {
++ struct tmio_mmc_cnf __iomem *cnf;
++ struct tmio_mmc_ctl __iomem *ctl;
++ struct mmc_command *cmd;
++ struct mmc_request *mrq;
++ struct mmc_data *data;
++ struct mmc_host *mmc;
++ int irq;
++
++ /* pio related stuff */
++ struct scatterlist *sg_ptr;
++ unsigned int sg_len;
++ unsigned int sg_off;
++};
++
++#include <linux/scatterlist.h>
++#include <linux/blkdev.h>
++
++static inline void tmio_mmc_init_sg(struct tmio_mmc_host *host, struct mmc_data *data)
++{
++ host->sg_len = data->sg_len;
++ host->sg_ptr = data->sg;
++ host->sg_off = 0;
++}
++
++static inline int tmio_mmc_next_sg(struct tmio_mmc_host *host)
++{
++ host->sg_ptr++;
++ host->sg_off = 0;
++ return --host->sg_len;
++}
++
++static inline char *tmio_mmc_kmap_atomic(struct tmio_mmc_host *host, unsigned long *flags)
++{
++ struct scatterlist *sg = host->sg_ptr;
++
++ local_irq_save(*flags);
++ return kmap_atomic(sg_page(sg), KM_BIO_SRC_IRQ) + sg->offset;
++}
++
++static inline void tmio_mmc_kunmap_atomic(struct tmio_mmc_host *host, unsigned long *flags)
++{
++ kunmap_atomic(sg_page(host->sg_ptr), KM_BIO_SRC_IRQ);
++ local_irq_restore(*flags);
++}
++
++#ifdef CONFIG_MMC_DEBUG
++#define DBG(args...) printk(args)
++
++void debug_status(u32 status){
++ printk("status: %08x = ", status);
++ if(status & TMIO_STAT_CARD_REMOVE) printk("Card_removed ");
++ if(status & TMIO_STAT_CARD_INSERT) printk("Card_insert ");
++ if(status & TMIO_STAT_SIGSTATE) printk("Sigstate ");
++ if(status & TMIO_STAT_WRPROTECT) printk("Write_protect ");
++ if(status & TMIO_STAT_CARD_REMOVE_A) printk("Card_remove_A ");
++ if(status & TMIO_STAT_CARD_INSERT_A) printk("Card_insert_A ");
++ if(status & TMIO_STAT_SIGSTATE_A) printk("Sigstate_A ");
++ if(status & TMIO_STAT_CMD_IDX_ERR) printk("Cmd_IDX_Err ");
++ if(status & TMIO_STAT_STOPBIT_ERR) printk("Stopbit_ERR ");
++ if(status & TMIO_STAT_ILL_FUNC) printk("ILLEGAL_FUNC ");
++ if(status & TMIO_STAT_CMD_BUSY) printk("CMD_BUSY ");
++ if(status & TMIO_STAT_CMDRESPEND) printk("Response_end ");
++ if(status & TMIO_STAT_DATAEND) printk("Data_end ");
++ if(status & TMIO_STAT_CRCFAIL) printk("CRC_failure ");
++ if(status & TMIO_STAT_DATATIMEOUT) printk("Data_timeout ");
++ if(status & TMIO_STAT_CMDTIMEOUT) printk("Command_timeout ");
++ if(status & TMIO_STAT_RXOVERFLOW) printk("RX_OVF ");
++ if(status & TMIO_STAT_TXUNDERRUN) printk("TX_UND ");
++ if(status & TMIO_STAT_RXRDY) printk("RX_rdy ");
++ if(status & TMIO_STAT_TXRQ) printk("TX_req ");
++ if(status & TMIO_STAT_ILL_ACCESS) printk("ILLEGAL_ACCESS ");
++ printk("\n");
++}
++#else
++#define DBG(fmt,args...) do { } while (0)
++#endif
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0012-Tosa-keyboard-support.patch b/packages/linux/linux-rp-2.6.24/tosa/0012-Tosa-keyboard-support.patch
new file mode 100644
index 0000000000..0fa10ebd4c
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0012-Tosa-keyboard-support.patch
@@ -0,0 +1,593 @@
+From 6d377e8f80ce421e6842ac5f42081345fbc70002 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:27:41 +0300
+Subject: [PATCH 12/64] Tosa keyboard support
+
+Support keyboard on tosa (Sharp Zaurus SL-6000x).
+Largely based on patches by Dirk Opfer.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 43 ++++
+ drivers/input/keyboard/Kconfig | 21 ++
+ drivers/input/keyboard/Makefile | 1 +
+ drivers/input/keyboard/tosakbd.c | 415 ++++++++++++++++++++++++++++++++++++++
+ include/asm-arm/arch-pxa/tosa.h | 30 +++
+ 5 files changed, 510 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/keyboard/tosakbd.c
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 240fd04..e7e0f52 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -21,6 +21,8 @@
+ #include <linux/mmc/host.h>
+ #include <linux/pm.h>
+ #include <linux/delay.h>
++#include <linux/gpio_keys.h>
++#include <linux/input.h>
+
+ #include <asm/setup.h>
+ #include <asm/memory.h>
+@@ -253,6 +255,46 @@ static struct platform_device tosakbd_device = {
+ .id = -1,
+ };
+
++static struct gpio_keys_button tosa_gpio_keys[] = {
++ {
++ .type = EV_PWR,
++ .code = KEY_SUSPEND,
++ .gpio = TOSA_GPIO_ON_KEY,
++ .desc = "On key",
++ .wakeup = 1,
++ .active_low = 1,
++ },
++ {
++ .type = EV_KEY,
++ .code = TOSA_KEY_RECORD,
++ .gpio = TOSA_GPIO_RECORD_BTN,
++ .desc = "Record Button",
++ .wakeup = 1,
++ .active_low = 1,
++ },
++ {
++ .type = EV_KEY,
++ .code = TOSA_KEY_SYNC,
++ .gpio = TOSA_GPIO_SYNC,
++ .desc = "Sync Button",
++ .wakeup = 1,
++ .active_low = 1,
++ },
++};
++
++static struct gpio_keys_platform_data tosa_gpio_keys_platform_data = {
++ .buttons = tosa_gpio_keys,
++ .nbuttons = ARRAY_SIZE(tosa_gpio_keys),
++};
++
++static struct platform_device tosa_gpio_keys_device = {
++ .name = "gpio-keys",
++ .id = -1,
++ .dev = {
++ .platform_data = &tosa_gpio_keys_platform_data,
++ },
++};
++
+ /*
+ * Tosa LEDs
+ */
+@@ -265,6 +307,7 @@ static struct platform_device *devices[] __initdata = {
+ &tosascoop_device,
+ &tosascoop_jc_device,
+ &tosakbd_device,
++ &tosa_gpio_keys_device,
+ &tosaled_device,
+ };
+
+diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
+index 086d58c..0c32762 100644
+--- a/drivers/input/keyboard/Kconfig
++++ b/drivers/input/keyboard/Kconfig
+@@ -154,6 +154,27 @@ config KEYBOARD_SPITZ
+ To compile this driver as a module, choose M here: the
+ module will be called spitzkbd.
+
++config KEYBOARD_TOSA
++ tristate "Tosa keyboard"
++ depends on MACH_TOSA
++ default y
++ help
++ Say Y here to enable the keyboard on the Sharp Zaurus SL-6000x (Tosa)
++
++ To compile this driver as a module, choose M here: the
++ module will be called tosakbd.
++
++config KEYBOARD_TOSA_USE_EXT_KEYCODES
++ bool "Tosa keyboard: use extended keycodes"
++ depends on KEYBOARD_TOSA
++ default n
++ help
++ Say Y here to enable the tosa keyboard driver to generate extended
++ (>= 127) keycodes. Be aware, that they can't be correctly interpreted
++ by either console keyboard driver or by Kdrive keybd driver.
++
++ Say Y only if you know, what you are doing!
++
+ config KEYBOARD_AMIGA
+ tristate "Amiga keyboard"
+ depends on AMIGA
+diff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile
+index e97455f..6caa065 100644
+--- a/drivers/input/keyboard/Makefile
++++ b/drivers/input/keyboard/Makefile
+@@ -15,6 +15,7 @@ obj-$(CONFIG_KEYBOARD_NEWTON) += newtonkbd.o
+ obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
+ obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
+ obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
++obj-$(CONFIG_KEYBOARD_TOSA) += tosakbd.o
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+ obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
+diff --git a/drivers/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c
+new file mode 100644
+index 0000000..3884d1e
+--- /dev/null
++++ b/drivers/input/keyboard/tosakbd.c
+@@ -0,0 +1,415 @@
++/*
++ * Keyboard driver for Sharp Tosa models (SL-6000x)
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ * Copyright (c) 2007 Dmitry Baryshkov
++ *
++ * Based on xtkbd.c/locomkbd.c/corgikbd.c
++ *
++ * 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.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/interrupt.h>
++
++#include <asm/arch/gpio.h>
++#include <asm/arch/tosa.h>
++
++#define KB_ROWMASK(r) (1 << (r))
++#define SCANCODE(r, c) (((r)<<4) + (c) + 1)
++#define NR_SCANCODES SCANCODE(TOSA_KEY_SENSE_NUM - 1, TOSA_KEY_STROBE_NUM - 1) + 1
++
++#define SCAN_INTERVAL (HZ/10)
++
++#define KB_DISCHARGE_DELAY 10
++#define KB_ACTIVATE_DELAY 10
++
++static unsigned int tosakbd_keycode[NR_SCANCODES] = {
++0,
++0, KEY_W, 0, 0, 0, KEY_K, KEY_BACKSPACE, KEY_P,
++0, 0, 0, 0, 0, 0, 0, 0,
++KEY_Q, KEY_E, KEY_T, KEY_Y, 0, KEY_O, KEY_I, KEY_COMMA,
++0, 0, 0, 0, 0, 0, 0, 0,
++KEY_A, KEY_D, KEY_G, KEY_U, 0, KEY_L, KEY_ENTER, KEY_DOT,
++0, 0, 0, 0, 0, 0, 0, 0,
++KEY_Z, KEY_C, KEY_V, KEY_J, TOSA_KEY_ADDRESSBOOK, TOSA_KEY_CANCEL, TOSA_KEY_CENTER, TOSA_KEY_OK,
++KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, 0,
++KEY_S, KEY_R, KEY_B, KEY_N, TOSA_KEY_CALENDAR, TOSA_KEY_HOMEPAGE, KEY_LEFTCTRL, TOSA_KEY_LIGHT,
++0, KEY_RIGHTSHIFT, 0, 0, 0, 0, 0, 0,
++KEY_TAB, KEY_SLASH, KEY_H, KEY_M, TOSA_KEY_MENU, 0, KEY_UP, 0,
++0, 0, TOSA_KEY_FN, 0, 0, 0, 0, 0,
++KEY_X, KEY_F, KEY_SPACE, KEY_APOSTROPHE, TOSA_KEY_MAIL, KEY_LEFT, KEY_DOWN, KEY_RIGHT,
++0, 0, 0,
++};
++
++struct tosakbd {
++ unsigned int keycode[ARRAY_SIZE(tosakbd_keycode)];
++ struct input_dev *input;
++
++ spinlock_t lock; /* protect kbd scanning */
++ struct timer_list timer;
++};
++
++
++/* Helper functions for reading the keyboard matrix
++ * Note: We should really be using pxa_gpio_mode to alter GPDR but it
++ * requires a function call per GPIO bit which is excessive
++ * when we need to access 12 bits at once, multiple times.
++ * These functions must be called within local_irq_save()/local_irq_restore()
++ * or similar.
++ */
++#define GET_ROWS_STATUS(c) ((GPLR2 & TOSA_GPIO_ALL_SENSE_BIT) >> TOSA_GPIO_ALL_SENSE_RSHIFT)
++
++static inline void tosakbd_discharge_all(void)
++{
++ /* STROBE All HiZ */
++ GPCR1 = TOSA_GPIO_HIGH_STROBE_BIT;
++ GPDR1 &= ~TOSA_GPIO_HIGH_STROBE_BIT;
++ GPCR2 = TOSA_GPIO_LOW_STROBE_BIT;
++ GPDR2 &= ~TOSA_GPIO_LOW_STROBE_BIT;
++}
++
++static inline void tosakbd_activate_all(void)
++{
++ /* STROBE ALL -> High */
++ GPSR1 = TOSA_GPIO_HIGH_STROBE_BIT;
++ GPDR1 |= TOSA_GPIO_HIGH_STROBE_BIT;
++ GPSR2 = TOSA_GPIO_LOW_STROBE_BIT;
++ GPDR2 |= TOSA_GPIO_LOW_STROBE_BIT;
++
++ udelay(KB_DISCHARGE_DELAY);
++
++ /* STATE CLEAR */
++ GEDR2 |= TOSA_GPIO_ALL_SENSE_BIT;
++}
++
++static inline void tosakbd_activate_col(int col)
++{
++ if (col <= 5) {
++ /* STROBE col -> High, not col -> HiZ */
++ GPSR1 = TOSA_GPIO_STROBE_BIT(col);
++ GPDR1 = (GPDR1 & ~TOSA_GPIO_HIGH_STROBE_BIT) | TOSA_GPIO_STROBE_BIT(col);
++ } else {
++ /* STROBE col -> High, not col -> HiZ */
++ GPSR2 = TOSA_GPIO_STROBE_BIT(col);
++ GPDR2 = (GPDR2 & ~TOSA_GPIO_LOW_STROBE_BIT) | TOSA_GPIO_STROBE_BIT(col);
++ }
++}
++
++static inline void tosakbd_reset_col(int col)
++{
++ if (col <= 5) {
++ /* STROBE col -> Low */
++ GPCR1 = TOSA_GPIO_STROBE_BIT(col);
++ /* STROBE col -> out, not col -> HiZ */
++ GPDR1 = (GPDR1 & ~TOSA_GPIO_HIGH_STROBE_BIT) | TOSA_GPIO_STROBE_BIT(col);
++ } else {
++ /* STROBE col -> Low */
++ GPCR2 = TOSA_GPIO_STROBE_BIT(col);
++ /* STROBE col -> out, not col -> HiZ */
++ GPDR2 = (GPDR2 & ~TOSA_GPIO_LOW_STROBE_BIT) | TOSA_GPIO_STROBE_BIT(col);
++ }
++}
++/*
++ * The tosa keyboard only generates interrupts when a key is pressed.
++ * So when a key is pressed, we enable a timer. This timer scans the
++ * keyboard, and this is how we detect when the key is released.
++ */
++
++/* Scan the hardware keyboard and push any changes up through the input layer */
++static void tosakbd_scankeyboard(struct platform_device *dev)
++{
++ struct tosakbd *tosakbd = platform_get_drvdata(dev);
++ unsigned int row, col, rowd;
++ unsigned long flags;
++ unsigned int num_pressed = 0;
++
++ spin_lock_irqsave(&tosakbd->lock, flags);
++
++ for (col = 0; col < TOSA_KEY_STROBE_NUM; col++) {
++ /*
++ * Discharge the output driver capacitatance
++ * in the keyboard matrix. (Yes it is significant..)
++ */
++ tosakbd_discharge_all();
++ udelay(KB_DISCHARGE_DELAY);
++
++ tosakbd_activate_col(col);
++ udelay(KB_ACTIVATE_DELAY);
++
++ rowd = GET_ROWS_STATUS(col);
++
++ for (row = 0; row < TOSA_KEY_SENSE_NUM; row++) {
++ unsigned int scancode, pressed;
++ scancode = SCANCODE(row, col);
++ pressed = rowd & KB_ROWMASK(row);
++
++ if (pressed && !tosakbd->keycode[scancode])
++ dev_warn(&dev->dev,
++ "unhandled scancode: 0x%02x\n",
++ scancode);
++
++ input_report_key(tosakbd->input,
++ tosakbd->keycode[scancode],
++ pressed);
++ if (pressed)
++ num_pressed++;
++ }
++
++ tosakbd_reset_col(col);
++ }
++
++ tosakbd_activate_all();
++
++ input_sync(tosakbd->input);
++
++ /* if any keys are pressed, enable the timer */
++ if (num_pressed)
++ mod_timer(&tosakbd->timer, jiffies + SCAN_INTERVAL);
++
++ spin_unlock_irqrestore(&tosakbd->lock, flags);
++}
++
++/*
++ * tosa keyboard interrupt handler.
++ */
++static irqreturn_t tosakbd_interrupt(int irq, void *__dev)
++{
++ struct platform_device *dev = __dev;
++ struct tosakbd *tosakbd = platform_get_drvdata(dev);
++
++ if (!timer_pending(&tosakbd->timer)) {
++ /** wait chattering delay **/
++ udelay(20);
++ tosakbd_scankeyboard(dev);
++ }
++
++ return IRQ_HANDLED;
++}
++
++/*
++ * tosa timer checking for released keys
++ */
++static void tosakbd_timer_callback(unsigned long __dev)
++{
++ struct platform_device *dev = (struct platform_device *)__dev;
++ tosakbd_scankeyboard(dev);
++}
++
++#ifdef CONFIG_PM
++static int tosakbd_suspend(struct platform_device *dev, pm_message_t state)
++{
++ struct tosakbd *tosakbd = platform_get_drvdata(dev);
++
++ del_timer_sync(&tosakbd->timer);
++
++ return 0;
++}
++
++static int tosakbd_resume(struct platform_device *dev)
++{
++ tosakbd_scankeyboard(dev);
++
++ return 0;
++}
++#else
++#define tosakbd_suspend NULL
++#define tosakbd_resume NULL
++#endif
++
++static int __devinit tosakbd_probe(struct platform_device *pdev) {
++
++ int i;
++ struct tosakbd *tosakbd;
++ struct input_dev *input_dev;
++ int error;
++
++ tosakbd = kzalloc(sizeof(struct tosakbd), GFP_KERNEL);
++ if (!tosakbd)
++ return -ENOMEM;
++
++ input_dev = input_allocate_device();
++ if (!input_dev) {
++ kfree(tosakbd);
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(pdev, tosakbd);
++
++ spin_lock_init(&tosakbd->lock);
++
++ /* Init Keyboard rescan timer */
++ init_timer(&tosakbd->timer);
++ tosakbd->timer.function = tosakbd_timer_callback;
++ tosakbd->timer.data = (unsigned long) pdev;
++
++ tosakbd->input = input_dev;
++
++ input_set_drvdata(input_dev, tosakbd);
++ input_dev->name = "Tosa Keyboard";
++ input_dev->phys = "tosakbd/input0";
++ input_dev->dev.parent = &pdev->dev;
++
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->id.vendor = 0x0001;
++ input_dev->id.product = 0x0001;
++ input_dev->id.version = 0x0100;
++
++ input_dev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP);
++ input_dev->keycode = tosakbd->keycode;
++ input_dev->keycodesize = sizeof(unsigned int);
++ input_dev->keycodemax = ARRAY_SIZE(tosakbd_keycode);
++
++ memcpy(tosakbd->keycode, tosakbd_keycode, sizeof(tosakbd_keycode));
++
++ for (i = 0; i < ARRAY_SIZE(tosakbd_keycode); i++)
++ __set_bit(tosakbd->keycode[i], input_dev->keybit);
++ clear_bit(0, input_dev->keybit);
++
++ /* Setup sense interrupts - RisingEdge Detect, sense lines as inputs */
++ for (i = 0; i < TOSA_KEY_SENSE_NUM; i++) {
++ int gpio = TOSA_GPIO_KEY_SENSE(i);
++ int irq;
++ error = gpio_request(gpio, "tosakbd");
++ if (error < 0) {
++ printk(KERN_ERR "tosakbd: failed to request GPIO %d, "
++ " error %d\n", gpio, error);
++ goto fail;
++ }
++
++ error = gpio_direction_input(TOSA_GPIO_KEY_SENSE(i));
++ if (error < 0) {
++ printk(KERN_ERR "tosakbd: failed to configure input"
++ " direction for GPIO %d, error %d\n",
++ gpio, error);
++ gpio_free(gpio);
++ goto fail;
++ }
++
++ irq = gpio_to_irq(gpio);
++ if (irq < 0) {
++ error = irq;
++ printk(KERN_ERR "gpio-keys: Unable to get irq number"
++ " for GPIO %d, error %d\n",
++ gpio, error);
++ gpio_free(gpio);
++ goto fail;
++ }
++
++ error = request_irq(irq, tosakbd_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING,
++ "tosakbd", pdev);
++
++ if (error) {
++ printk("tosakbd: Can't get IRQ: %d: error %d!\n",
++ irq, error);
++ gpio_free(gpio);
++ goto fail;
++ }
++ }
++
++ /* Set Strobe lines as outputs - set high */
++ for (i = 0; i < TOSA_KEY_STROBE_NUM; i++) {
++ int gpio = TOSA_GPIO_KEY_STROBE(i);
++ error = gpio_request(gpio, "tosakbd");
++ if (error < 0) {
++ printk(KERN_ERR "tosakbd: failed to request GPIO %d, "
++ " error %d\n", gpio, error);
++ goto fail2;
++ }
++
++ error = gpio_direction_output(gpio, 1);
++ if (error < 0) {
++ printk(KERN_ERR "tosakbd: failed to configure input"
++ " direction for GPIO %d, error %d\n",
++ gpio, error);
++ gpio_free(gpio);
++ goto fail;
++ }
++
++ }
++
++ error = input_register_device(input_dev);
++ if (error) {
++ printk(KERN_ERR "tosakbd: Unable to register input device, "
++ "error: %d\n", error);
++ goto fail;
++ }
++
++ printk(KERN_INFO "input: Tosa Keyboard Registered\n");
++
++ return 0;
++
++fail2:
++ while (--i >= 0)
++ gpio_free(TOSA_GPIO_KEY_STROBE(i));
++
++ i = TOSA_KEY_SENSE_NUM;
++fail:
++ while (--i >= 0) {
++ free_irq(gpio_to_irq(TOSA_GPIO_KEY_SENSE(i)), pdev);
++ gpio_free(TOSA_GPIO_KEY_SENSE(i));
++ }
++
++ platform_set_drvdata(pdev, NULL);
++ input_free_device(input_dev);
++ kfree(tosakbd);
++
++ return error;
++}
++
++static int __devexit tosakbd_remove(struct platform_device *dev) {
++
++ int i;
++ struct tosakbd *tosakbd = platform_get_drvdata(dev);
++
++ for (i = 0; i < TOSA_KEY_STROBE_NUM; i++)
++ gpio_free(TOSA_GPIO_KEY_STROBE(i));
++
++ for (i = 0; i < TOSA_KEY_SENSE_NUM; i++) {
++ free_irq(gpio_to_irq(TOSA_GPIO_KEY_SENSE(i)), dev);
++ gpio_free(TOSA_GPIO_KEY_SENSE(i));
++ }
++
++ del_timer_sync(&tosakbd->timer);
++
++ input_unregister_device(tosakbd->input);
++
++ kfree(tosakbd);
++
++ return 0;
++}
++
++static struct platform_driver tosakbd_driver = {
++ .probe = tosakbd_probe,
++ .remove = __devexit_p(tosakbd_remove),
++ .suspend = tosakbd_suspend,
++ .resume = tosakbd_resume,
++ .driver = {
++ .name = "tosa-keyboard",
++ },
++};
++
++static int __devinit tosakbd_init(void)
++{
++ return platform_driver_register(&tosakbd_driver);
++}
++
++static void __exit tosakbd_exit(void)
++{
++ platform_driver_unregister(&tosakbd_driver);
++}
++
++module_init(tosakbd_init);
++module_exit(tosakbd_exit);
++
++MODULE_AUTHOR("Dirk Opfer <Dirk@Opfer-Online.de>");
++MODULE_DESCRIPTION("Tosa Keyboard Driver");
++MODULE_LICENSE("GPL v2");
+diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h
+index c3364a2..c05e4fa 100644
+--- a/include/asm-arm/arch-pxa/tosa.h
++++ b/include/asm-arm/arch-pxa/tosa.h
+@@ -163,4 +163,34 @@
+
+ extern struct platform_device tosascoop_jc_device;
+ extern struct platform_device tosascoop_device;
++
++#define TOSA_KEY_SYNC KEY_102ND /* ??? */
++
++
++#ifndef CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES
++#define TOSA_KEY_RECORD KEY_YEN
++#define TOSA_KEY_ADDRESSBOOK KEY_KATAKANA
++#define TOSA_KEY_CANCEL KEY_ESC
++#define TOSA_KEY_CENTER KEY_HIRAGANA
++#define TOSA_KEY_OK KEY_HENKAN
++#define TOSA_KEY_CALENDAR KEY_KATAKANAHIRAGANA
++#define TOSA_KEY_HOMEPAGE KEY_HANGEUL
++#define TOSA_KEY_LIGHT KEY_MUHENKAN
++#define TOSA_KEY_MENU KEY_HANJA
++#define TOSA_KEY_FN KEY_RIGHTALT
++#define TOSA_KEY_MAIL KEY_ZENKAKUHANKAKU
++#else
++#define TOSA_KEY_RECORD KEY_RECORD
++#define TOSA_KEY_ADDRESSBOOK KEY_ADDRESSBOOK
++#define TOSA_KEY_CANCEL KEY_CANCEL
++#define TOSA_KEY_CENTER KEY_SELECT /* ??? */
++#define TOSA_KEY_OK KEY_OK
++#define TOSA_KEY_CALENDAR KEY_CALENDAR
++#define TOSA_KEY_HOMEPAGE KEY_HOMEPAGE
++#define TOSA_KEY_LIGHT KEY_KBDILLUMTOGGLE
++#define TOSA_KEY_MENU KEY_MENU
++#define TOSA_KEY_FN KEY_FN
++#define TOSA_KEY_MAIL KEY_MAIL
++#endif
++
+ #endif /* _ASM_ARCH_TOSA_H_ */
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch b/packages/linux/linux-rp-2.6.24/tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch
new file mode 100644
index 0000000000..082a2c72b8
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch
@@ -0,0 +1,61 @@
+From 18c1a92a09faf75ebdac7ac471c741a6622cf3e2 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:27:49 +0300
+Subject: [PATCH 13/64] USB: gadget: pxa2xx_udc supports inverted vbus
+
+Some boards (like e.g. Tosa) invert the VBUS-detection signal:
+it's low when a host is supplying VBUS, and high otherwise.
+Allow specifying whether gpio_vbus value is inverted.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+---
+ drivers/usb/gadget/pxa2xx_udc.c | 9 +++++++--
+ include/asm-arm/mach/udc_pxa2xx.h | 2 ++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
+index 3173b39..4f7d4ef 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.c
++++ b/drivers/usb/gadget/pxa2xx_udc.c
+@@ -127,8 +127,10 @@ static int is_vbus_present(void)
+ {
+ struct pxa2xx_udc_mach_info *mach = the_controller->mach;
+
+- if (mach->gpio_vbus)
+- return gpio_get_value(mach->gpio_vbus);
++ if (mach->gpio_vbus) {
++ int value = gpio_get_value(mach->gpio_vbus);
++ return mach->gpio_vbus_inverted ? !value : value;
++ }
+ if (mach->udc_is_connected)
+ return mach->udc_is_connected();
+ return 1;
+@@ -1397,6 +1399,9 @@ static irqreturn_t udc_vbus_irq(int irq, void *_dev)
+ struct pxa2xx_udc *dev = _dev;
+ int vbus = gpio_get_value(dev->mach->gpio_vbus);
+
++ if (dev->mach->gpio_vbus_inverted)
++ vbus = !vbus;
++
+ pxa2xx_udc_vbus_session(&dev->gadget, vbus);
+ return IRQ_HANDLED;
+ }
+diff --git a/include/asm-arm/mach/udc_pxa2xx.h b/include/asm-arm/mach/udc_pxa2xx.h
+index ff0a957..f191e14 100644
+--- a/include/asm-arm/mach/udc_pxa2xx.h
++++ b/include/asm-arm/mach/udc_pxa2xx.h
+@@ -19,7 +19,9 @@ struct pxa2xx_udc_mach_info {
+ * with on-chip GPIOs not Lubbock's wierd hardware, can have a sane
+ * VBUS IRQ and omit the methods above. Store the GPIO number
+ * here; for GPIO 0, also mask in one of the pxa_gpio_mode() bits.
++ * Note that sometimes the signals go through inverters...
+ */
++ bool gpio_vbus_inverted;
+ u16 gpio_vbus; /* high == vbus present */
+ u16 gpio_pullup; /* high == pullup activated */
+ };
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0014-tosa_udc_use_gpio_vbus.patch.patch b/packages/linux/linux-rp-2.6.24/tosa/0014-tosa_udc_use_gpio_vbus.patch.patch
new file mode 100644
index 0000000000..98783efea0
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0014-tosa_udc_use_gpio_vbus.patch.patch
@@ -0,0 +1,38 @@
+From 932ff38b17c7847c43e2bad01b510b64c27f9810 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:27:59 +0300
+Subject: [PATCH 14/64] tosa_udc_use_gpio_vbus.patch
+
+Use gpio_vbus instead of udc_is_connected for udc on tosa.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+ arch/arm/mach-pxa/tosa.c | 9 ++-------
+ 1 files changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index e7e0f52..5268e94 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -159,15 +159,10 @@ static void tosa_udc_command(int cmd)
+ }
+ }
+
+-static int tosa_udc_is_connected(void)
+-{
+- return ((GPLR(TOSA_GPIO_USB_IN) & GPIO_bit(TOSA_GPIO_USB_IN)) == 0);
+-}
+-
+-
+ static struct pxa2xx_udc_mach_info udc_info __initdata = {
+ .udc_command = tosa_udc_command,
+- .udc_is_connected = tosa_udc_is_connected,
++ .gpio_vbus = TOSA_GPIO_USB_IN,
++ .gpio_vbus_inverted = 1,
+ };
+
+ /*
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0015-sharpsl-export-params.patch b/packages/linux/linux-rp-2.6.24/tosa/0015-sharpsl-export-params.patch
new file mode 100644
index 0000000000..f8e57e8306
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0015-sharpsl-export-params.patch
@@ -0,0 +1,32 @@
+From bba216220d17d1091413e82c9924ac5614402c05 Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Wed, 9 Jan 2008 01:28:06 +0300
+Subject: [PATCH 15/64] sharpsl export params
+
+---
+ arch/arm/common/sharpsl_param.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/common/sharpsl_param.c b/arch/arm/common/sharpsl_param.c
+index aad4d94..d56c932 100644
+--- a/arch/arm/common/sharpsl_param.c
++++ b/arch/arm/common/sharpsl_param.c
+@@ -12,6 +12,7 @@
+ */
+
+ #include <linux/kernel.h>
++#include <linux/module.h>
+ #include <linux/string.h>
+ #include <asm/mach/sharpsl_param.h>
+
+@@ -36,6 +37,7 @@
+ #define PHAD_MAGIC MAGIC_CHG('P','H','A','D')
+
+ struct sharpsl_param_info sharpsl_param;
++EXPORT_SYMBOL(sharpsl_param);
+
+ void sharpsl_save_param(void)
+ {
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch b/packages/linux/linux-rp-2.6.24/tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch
new file mode 100644
index 0000000000..d73de0698c
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch
@@ -0,0 +1,44 @@
+From 0fe7b491b70efafbd41185f8e95a3eada65984a1 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 28 Jan 2008 01:49:28 +0300
+Subject: [PATCH 16/64] This patch fixes the pxa25x clocks definitions to add hwuart.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/pxa25x.c | 9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
+index 9732d5d..006a6e0 100644
+--- a/arch/arm/mach-pxa/pxa25x.c
++++ b/arch/arm/mach-pxa/pxa25x.c
+@@ -111,11 +111,14 @@ static const struct clkops clk_pxa25x_lcd_ops = {
+ * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz
+ * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly)
+ */
++static struct clk pxa25x_hwuart_clk =
++ INIT_CKEN("UARTCLK", HWUART, 14745600, 1, &pxa_device_hwuart.dev)
++;
++
+ static struct clk pxa25x_clks[] = {
+ INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev),
+ INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev),
+ INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
+- INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
+ INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
+ INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev),
+ INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
+@@ -303,6 +306,10 @@ static int __init pxa25x_init(void)
+ {
+ int ret = 0;
+
++ /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
++ if (cpu_is_pxa25x())
++ clks_register(&pxa25x_hwuart_clk, 1);
++
+ if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
+ clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks));
+
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch b/packages/linux/linux-rp-2.6.24/tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch
new file mode 100644
index 0000000000..5163361da3
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch
@@ -0,0 +1,280 @@
+From 71857e8f6c4a8d2d3eac3037f02e0c30c6fdb37e Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:43:28 +0300
+Subject: [PATCH 17/64] Convert pxa2xx UDC to use debugfs
+
+Use debugfs instead of /proc/driver/udc
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/usb/gadget/pxa2xx_udc.c | 100 +++++++++++++++++----------------------
+ drivers/usb/gadget/pxa2xx_udc.h | 10 +++-
+ 2 files changed, 51 insertions(+), 59 deletions(-)
+
+diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
+index 4f7d4ef..2900556 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.c
++++ b/drivers/usb/gadget/pxa2xx_udc.c
+@@ -38,13 +38,14 @@
+ #include <linux/timer.h>
+ #include <linux/list.h>
+ #include <linux/interrupt.h>
+-#include <linux/proc_fs.h>
+ #include <linux/mm.h>
+ #include <linux/platform_device.h>
+ #include <linux/dma-mapping.h>
+ #include <linux/irq.h>
+ #include <linux/clk.h>
+ #include <linux/err.h>
++#include <linux/seq_file.h>
++#include <linux/debugfs.h>
+
+ #include <asm/byteorder.h>
+ #include <asm/dma.h>
+@@ -993,45 +994,36 @@ static const struct usb_gadget_ops pxa2xx_udc_ops = {
+
+ /*-------------------------------------------------------------------------*/
+
+-#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+-
+-static const char proc_node_name [] = "driver/udc";
++#ifdef CONFIG_USB_GADGET_DEBUG_FS
+
++static struct pxa2xx_udc memory;
+ static int
+-udc_proc_read(char *page, char **start, off_t off, int count,
+- int *eof, void *_dev)
++udc_seq_show(struct seq_file *m, void *d)
+ {
+- char *buf = page;
+- struct pxa2xx_udc *dev = _dev;
+- char *next = buf;
+- unsigned size = count;
++ struct pxa2xx_udc *dev = m->private;
+ unsigned long flags;
+- int i, t;
++ int i;
+ u32 tmp;
+
+- if (off != 0)
+- return 0;
++
++ BUG_ON(dev == NULL);
+
+ local_irq_save(flags);
+
+ /* basic device status */
+- t = scnprintf(next, size, DRIVER_DESC "\n"
++ seq_printf(m, DRIVER_DESC "\n"
+ "%s version: %s\nGadget driver: %s\nHost %s\n\n",
+ driver_name, DRIVER_VERSION SIZE_STR "(pio)",
+ dev->driver ? dev->driver->driver.name : "(none)",
+ is_vbus_present() ? "full speed" : "disconnected");
+- size -= t;
+- next += t;
+
+ /* registers for device and ep0 */
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n",
+ UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL);
+- size -= t;
+- next += t;
+
+ tmp = UDCCR;
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "udccr %02X =%s%s%s%s%s%s%s%s\n", tmp,
+ (tmp & UDCCR_REM) ? " rem" : "",
+ (tmp & UDCCR_RSTIR) ? " rstir" : "",
+@@ -1041,11 +1033,9 @@ udc_proc_read(char *page, char **start, off_t off, int count,
+ (tmp & UDCCR_RSM) ? " rsm" : "",
+ (tmp & UDCCR_UDA) ? " uda" : "",
+ (tmp & UDCCR_UDE) ? " ude" : "");
+- size -= t;
+- next += t;
+
+ tmp = UDCCS0;
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "udccs0 %02X =%s%s%s%s%s%s%s%s\n", tmp,
+ (tmp & UDCCS0_SA) ? " sa" : "",
+ (tmp & UDCCS0_RNE) ? " rne" : "",
+@@ -1055,28 +1045,22 @@ udc_proc_read(char *page, char **start, off_t off, int count,
+ (tmp & UDCCS0_FTF) ? " ftf" : "",
+ (tmp & UDCCS0_IPR) ? " ipr" : "",
+ (tmp & UDCCS0_OPR) ? " opr" : "");
+- size -= t;
+- next += t;
+
+ if (dev->has_cfr) {
+ tmp = UDCCFR;
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "udccfr %02X =%s%s\n", tmp,
+ (tmp & UDCCFR_AREN) ? " aren" : "",
+ (tmp & UDCCFR_ACM) ? " acm" : "");
+- size -= t;
+- next += t;
+ }
+
+ if (!is_vbus_present() || !dev->driver)
+ goto done;
+
+- t = scnprintf(next, size, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n",
++ seq_printf(m, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n",
+ dev->stats.write.bytes, dev->stats.write.ops,
+ dev->stats.read.bytes, dev->stats.read.ops,
+ dev->stats.irqs);
+- size -= t;
+- next += t;
+
+ /* dump endpoint queues */
+ for (i = 0; i < PXA_UDC_NUM_ENDPOINTS; i++) {
+@@ -1090,55 +1074,57 @@ udc_proc_read(char *page, char **start, off_t off, int count,
+ if (!d)
+ continue;
+ tmp = *dev->ep [i].reg_udccs;
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "%s max %d %s udccs %02x irqs %lu\n",
+ ep->ep.name, le16_to_cpu (d->wMaxPacketSize),
+ "pio", tmp, ep->pio_irqs);
+ /* TODO translate all five groups of udccs bits! */
+
+ } else /* ep0 should only have one transfer queued */
+- t = scnprintf(next, size, "ep0 max 16 pio irqs %lu\n",
++ seq_printf(m, "ep0 max 16 pio irqs %lu\n",
+ ep->pio_irqs);
+- if (t <= 0 || t > size)
+- goto done;
+- size -= t;
+- next += t;
+
+ if (list_empty(&ep->queue)) {
+- t = scnprintf(next, size, "\t(nothing queued)\n");
+- if (t <= 0 || t > size)
+- goto done;
+- size -= t;
+- next += t;
++ seq_printf(m, "\t(nothing queued)\n");
+ continue;
+ }
+ list_for_each_entry(req, &ep->queue, queue) {
+- t = scnprintf(next, size,
++ seq_printf(m,
+ "\treq %p len %d/%d buf %p\n",
+ &req->req, req->req.actual,
+ req->req.length, req->req.buf);
+- if (t <= 0 || t > size)
+- goto done;
+- size -= t;
+- next += t;
+ }
+ }
+
+ done:
+ local_irq_restore(flags);
+- *eof = 1;
+- return count - size;
++ return 0;
+ }
+
+-#define create_proc_files() \
+- create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev)
+-#define remove_proc_files() \
+- remove_proc_entry(proc_node_name, NULL)
++static int
++udc_debugfs_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, udc_seq_show, inode->i_private);
++}
++
++static const struct file_operations debug_fops = {
++ .open = udc_debugfs_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++ .owner = THIS_MODULE,
++};
++
++#define create_debug_files(dev) \
++ dev->debugfs_udc = debugfs_create_file(dev->gadget.name, S_IRUGO, \
++ NULL, dev, &debug_fops)
++#define remove_debug_files(dev) \
++ if (dev->debugfs_udc) debugfs_remove(dev->debugfs_udc)
+
+ #else /* !CONFIG_USB_GADGET_DEBUG_FILES */
+
+-#define create_proc_files() do {} while (0)
+-#define remove_proc_files() do {} while (0)
++#define create_debug_files(dev) do {} while (0)
++#define remove_debug_files(dev) do {} while (0)
+
+ #endif /* CONFIG_USB_GADGET_DEBUG_FILES */
+
+@@ -2245,7 +2231,7 @@ lubbock_fail0:
+ goto err_vbus_irq;
+ }
+ }
+- create_proc_files();
++ create_debug_files(dev);
+
+ return 0;
+
+@@ -2282,7 +2268,7 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
+ return -EBUSY;
+
+ udc_disable(dev);
+- remove_proc_files();
++ remove_debug_files(dev);
+
+ if (dev->got_irq) {
+ free_irq(platform_get_irq(pdev, 0), dev);
+diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h
+index 1db46d7..c08b1a2 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.h
++++ b/drivers/usb/gadget/pxa2xx_udc.h
+@@ -129,6 +129,10 @@ struct pxa2xx_udc {
+ struct pxa2xx_udc_mach_info *mach;
+ u64 dma_mask;
+ struct pxa2xx_ep ep [PXA_UDC_NUM_ENDPOINTS];
++
++#ifdef CONFIG_USB_GADGET_DEBUG_FS
++ struct dentry *debugfs_udc;
++#endif
+ };
+
+ /*-------------------------------------------------------------------------*/
+@@ -153,6 +157,8 @@ static struct pxa2xx_udc *the_controller;
+
+ #ifdef DEBUG
+
++static int is_vbus_present(void);
++
+ static const char *state_name[] = {
+ "EP0_IDLE",
+ "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE",
+@@ -207,8 +213,7 @@ dump_state(struct pxa2xx_udc *dev)
+ unsigned i;
+
+ DMSG("%s %s, uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n",
+- //is_usb_connected() ? "host " : "disconnected",
+- "host ",
++ is_vbus_present() ? "host " : "disconnected",
+ state_name[dev->ep0state],
+ UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL);
+ dump_udccr("udccr");
+@@ -224,7 +230,7 @@ dump_state(struct pxa2xx_udc *dev)
+ } else
+ DMSG("ep0 driver '%s'\n", dev->driver->driver.name);
+
+- //if (!is_usb_connected())
+- // return;
++ if (!is_vbus_present())
++ return;
+
+ dump_udccs0 ("udccs0");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch b/packages/linux/linux-rp-2.6.24/tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch
new file mode 100644
index 0000000000..7bf4ad02d6
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch
@@ -0,0 +1,225 @@
+From b9a0fdbf333b461682d5da8b9aaa42f4de91ffcf Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 10 Feb 2008 03:29:17 +0300
+Subject: [PATCH 18/64] Fix the pxa2xx_udc to balance calls to clk_enable/clk_disable
+
+Signed-off-by: Dmitry Baryshkov dbaryshkov@gmail.com
+---
+ drivers/usb/gadget/pxa2xx_udc.c | 84 +++++++++++++++++++++++----------------
+ drivers/usb/gadget/pxa2xx_udc.h | 6 ++-
+ 2 files changed, 54 insertions(+), 36 deletions(-)
+
+diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
+index 2900556..8e32d07 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.c
++++ b/drivers/usb/gadget/pxa2xx_udc.c
+@@ -680,7 +680,7 @@ pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
+
+ /* kickstart this i/o queue? */
+ if (list_empty(&ep->queue) && !ep->stopped) {
+- if (ep->desc == 0 /* ep0 */) {
++ if (ep->desc == NULL /* ep0 */) {
+ unsigned length = _req->length;
+
+ switch (dev->ep0state) {
+@@ -734,7 +734,7 @@ pxa2xx_ep_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
+ }
+
+ /* pio or dma irq handler advances the queue. */
+- if (likely (req != 0))
++ if (likely (req != NULL))
+ list_add_tail(&req->queue, &ep->queue);
+ local_irq_restore(flags);
+
+@@ -934,20 +934,35 @@ static void udc_disable(struct pxa2xx_udc *);
+ /* We disable the UDC -- and its 48 MHz clock -- whenever it's not
+ * in active use.
+ */
+-static int pullup(struct pxa2xx_udc *udc, int is_active)
++static int pullup(struct pxa2xx_udc *udc)
+ {
+- is_active = is_active && udc->vbus && udc->pullup;
++ int is_active = udc->vbus && udc->pullup && ! udc->suspended;
+ DMSG("%s\n", is_active ? "active" : "inactive");
+- if (is_active)
+- udc_enable(udc);
+- else {
+- if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
+- DMSG("disconnect %s\n", udc->driver
+- ? udc->driver->driver.name
+- : "(no driver)");
+- stop_activity(udc, udc->driver);
++ if (is_active) {
++ if (!udc->active) {
++ udc->active = 1;
++#ifdef CONFIG_ARCH_PXA
++ /* Enable clock for USB device */
++ clk_enable(udc->clk);
++#endif
++ udc_enable(udc);
+ }
+- udc_disable(udc);
++ } else {
++ if (udc->active) {
++ if (udc->gadget.speed != USB_SPEED_UNKNOWN) {
++ DMSG("disconnect %s\n", udc->driver
++ ? udc->driver->driver.name
++ : "(no driver)");
++ stop_activity(udc, udc->driver);
++ }
++ udc_disable(udc);
++#ifdef CONFIG_ARCH_PXA
++ /* Disable clock for USB device */
++ clk_disable(udc->clk);
++#endif
++ udc->active = 0;
++ }
++
+ }
+ return 0;
+ }
+@@ -958,9 +973,9 @@ static int pxa2xx_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
+ struct pxa2xx_udc *udc;
+
+ udc = container_of(_gadget, struct pxa2xx_udc, gadget);
+- udc->vbus = is_active = (is_active != 0);
++ udc->vbus = (is_active != 0);
+ DMSG("vbus %s\n", is_active ? "supplied" : "inactive");
+- pullup(udc, is_active);
++ pullup(udc);
+ return 0;
+ }
+
+@@ -975,9 +990,8 @@ static int pxa2xx_udc_pullup(struct usb_gadget *_gadget, int is_active)
+ if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
+ return -EOPNOTSUPP;
+
+- is_active = (is_active != 0);
+- udc->pullup = is_active;
+- pullup(udc, is_active);
++ udc->pullup = (is_active != 0);
++ pullup(udc);
+ return 0;
+ }
+
+@@ -998,7 +1012,7 @@ static const struct usb_gadget_ops pxa2xx_udc_ops = {
+
+ static struct pxa2xx_udc memory;
+ static int
+-udc_seq_show(struct seq_file *m, void *d)
++udc_seq_show(struct seq_file *m, void *_d)
+ {
+ struct pxa2xx_udc *dev = m->private;
+ unsigned long flags;
+@@ -1145,11 +1159,6 @@ static void udc_disable(struct pxa2xx_udc *dev)
+
+ udc_clear_mask_UDCCR(UDCCR_UDE);
+
+-#ifdef CONFIG_ARCH_PXA
+- /* Disable clock for USB device */
+- clk_disable(dev->clk);
+-#endif
+-
+ ep0_idle (dev);
+ dev->gadget.speed = USB_SPEED_UNKNOWN;
+ }
+@@ -1190,11 +1199,6 @@ static void udc_enable (struct pxa2xx_udc *dev)
+ {
+ udc_clear_mask_UDCCR(UDCCR_UDE);
+
+-#ifdef CONFIG_ARCH_PXA
+- /* Enable clock for USB device */
+- clk_enable(dev->clk);
+-#endif
+-
+ /* try to clear these bits before we enable the udc */
+ udc_ack_int_UDCCR(UDCCR_SUSIR|/*UDCCR_RSTIR|*/UDCCR_RESIR);
+
+@@ -1285,7 +1289,7 @@ fail:
+ * for set_configuration as well as eventual disconnect.
+ */
+ DMSG("registered gadget driver '%s'\n", driver->driver.name);
+- pullup(dev, 1);
++ pullup(dev);
+ dump_state(dev);
+ return 0;
+ }
+@@ -1328,7 +1332,8 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
+ return -EINVAL;
+
+ local_irq_disable();
+- pullup(dev, 0);
++ dev->pullup = 0;
++ pullup(dev);
+ stop_activity(dev, driver);
+ local_irq_enable();
+
+@@ -2267,7 +2272,9 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
+ if (dev->driver)
+ return -EBUSY;
+
+- udc_disable(dev);
++ dev->pullup = 0;
++ pullup(dev);
++
+ remove_debug_files(dev);
+
+ if (dev->got_irq) {
+@@ -2315,10 +2322,15 @@ static int __exit pxa2xx_udc_remove(struct platform_device *pdev)
+ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state)
+ {
+ struct pxa2xx_udc *udc = platform_get_drvdata(dev);
++ unsigned long flags;
+
+ if (!udc->mach->gpio_pullup && !udc->mach->udc_command)
+ WARN("USB host won't detect disconnect!\n");
+- pullup(udc, 0);
++ udc->suspended = 1;
++
++ local_irq_save(flags);
++ pullup(udc);
++ local_irq_restore(flags);
+
+ return 0;
+ }
+@@ -2326,8 +2338,12 @@ static int pxa2xx_udc_suspend(struct platform_device *dev, pm_message_t state)
+ static int pxa2xx_udc_resume(struct platform_device *dev)
+ {
+ struct pxa2xx_udc *udc = platform_get_drvdata(dev);
++ unsigned long flags;
+
+- pullup(udc, 1);
++ udc->suspended = 0;
++ local_irq_save(flags);
++ pullup(udc);
++ local_irq_restore(flags);
+
+ return 0;
+ }
+diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h
+index c08b1a2..93586b2 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.h
++++ b/drivers/usb/gadget/pxa2xx_udc.h
+@@ -119,7 +119,9 @@ struct pxa2xx_udc {
+ has_cfr : 1,
+ req_pending : 1,
+ req_std : 1,
+- req_config : 1;
++ req_config : 1,
++ suspended : 1,
++ active : 1;
+
+ #define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200))
+ struct timer_list timer;
+@@ -239,7 +241,7 @@ dump_state(struct pxa2xx_udc *dev)
+ dev->stats.read.bytes, dev->stats.read.ops);
+
+ for (i = 1; i < PXA_UDC_NUM_ENDPOINTS; i++) {
+- if (dev->ep [i].desc == 0)
++ if (dev->ep [i].desc == NULL)
+ continue;
+ DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccs);
+ }
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0019-pxa-remove-periodic-mode-emulation-support.patch b/packages/linux/linux-rp-2.6.24/tosa/0019-pxa-remove-periodic-mode-emulation-support.patch
new file mode 100644
index 0000000000..4b4107d655
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0019-pxa-remove-periodic-mode-emulation-support.patch
@@ -0,0 +1,128 @@
+From bda65817167cce5294e1d84670f36815262ed550 Mon Sep 17 00:00:00 2001
+From: Russell King <rmk@dyn-67.arm.linux.org.uk>
+Date: Sun, 3 Feb 2008 21:58:12 +0300
+Subject: [PATCH 19/64] pxa: remove periodic mode emulation support
+
+Apparantly, the generic time subsystem can accurately emulate periodic
+mode via the one-shot support code, so we don't need our own periodic
+emulation code anymore. Just ensure that we build support for one shot
+into the generic time subsystem.
+
+Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-pxa/time.c | 61 ++++++----------------------------------------
+ 2 files changed, 9 insertions(+), 53 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index a04f507..1be7182 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -345,6 +345,7 @@ config ARCH_PXA
+ select GENERIC_GPIO
+ select GENERIC_TIME
+ select GENERIC_CLOCKEVENTS
++ select TICK_ONESHOT
+ help
+ Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
+
+diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
+index fbfa192..3c4abbf 100644
+--- a/arch/arm/mach-pxa/time.c
++++ b/arch/arm/mach-pxa/time.c
+@@ -59,55 +59,17 @@ unsigned long long sched_clock(void)
+ }
+
+
++#define MIN_OSCR_DELTA 16
++
+ static irqreturn_t
+ pxa_ost0_interrupt(int irq, void *dev_id)
+ {
+- int next_match;
+ struct clock_event_device *c = dev_id;
+
+- if (c->mode == CLOCK_EVT_MODE_ONESHOT) {
+- /* Disarm the compare/match, signal the event. */
+- OIER &= ~OIER_E0;
+- OSSR = OSSR_M0;
+- c->event_handler(c);
+- } else if (c->mode == CLOCK_EVT_MODE_PERIODIC) {
+- /* Call the event handler as many times as necessary
+- * to recover missed events, if any (if we update
+- * OSMR0 and OSCR0 is still ahead of us, we've missed
+- * the event). As we're dealing with that, re-arm the
+- * compare/match for the next event.
+- *
+- * HACK ALERT:
+- *
+- * There's a latency between the instruction that
+- * writes to OSMR0 and the actual commit to the
+- * physical hardware, because the CPU doesn't (have
+- * to) run at bus speed, there's a write buffer
+- * between the CPU and the bus, etc. etc. So if the
+- * target OSCR0 is "very close", to the OSMR0 load
+- * value, the update to OSMR0 might not get to the
+- * hardware in time and we'll miss that interrupt.
+- *
+- * To be safe, if the new OSMR0 is "very close" to the
+- * target OSCR0 value, we call the event_handler as
+- * though the event actually happened. According to
+- * Nico's comment in the previous version of this
+- * code, experience has shown that 6 OSCR ticks is
+- * "very close" but he went with 8. We will use 16,
+- * based on the results of testing on PXA270.
+- *
+- * To be doubly sure, we also tell clkevt via
+- * clockevents_register_device() not to ask for
+- * anything that might put us "very close".
+- */
+-#define MIN_OSCR_DELTA 16
+- do {
+- OSSR = OSSR_M0;
+- next_match = (OSMR0 += LATCH);
+- c->event_handler(c);
+- } while (((signed long)(next_match - OSCR) <= MIN_OSCR_DELTA)
+- && (c->mode == CLOCK_EVT_MODE_PERIODIC));
+- }
++ /* Disarm the compare/match, signal the event. */
++ OIER &= ~OIER_E0;
++ OSSR = OSSR_M0;
++ c->event_handler(c);
+
+ return IRQ_HANDLED;
+ }
+@@ -133,14 +95,6 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
+ unsigned long irqflags;
+
+ switch (mode) {
+- case CLOCK_EVT_MODE_PERIODIC:
+- raw_local_irq_save(irqflags);
+- OSSR = OSSR_M0;
+- OIER |= OIER_E0;
+- OSMR0 = OSCR + LATCH;
+- raw_local_irq_restore(irqflags);
+- break;
+-
+ case CLOCK_EVT_MODE_ONESHOT:
+ raw_local_irq_save(irqflags);
+ OIER &= ~OIER_E0;
+@@ -158,13 +112,14 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
+ break;
+
+ case CLOCK_EVT_MODE_RESUME:
++ case CLOCK_EVT_MODE_PERIODIC:
+ break;
+ }
+ }
+
+ static struct clock_event_device ckevt_pxa_osmr0 = {
+ .name = "osmr0",
+- .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
++ .features = CLOCK_EVT_FEAT_ONESHOT,
+ .shift = 32,
+ .rating = 200,
+ .cpumask = CPU_MASK_CPU0,
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch b/packages/linux/linux-rp-2.6.24/tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch
new file mode 100644
index 0000000000..0a42bc5855
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch
@@ -0,0 +1,257 @@
+From ee8ca5742e0000dd2369ef4d328c2c1117276a3b Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 02:56:28 +0300
+Subject: [PATCH 20/64] Provide dew device/clock backports from 2.6.24-git
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-pxa/devices.h | 12 ++++++++++++
+ arch/arm/mach-pxa/pxa25x.c | 18 ++++++++++++------
+ arch/arm/mach-pxa/pxa27x.c | 22 ++++++++++++++++------
+ arch/arm/mach-pxa/pxa3xx.c | 30 ++++++++++++++++++++++++++++++
+ kernel/Makefile | 1 +
+ 6 files changed, 72 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 1be7182..10faf9c 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -367,6 +367,7 @@ config ARCH_SA1100
+ select ARCH_DISCONTIGMEM_ENABLE
+ select ARCH_MTD_XIP
+ select GENERIC_GPIO
++ select GENERIC_TIME
+ help
+ Support for StrongARM 11x0 based boards.
+
+diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
+index 94c8d5c..96c7c89 100644
+--- a/arch/arm/mach-pxa/devices.h
++++ b/arch/arm/mach-pxa/devices.h
+@@ -1,4 +1,6 @@
+ extern struct platform_device pxa_device_mci;
++extern struct platform_device pxa3xx_device_mci2;
++extern struct platform_device pxa3xx_device_mci3;
+ extern struct platform_device pxa_device_udc;
+ extern struct platform_device pxa_device_fb;
+ extern struct platform_device pxa_device_ffuart;
+@@ -12,3 +14,13 @@ extern struct platform_device pxa_device_rtc;
+
+ extern struct platform_device pxa27x_device_i2c_power;
+ extern struct platform_device pxa27x_device_ohci;
++
++extern struct platform_device pxa25x_device_ssp;
++extern struct platform_device pxa25x_device_nssp;
++extern struct platform_device pxa25x_device_assp;
++extern struct platform_device pxa27x_device_ssp1;
++extern struct platform_device pxa27x_device_ssp2;
++extern struct platform_device pxa27x_device_ssp3;
++extern struct platform_device pxa3xx_device_ssp4;
++
++void __init pxa_register_device(struct platform_device *dev, void *data);
+diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
+index 006a6e0..5988d99 100644
+--- a/arch/arm/mach-pxa/pxa25x.c
++++ b/arch/arm/mach-pxa/pxa25x.c
+@@ -123,12 +123,15 @@ static struct clk pxa25x_clks[] = {
+ INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev),
+ INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
+ INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
++
++ INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev),
++ INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev),
++ INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev),
++
+ /*
+ INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
+ INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
+- INIT_CKEN("SSPCLK", SSP, 3686400, 0, NULL),
+ INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL),
+- INIT_CKEN("NSSPCLK", NSSP, 3686400, 0, NULL),
+ */
+ INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
+ };
+@@ -216,8 +219,6 @@ static void pxa25x_cpu_pm_restore(unsigned long *sleep_save)
+
+ static void pxa25x_cpu_pm_enter(suspend_state_t state)
+ {
+- CKEN = 0;
+-
+ switch (state) {
+ case PM_SUSPEND_MEM:
+ /* set resume return address */
+@@ -239,6 +240,8 @@ static void __init pxa25x_init_pm(void)
+ {
+ pxa_cpu_pm_fns = &pxa25x_cpu_pm_fns;
+ }
++#else
++static inline void pxa25x_init_pm(void) {}
+ #endif
+
+ /* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm
+@@ -300,6 +303,9 @@ static struct platform_device *pxa25x_devices[] __initdata = {
+ &pxa_device_i2s,
+ &pxa_device_ficp,
+ &pxa_device_rtc,
++ &pxa25x_device_ssp,
++ &pxa25x_device_nssp,
++ &pxa25x_device_assp,
+ };
+
+ static int __init pxa25x_init(void)
+@@ -315,9 +321,9 @@ static int __init pxa25x_init(void)
+
+ if ((ret = pxa_init_dma(16)))
+ return ret;
+-#ifdef CONFIG_PM
++
+ pxa25x_init_pm();
+-#endif
++
+ ret = platform_add_devices(pxa25x_devices,
+ ARRAY_SIZE(pxa25x_devices));
+ }
+diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
+index 8e126e6..30ca4fd 100644
+--- a/arch/arm/mach-pxa/pxa27x.c
++++ b/arch/arm/mach-pxa/pxa27x.c
+@@ -150,11 +150,12 @@ static struct clk pxa27x_clks[] = {
+ INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
+ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
+
++ INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
++ INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
++ INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
++
+ /*
+ INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
+- INIT_CKEN("SSPCLK", SSP1, 13000000, 0, NULL),
+- INIT_CKEN("SSPCLK", SSP2, 13000000, 0, NULL),
+- INIT_CKEN("SSPCLK", SSP3, 13000000, 0, NULL),
+ INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL),
+ INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL),
+ INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL),
+@@ -304,6 +305,8 @@ static void __init pxa27x_init_pm(void)
+ {
+ pxa_cpu_pm_fns = &pxa27x_cpu_pm_fns;
+ }
++#else
++static inline void pxa27x_init_pm(void) {}
+ #endif
+
+ /* PXA27x: Various gpios can issue wakeup events. This logic only
+@@ -423,6 +426,11 @@ struct platform_device pxa27x_device_i2c_power = {
+ .num_resources = ARRAY_SIZE(i2c_power_resources),
+ };
+
++void __init pxa_set_i2c_power_info(struct i2c_pxa_platform_data *info)
++{
++ pxa27x_device_i2c_power.dev.platform_data = info;
++}
++
+ static struct platform_device *devices[] __initdata = {
+ &pxa_device_mci,
+ &pxa_device_udc,
+@@ -435,7 +443,9 @@ static struct platform_device *devices[] __initdata = {
+ &pxa_device_ficp,
+ &pxa_device_rtc,
+ &pxa27x_device_i2c_power,
+- &pxa27x_device_ohci,
++ &pxa27x_device_ssp1,
++ &pxa27x_device_ssp2,
++ &pxa27x_device_ssp3,
+ };
+
+ static int __init pxa27x_init(void)
+@@ -446,9 +456,9 @@ static int __init pxa27x_init(void)
+
+ if ((ret = pxa_init_dma(32)))
+ return ret;
+-#ifdef CONFIG_PM
++
+ pxa27x_init_pm();
+-#endif
++
+ ret = platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
+ return ret;
+diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
+index 61d9c9d..ccab9da 100644
+--- a/arch/arm/mach-pxa/pxa3xx.c
++++ b/arch/arm/mach-pxa/pxa3xx.c
+@@ -189,8 +189,31 @@ static struct clk pxa3xx_clks[] = {
+
+ PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
+ PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev),
++ PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
++
++ PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
++ PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
++ PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
++ PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev),
++
++ PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev),
++ PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev),
++ PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
+ };
+
++#ifdef CONFIG_PM
++#define SLEEP_SAVE_SIZE 4
++
++#define ISRAM_START 0x5c000000
++#define ISRAM_SIZE SZ_256K
++
++static inline void pxa3xx_init_pm(void) {}
++static inline void pxa3xx_init_irq_pm(void) {}
++#else
++static inline void pxa3xx_init_pm(void) {}
++static inline void pxa3xx_init_irq_pm(void) {}
++#endif
++
+ void __init pxa3xx_init_irq(void)
+ {
+ /* enable CP6 access */
+@@ -202,6 +225,7 @@ void __init pxa3xx_init_irq(void)
+ pxa_init_irq_low();
+ pxa_init_irq_high();
+ pxa_init_irq_gpio(128);
++ pxa3xx_init_irq_pm();
+ }
+
+ /*
+@@ -219,6 +243,10 @@ static struct platform_device *devices[] __initdata = {
+ &pxa_device_i2s,
+ &pxa_device_ficp,
+ &pxa_device_rtc,
++ &pxa27x_device_ssp1,
++ &pxa27x_device_ssp2,
++ &pxa27x_device_ssp3,
++ &pxa3xx_device_ssp4,
+ };
+
+ static int __init pxa3xx_init(void)
+@@ -231,6 +259,8 @@ static int __init pxa3xx_init(void)
+ if ((ret = pxa_init_dma(32)))
+ return ret;
+
++ pxa3xx_init_pm();
++
+ return platform_add_devices(devices, ARRAY_SIZE(devices));
+ }
+ return 0;
+diff --git a/kernel/Makefile b/kernel/Makefile
+index dfa9695..6d9a87c 100644
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -57,6 +57,7 @@ obj-$(CONFIG_SYSCTL) += utsname_sysctl.o
+ obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
+ obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
+ obj-$(CONFIG_MARKERS) += marker.o
++obj-$(CONFIG_LATENCYTOP) += latencytop.o
+
+ ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
+ # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch b/packages/linux/linux-rp-2.6.24/tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch
new file mode 100644
index 0000000000..3f8512128a
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch
@@ -0,0 +1,121 @@
+From b77665c545bc260d2b93add129413e4a724d7e6e Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell@users.sourceforge.net>
+Date: Fri, 18 Jan 2008 00:35:00 +0300
+Subject: [PATCH 21/64] Add an empty drivers/gpio directory for gpiolib infrastructure and GPIO
+ expanders. It will be populated by later patches.
+
+This won't be the only place to hold such gpio_chip code. Many external chips
+add a few GPIOs as secondary functionality (such as MFD drivers) and platform
+code frequently needs to closely integrate GPIO and IRQ support.
+
+This is placed *early* in the build/link sequence since it's common for other
+drivers to depend on GPIOs to do their work, so they must be initialized early
+in the device_initcall() sequence.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Acked-by: Jean Delvare <khali@linux-fr.org>
+Cc: Eric Miao <eric.miao@marvell.com>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
+Cc: Philipp Zabel <philipp.zabel@gmail.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Ben Gardner <bgardner@wabtec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+ arch/arm/Kconfig | 2 ++
+ drivers/Kconfig | 2 ++
+ drivers/Makefile | 1 +
+ drivers/gpio/Kconfig | 32 ++++++++++++++++++++++++++++++++
+ drivers/gpio/Makefile | 3 +++
+ 5 files changed, 40 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/gpio/Kconfig
+ create mode 100644 drivers/gpio/Makefile
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 10faf9c..06ca241 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -1042,6 +1042,8 @@ source "drivers/i2c/Kconfig"
+
+ source "drivers/spi/Kconfig"
+
++source "drivers/gpio/Kconfig"
++
+ source "drivers/w1/Kconfig"
+
+ source "drivers/power/Kconfig"
+diff --git a/drivers/Kconfig b/drivers/Kconfig
+index f4076d9..90e295a 100644
+--- a/drivers/Kconfig
++++ b/drivers/Kconfig
+@@ -52,6 +52,8 @@ source "drivers/i2c/Kconfig"
+
+ source "drivers/spi/Kconfig"
+
++source "drivers/gpio/Kconfig"
++
+ source "drivers/w1/Kconfig"
+
+ source "drivers/power/Kconfig"
+diff --git a/drivers/Makefile b/drivers/Makefile
+index 8cb37e3..8e5101f 100644
+--- a/drivers/Makefile
++++ b/drivers/Makefile
+@@ -5,6 +5,7 @@
+ # Rewritten to use lists instead of if-statements.
+ #
+
++obj-$(CONFIG_HAVE_GPIO_LIB) += gpio/
+ obj-$(CONFIG_PCI) += pci/
+ obj-$(CONFIG_PARISC) += parisc/
+ obj-$(CONFIG_RAPIDIO) += rapidio/
+diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
+new file mode 100644
+index 0000000..560687c
+--- /dev/null
++++ b/drivers/gpio/Kconfig
+@@ -0,0 +1,32 @@
++#
++# GPIO infrastructure and expanders
++#
++
++config HAVE_GPIO_LIB
++ bool
++ help
++ Platforms select gpiolib if they use this infrastructure
++ for all their GPIOs, usually starting with ones integrated
++ into SOC processors.
++
++menu "GPIO Support"
++ depends on HAVE_GPIO_LIB
++
++config DEBUG_GPIO
++ bool "Debug GPIO calls"
++ depends on DEBUG_KERNEL
++ help
++ Say Y here to add some extra checks and diagnostics to GPIO calls.
++ The checks help ensure that GPIOs have been properly initialized
++ before they are used and that sleeping calls aren not made from
++ nonsleeping contexts. They can make bitbanged serial protocols
++ slower. The diagnostics help catch the type of setup errors
++ that are most common when setting up new platforms or boards.
++
++# put expanders in the right section, in alphabetical order
++
++comment "I2C GPIO expanders:"
++
++comment "SPI GPIO expanders:"
++
++endmenu
+diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
+new file mode 100644
+index 0000000..cdbba6b
+--- /dev/null
++++ b/drivers/gpio/Makefile
+@@ -0,0 +1,3 @@
++# gpio support: dedicated expander chips, etc
++
++ccflags-$(CONFIG_DEBUG_GPIO) += -DDEBUG
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch b/packages/linux/linux-rp-2.6.24/tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch
new file mode 100644
index 0000000000..f39fedbbaa
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch
@@ -0,0 +1,746 @@
+From 3a0251c01446f3a6763e4406ca5495102db63aa4 Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell@users.sourceforge.net>
+Date: Fri, 18 Jan 2008 00:35:20 +0300
+Subject: [PATCH 22/64] Provide new implementation infrastructure that platforms may choose to use
+ when implementing the GPIO programming interface. Platforms can update their
+ GPIO support to use this. In many cases the incremental cost to access a
+ non-inlined GPIO should be less than a dozen instructions, with the memory
+ cost being about a page (total) of extra data and code. The upside is:
+
+ * Providing two features which were "want to have (but OK to defer)" when
+ GPIO interfaces were first discussed in November 2006:
+
+ - A "struct gpio_chip" to plug in GPIOs that aren't directly supported
+ by SOC platforms, but come from FPGAs or other multifunction devices
+ using conventional device registers (like UCB-1x00 or SM501 GPIOs,
+ and southbridges in PCs with more open specs than usual).
+
+ - Full support for message-based GPIO expanders, where registers are
+ accessed through sleeping I/O calls. Previous support for these
+ "cansleep" calls was just stubs. (One example: the widely used
+ pcf8574 I2C chips, with 8 GPIOs each.)
+
+ * Including a non-stub implementation of the gpio_{request,free}() calls,
+ making those calls much more useful. The diagnostic labels are also
+ recorded given DEBUG_FS, so /sys/kernel/debug/gpio can show a snapshot
+ of all GPIOs known to this infrastructure.
+
+The driver programming interfaces introduced in 2.6.21 do not change at all;
+this infrastructure is entirely below those covers.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Jean Delvare <khali@linux-fr.org>
+Cc: Eric Miao <eric.miao@marvell.com>
+Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
+Cc: Philipp Zabel <philipp.zabel@gmail.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Ben Gardner <bgardner@wabtec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+ drivers/gpio/Makefile | 2 +
+ drivers/gpio/gpiolib.c | 567 ++++++++++++++++++++++++++++++++++++++++++++
+ include/asm-generic/gpio.h | 98 ++++++++
+ 3 files changed, 667 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/gpio/gpiolib.c
+
+diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
+index cdbba6b..2db28ce 100644
+--- a/drivers/gpio/Makefile
++++ b/drivers/gpio/Makefile
+@@ -1,3 +1,5 @@
+ # gpio support: dedicated expander chips, etc
+
+ ccflags-$(CONFIG_DEBUG_GPIO) += -DDEBUG
++
++obj-$(CONFIG_HAVE_GPIO_LIB) += gpiolib.o
+diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
+new file mode 100644
+index 0000000..d8db2f8
+--- /dev/null
++++ b/drivers/gpio/gpiolib.c
+@@ -0,0 +1,567 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/irq.h>
++#include <linux/spinlock.h>
++
++#include <asm/gpio.h>
++
++
++/* Optional implementation infrastructure for GPIO interfaces.
++ *
++ * Platforms may want to use this if they tend to use very many GPIOs
++ * that aren't part of a System-On-Chip core; or across I2C/SPI/etc.
++ *
++ * When kernel footprint or instruction count is an issue, simpler
++ * implementations may be preferred. The GPIO programming interface
++ * allows for inlining speed-critical get/set operations for common
++ * cases, so that access to SOC-integrated GPIOs can sometimes cost
++ * only an instruction or two per bit.
++ */
++
++
++/* When debugging, extend minimal trust to callers and platform code.
++ * Also emit diagnostic messages that may help initial bringup, when
++ * board setup or driver bugs are most common.
++ *
++ * Otherwise, minimize overhead in what may be bitbanging codepaths.
++ */
++#ifdef DEBUG
++#define extra_checks 1
++#else
++#define extra_checks 0
++#endif
++
++/* gpio_lock prevents conflicts during gpio_desc[] table updates.
++ * While any GPIO is requested, its gpio_chip is not removable;
++ * each GPIO's "requested" flag serves as a lock and refcount.
++ */
++static DEFINE_SPINLOCK(gpio_lock);
++
++struct gpio_desc {
++ struct gpio_chip *chip;
++ unsigned long flags;
++/* flag symbols are bit numbers */
++#define FLAG_REQUESTED 0
++#define FLAG_IS_OUT 1
++
++#ifdef CONFIG_DEBUG_FS
++ const char *label;
++#endif
++};
++static struct gpio_desc gpio_desc[ARCH_NR_GPIOS];
++
++static inline void desc_set_label(struct gpio_desc *d, const char *label)
++{
++#ifdef CONFIG_DEBUG_FS
++ d->label = label;
++#endif
++}
++
++/* Warn when drivers omit gpio_request() calls -- legal but ill-advised
++ * when setting direction, and otherwise illegal. Until board setup code
++ * and drivers use explicit requests everywhere (which won't happen when
++ * those calls have no teeth) we can't avoid autorequesting. This nag
++ * message should motivate switching to explicit requests...
++ */
++static void gpio_ensure_requested(struct gpio_desc *desc)
++{
++ if (test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0) {
++ pr_warning("GPIO-%d autorequested\n", (int)(desc - gpio_desc));
++ desc_set_label(desc, "[auto]");
++ }
++}
++
++/* caller holds gpio_lock *OR* gpio is marked as requested */
++static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
++{
++ return gpio_desc[gpio].chip;
++}
++
++/**
++ * gpiochip_add() - register a gpio_chip
++ * @chip: the chip to register, with chip->base initialized
++ * Context: potentially before irqs or kmalloc will work
++ *
++ * Returns a negative errno if the chip can't be registered, such as
++ * because the chip->base is invalid or already associated with a
++ * different chip. Otherwise it returns zero as a success code.
++ */
++int gpiochip_add(struct gpio_chip *chip)
++{
++ unsigned long flags;
++ int status = 0;
++ unsigned id;
++
++ /* NOTE chip->base negative is reserved to mean a request for
++ * dynamic allocation. We don't currently support that.
++ */
++
++ if (chip->base < 0 || (chip->base + chip->ngpio) >= ARCH_NR_GPIOS) {
++ status = -EINVAL;
++ goto fail;
++ }
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ /* these GPIO numbers must not be managed by another gpio_chip */
++ for (id = chip->base; id < chip->base + chip->ngpio; id++) {
++ if (gpio_desc[id].chip != NULL) {
++ status = -EBUSY;
++ break;
++ }
++ }
++ if (status == 0) {
++ for (id = chip->base; id < chip->base + chip->ngpio; id++) {
++ gpio_desc[id].chip = chip;
++ gpio_desc[id].flags = 0;
++ }
++ }
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++fail:
++ /* failures here can mean systems won't boot... */
++ if (status)
++ pr_err("gpiochip_add: gpios %d..%d (%s) not registered\n",
++ chip->base, chip->base + chip->ngpio,
++ chip->label ? : "generic");
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpiochip_add);
++
++/**
++ * gpiochip_remove() - unregister a gpio_chip
++ * @chip: the chip to unregister
++ *
++ * A gpio_chip with any GPIOs still requested may not be removed.
++ */
++int gpiochip_remove(struct gpio_chip *chip)
++{
++ unsigned long flags;
++ int status = 0;
++ unsigned id;
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ for (id = chip->base; id < chip->base + chip->ngpio; id++) {
++ if (test_bit(FLAG_REQUESTED, &gpio_desc[id].flags)) {
++ status = -EBUSY;
++ break;
++ }
++ }
++ if (status == 0) {
++ for (id = chip->base; id < chip->base + chip->ngpio; id++)
++ gpio_desc[id].chip = NULL;
++ }
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpiochip_remove);
++
++
++/* These "optional" allocation calls help prevent drivers from stomping
++ * on each other, and help provide better diagnostics in debugfs.
++ * They're called even less than the "set direction" calls.
++ */
++int gpio_request(unsigned gpio, const char *label)
++{
++ struct gpio_desc *desc;
++ int status = -EINVAL;
++ unsigned long flags;
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ if (gpio >= ARCH_NR_GPIOS)
++ goto done;
++ desc = &gpio_desc[gpio];
++ if (desc->chip == NULL)
++ goto done;
++
++ /* NOTE: gpio_request() can be called in early boot,
++ * before IRQs are enabled.
++ */
++
++ if (test_and_set_bit(FLAG_REQUESTED, &desc->flags) == 0) {
++ desc_set_label(desc, label ? : "?");
++ status = 0;
++ } else
++ status = -EBUSY;
++
++done:
++ if (status)
++ pr_debug("gpio_request: gpio-%d (%s) status %d\n",
++ gpio, label ? : "?", status);
++ spin_unlock_irqrestore(&gpio_lock, flags);
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpio_request);
++
++void gpio_free(unsigned gpio)
++{
++ unsigned long flags;
++ struct gpio_desc *desc;
++
++ if (gpio >= ARCH_NR_GPIOS) {
++ WARN_ON(extra_checks);
++ return;
++ }
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ desc = &gpio_desc[gpio];
++ if (desc->chip && test_and_clear_bit(FLAG_REQUESTED, &desc->flags))
++ desc_set_label(desc, NULL);
++ else
++ WARN_ON(extra_checks);
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++}
++EXPORT_SYMBOL_GPL(gpio_free);
++
++
++/**
++ * gpiochip_is_requested - return string iff signal was requested
++ * @chip: controller managing the signal
++ * @offset: of signal within controller's 0..(ngpio - 1) range
++ *
++ * Returns NULL if the GPIO is not currently requested, else a string.
++ * If debugfs support is enabled, the string returned is the label passed
++ * to gpio_request(); otherwise it is a meaningless constant.
++ *
++ * This function is for use by GPIO controller drivers. The label can
++ * help with diagnostics, and knowing that the signal is used as a GPIO
++ * can help avoid accidentally multiplexing it to another controller.
++ */
++const char *gpiochip_is_requested(struct gpio_chip *chip, unsigned offset)
++{
++ unsigned gpio = chip->base + offset;
++
++ if (gpio >= ARCH_NR_GPIOS || gpio_desc[gpio].chip != chip)
++ return NULL;
++ if (test_bit(FLAG_REQUESTED, &gpio_desc[gpio].flags) == 0)
++ return NULL;
++#ifdef CONFIG_DEBUG_FS
++ return gpio_desc[gpio].label;
++#else
++ return "?";
++#endif
++}
++EXPORT_SYMBOL_GPL(gpiochip_is_requested);
++
++
++/* Drivers MUST set GPIO direction before making get/set calls. In
++ * some cases this is done in early boot, before IRQs are enabled.
++ *
++ * As a rule these aren't called more than once (except for drivers
++ * using the open-drain emulation idiom) so these are natural places
++ * to accumulate extra debugging checks. Note that we can't (yet)
++ * rely on gpio_request() having been called beforehand.
++ */
++
++int gpio_direction_input(unsigned gpio)
++{
++ unsigned long flags;
++ struct gpio_chip *chip;
++ struct gpio_desc *desc = &gpio_desc[gpio];
++ int status = -EINVAL;
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ if (gpio >= ARCH_NR_GPIOS)
++ goto fail;
++ chip = desc->chip;
++ if (!chip || !chip->get || !chip->direction_input)
++ goto fail;
++ gpio -= chip->base;
++ if (gpio >= chip->ngpio)
++ goto fail;
++ gpio_ensure_requested(desc);
++
++ /* now we know the gpio is valid and chip won't vanish */
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++
++ might_sleep_if(extra_checks && chip->can_sleep);
++
++ status = chip->direction_input(chip, gpio);
++ if (status == 0)
++ clear_bit(FLAG_IS_OUT, &desc->flags);
++ return status;
++fail:
++ spin_unlock_irqrestore(&gpio_lock, flags);
++ if (status)
++ pr_debug("%s: gpio-%d status %d\n",
++ __FUNCTION__, gpio, status);
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpio_direction_input);
++
++int gpio_direction_output(unsigned gpio, int value)
++{
++ unsigned long flags;
++ struct gpio_chip *chip;
++ struct gpio_desc *desc = &gpio_desc[gpio];
++ int status = -EINVAL;
++
++ spin_lock_irqsave(&gpio_lock, flags);
++
++ if (gpio >= ARCH_NR_GPIOS)
++ goto fail;
++ chip = desc->chip;
++ if (!chip || !chip->set || !chip->direction_output)
++ goto fail;
++ gpio -= chip->base;
++ if (gpio >= chip->ngpio)
++ goto fail;
++ gpio_ensure_requested(desc);
++
++ /* now we know the gpio is valid and chip won't vanish */
++
++ spin_unlock_irqrestore(&gpio_lock, flags);
++
++ might_sleep_if(extra_checks && chip->can_sleep);
++
++ status = chip->direction_output(chip, gpio, value);
++ if (status == 0)
++ set_bit(FLAG_IS_OUT, &desc->flags);
++ return status;
++fail:
++ spin_unlock_irqrestore(&gpio_lock, flags);
++ if (status)
++ pr_debug("%s: gpio-%d status %d\n",
++ __FUNCTION__, gpio, status);
++ return status;
++}
++EXPORT_SYMBOL_GPL(gpio_direction_output);
++
++
++/* I/O calls are only valid after configuration completed; the relevant
++ * "is this a valid GPIO" error checks should already have been done.
++ *
++ * "Get" operations are often inlinable as reading a pin value register,
++ * and masking the relevant bit in that register.
++ *
++ * When "set" operations are inlinable, they involve writing that mask to
++ * one register to set a low value, or a different register to set it high.
++ * Otherwise locking is needed, so there may be little value to inlining.
++ *
++ *------------------------------------------------------------------------
++ *
++ * IMPORTANT!!! The hot paths -- get/set value -- assume that callers
++ * have requested the GPIO. That can include implicit requesting by
++ * a direction setting call. Marking a gpio as requested locks its chip
++ * in memory, guaranteeing that these table lookups need no more locking
++ * and that gpiochip_remove() will fail.
++ *
++ * REVISIT when debugging, consider adding some instrumentation to ensure
++ * that the GPIO was actually requested.
++ */
++
++/**
++ * __gpio_get_value() - return a gpio's value
++ * @gpio: gpio whose value will be returned
++ * Context: any
++ *
++ * This is used directly or indirectly to implement gpio_get_value().
++ * It returns the zero or nonzero value provided by the associated
++ * gpio_chip.get() method; or zero if no such method is provided.
++ */
++int __gpio_get_value(unsigned gpio)
++{
++ struct gpio_chip *chip;
++
++ chip = gpio_to_chip(gpio);
++ WARN_ON(extra_checks && chip->can_sleep);
++ return chip->get ? chip->get(chip, gpio - chip->base) : 0;
++}
++EXPORT_SYMBOL_GPL(__gpio_get_value);
++
++/**
++ * __gpio_set_value() - assign a gpio's value
++ * @gpio: gpio whose value will be assigned
++ * @value: value to assign
++ * Context: any
++ *
++ * This is used directly or indirectly to implement gpio_set_value().
++ * It invokes the associated gpio_chip.set() method.
++ */
++void __gpio_set_value(unsigned gpio, int value)
++{
++ struct gpio_chip *chip;
++
++ chip = gpio_to_chip(gpio);
++ WARN_ON(extra_checks && chip->can_sleep);
++ chip->set(chip, gpio - chip->base, value);
++}
++EXPORT_SYMBOL_GPL(__gpio_set_value);
++
++/**
++ * __gpio_cansleep() - report whether gpio value access will sleep
++ * @gpio: gpio in question
++ * Context: any
++ *
++ * This is used directly or indirectly to implement gpio_cansleep(). It
++ * returns nonzero if access reading or writing the GPIO value can sleep.
++ */
++int __gpio_cansleep(unsigned gpio)
++{
++ struct gpio_chip *chip;
++
++ /* only call this on GPIOs that are valid! */
++ chip = gpio_to_chip(gpio);
++
++ return chip->can_sleep;
++}
++EXPORT_SYMBOL_GPL(__gpio_cansleep);
++
++
++
++/* There's no value in making it easy to inline GPIO calls that may sleep.
++ * Common examples include ones connected to I2C or SPI chips.
++ */
++
++int gpio_get_value_cansleep(unsigned gpio)
++{
++ struct gpio_chip *chip;
++
++ might_sleep_if(extra_checks);
++ chip = gpio_to_chip(gpio);
++ return chip->get(chip, gpio - chip->base);
++}
++EXPORT_SYMBOL_GPL(gpio_get_value_cansleep);
++
++void gpio_set_value_cansleep(unsigned gpio, int value)
++{
++ struct gpio_chip *chip;
++
++ might_sleep_if(extra_checks);
++ chip = gpio_to_chip(gpio);
++ chip->set(chip, gpio - chip->base, value);
++}
++EXPORT_SYMBOL_GPL(gpio_set_value_cansleep);
++
++
++#ifdef CONFIG_DEBUG_FS
++
++#include <linux/debugfs.h>
++#include <linux/seq_file.h>
++
++
++static void gpiolib_dbg_show(struct seq_file *s, struct gpio_chip *chip)
++{
++ unsigned i;
++ unsigned gpio = chip->base;
++ struct gpio_desc *gdesc = &gpio_desc[gpio];
++ int is_out;
++
++ for (i = 0; i < chip->ngpio; i++, gpio++, gdesc++) {
++ if (!test_bit(FLAG_REQUESTED, &gdesc->flags))
++ continue;
++
++ is_out = test_bit(FLAG_IS_OUT, &gdesc->flags);
++ seq_printf(s, " gpio-%-3d (%-12s) %s %s",
++ gpio, gdesc->label,
++ is_out ? "out" : "in ",
++ chip->get
++ ? (chip->get(chip, i) ? "hi" : "lo")
++ : "? ");
++
++ if (!is_out) {
++ int irq = gpio_to_irq(gpio);
++ struct irq_desc *desc = irq_desc + irq;
++
++ /* This races with request_irq(), set_irq_type(),
++ * and set_irq_wake() ... but those are "rare".
++ *
++ * More significantly, trigger type flags aren't
++ * currently maintained by genirq.
++ */
++ if (irq >= 0 && desc->action) {
++ char *trigger;
++
++ switch (desc->status & IRQ_TYPE_SENSE_MASK) {
++ case IRQ_TYPE_NONE:
++ trigger = "(default)";
++ break;
++ case IRQ_TYPE_EDGE_FALLING:
++ trigger = "edge-falling";
++ break;
++ case IRQ_TYPE_EDGE_RISING:
++ trigger = "edge-rising";
++ break;
++ case IRQ_TYPE_EDGE_BOTH:
++ trigger = "edge-both";
++ break;
++ case IRQ_TYPE_LEVEL_HIGH:
++ trigger = "level-high";
++ break;
++ case IRQ_TYPE_LEVEL_LOW:
++ trigger = "level-low";
++ break;
++ default:
++ trigger = "?trigger?";
++ break;
++ }
++
++ seq_printf(s, " irq-%d %s%s",
++ irq, trigger,
++ (desc->status & IRQ_WAKEUP)
++ ? " wakeup" : "");
++ }
++ }
++
++ seq_printf(s, "\n");
++ }
++}
++
++static int gpiolib_show(struct seq_file *s, void *unused)
++{
++ struct gpio_chip *chip = NULL;
++ unsigned gpio;
++ int started = 0;
++
++ /* REVISIT this isn't locked against gpio_chip removal ... */
++
++ for (gpio = 0; gpio < ARCH_NR_GPIOS; gpio++) {
++ if (chip == gpio_desc[gpio].chip)
++ continue;
++ chip = gpio_desc[gpio].chip;
++ if (!chip)
++ continue;
++
++ seq_printf(s, "%sGPIOs %d-%d, %s%s:\n",
++ started ? "\n" : "",
++ chip->base, chip->base + chip->ngpio - 1,
++ chip->label ? : "generic",
++ chip->can_sleep ? ", can sleep" : "");
++ started = 1;
++ if (chip->dbg_show)
++ chip->dbg_show(s, chip);
++ else
++ gpiolib_dbg_show(s, chip);
++ }
++ return 0;
++}
++
++static int gpiolib_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, gpiolib_show, NULL);
++}
++
++static struct file_operations gpiolib_operations = {
++ .open = gpiolib_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int __init gpiolib_debugfs_init(void)
++{
++ /* /sys/kernel/debug/gpio */
++ (void) debugfs_create_file("gpio", S_IFREG | S_IRUGO,
++ NULL, NULL, &gpiolib_operations);
++ return 0;
++}
++subsys_initcall(gpiolib_debugfs_init);
++
++#endif /* DEBUG_FS */
+diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
+index 2d0aab1..f29a502 100644
+--- a/include/asm-generic/gpio.h
++++ b/include/asm-generic/gpio.h
+@@ -1,6 +1,102 @@
+ #ifndef _ASM_GENERIC_GPIO_H
+ #define _ASM_GENERIC_GPIO_H
+
++#ifdef CONFIG_HAVE_GPIO_LIB
++
++/* Platforms may implement their GPIO interface with library code,
++ * at a small performance cost for non-inlined operations and some
++ * extra memory (for code and for per-GPIO table entries).
++ *
++ * While the GPIO programming interface defines valid GPIO numbers
++ * to be in the range 0..MAX_INT, this library restricts them to the
++ * smaller range 0..ARCH_NR_GPIOS.
++ */
++
++#ifndef ARCH_NR_GPIOS
++#define ARCH_NR_GPIOS 256
++#endif
++
++struct seq_file;
++
++/**
++ * struct gpio_chip - abstract a GPIO controller
++ * @label: for diagnostics
++ * @direction_input: configures signal "offset" as input, or returns error
++ * @get: returns value for signal "offset"; for output signals this
++ * returns either the value actually sensed, or zero
++ * @direction_output: configures signal "offset" as output, or returns error
++ * @set: assigns output value for signal "offset"
++ * @dbg_show: optional routine to show contents in debugfs; default code
++ * will be used when this is omitted, but custom code can show extra
++ * state (such as pullup/pulldown configuration).
++ * @base: identifies the first GPIO number handled by this chip; or, if
++ * negative during registration, requests dynamic ID allocation.
++ * @ngpio: the number of GPIOs handled by this controller; the last GPIO
++ * handled is (base + ngpio - 1).
++ * @can_sleep: flag must be set iff get()/set() methods sleep, as they
++ * must while accessing GPIO expander chips over I2C or SPI
++ *
++ * A gpio_chip can help platforms abstract various sources of GPIOs so
++ * they can all be accessed through a common programing interface.
++ * Example sources would be SOC controllers, FPGAs, multifunction
++ * chips, dedicated GPIO expanders, and so on.
++ *
++ * Each chip controls a number of signals, identified in method calls
++ * by "offset" values in the range 0..(@ngpio - 1). When those signals
++ * are referenced through calls like gpio_get_value(gpio), the offset
++ * is calculated by subtracting @base from the gpio number.
++ */
++struct gpio_chip {
++ char *label;
++
++ int (*direction_input)(struct gpio_chip *chip,
++ unsigned offset);
++ int (*get)(struct gpio_chip *chip,
++ unsigned offset);
++ int (*direction_output)(struct gpio_chip *chip,
++ unsigned offset, int value);
++ void (*set)(struct gpio_chip *chip,
++ unsigned offset, int value);
++ void (*dbg_show)(struct seq_file *s,
++ struct gpio_chip *chip);
++ int base;
++ u16 ngpio;
++ unsigned can_sleep:1;
++};
++
++extern const char *gpiochip_is_requested(struct gpio_chip *chip,
++ unsigned offset);
++
++/* add/remove chips */
++extern int gpiochip_add(struct gpio_chip *chip);
++extern int __must_check gpiochip_remove(struct gpio_chip *chip);
++
++
++/* Always use the library code for GPIO management calls,
++ * or when sleeping may be involved.
++ */
++extern int gpio_request(unsigned gpio, const char *label);
++extern void gpio_free(unsigned gpio);
++
++extern int gpio_direction_input(unsigned gpio);
++extern int gpio_direction_output(unsigned gpio, int value);
++
++extern int gpio_get_value_cansleep(unsigned gpio);
++extern void gpio_set_value_cansleep(unsigned gpio, int value);
++
++
++/* A platform's <asm/gpio.h> code may want to inline the I/O calls when
++ * the GPIO is constant and refers to some always-present controller,
++ * giving direct access to chip registers and tight bitbanging loops.
++ */
++extern int __gpio_get_value(unsigned gpio);
++extern void __gpio_set_value(unsigned gpio, int value);
++
++extern int __gpio_cansleep(unsigned gpio);
++
++
++#else
++
+ /* platforms that don't directly support access to GPIOs through I2C, SPI,
+ * or other blocking infrastructure can use these wrappers.
+ */
+@@ -22,4 +118,6 @@ static inline void gpio_set_value_cansleep(unsigned gpio, int value)
+ gpio_set_value(gpio, value);
+ }
+
++#endif
++
+ #endif /* _ASM_GENERIC_GPIO_H */
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch b/packages/linux/linux-rp-2.6.24/tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch
new file mode 100644
index 0000000000..7a37be85cf
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch
@@ -0,0 +1,498 @@
+From 49da9bd487e54164a75503e0037a054cce697ed5 Mon Sep 17 00:00:00 2001
+From: Philipp Zabel <philipp.zabel@gmail.com>
+Date: Tue, 12 Feb 2008 04:38:12 +0300
+Subject: [PATCH 23/64] This adds gpiolib support for the PXA architecture:
+ - move all GPIO API functions from generic.c into gpio.c
+ - convert the gpio_get/set_value macros into inline functions
+
+This makes it easier to hook up GPIOs provided by external chips like
+ASICs and CPLDs.
+
+Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
+Cc: Jean Delvare <khali@linux-fr.org>
+Cc: Eric Miao <eric.miao@marvell.com>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
+Cc: Ben Gardner <bgardner@wabtec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-pxa/Makefile | 3 +-
+ arch/arm/mach-pxa/generic.c | 93 ----------------
+ arch/arm/mach-pxa/generic.h | 1 +
+ arch/arm/mach-pxa/gpio.c | 197 +++++++++++++++++++++++++++++++++++
+ arch/arm/mach-pxa/irq.c | 2 +
+ include/asm-arm/arch-pxa/gpio.h | 48 ++++-----
+ include/asm-arm/arch-pxa/pxa-regs.h | 13 +++
+ 8 files changed, 236 insertions(+), 122 deletions(-)
+ create mode 100644 arch/arm/mach-pxa/gpio.c
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 06ca241..423e953 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -346,6 +346,7 @@ config ARCH_PXA
+ select GENERIC_TIME
+ select GENERIC_CLOCKEVENTS
+ select TICK_ONESHOT
++ select HAVE_GPIO_LIB
+ help
+ Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
+
+diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
+index 4263527..5cb0216 100644
+--- a/arch/arm/mach-pxa/Makefile
++++ b/arch/arm/mach-pxa/Makefile
+@@ -3,7 +3,8 @@
+ #
+
+ # Common support (must be linked before board specific support)
+-obj-y += clock.o generic.o irq.o dma.o time.o
++obj-y += clock.o generic.o irq.o dma.o \
++ time.o gpio.o
+ obj-$(CONFIG_PXA25x) += pxa25x.o
+ obj-$(CONFIG_PXA27x) += pxa27x.o
+ obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp.o
+diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
+index 1c34946..6c07292 100644
+--- a/arch/arm/mach-pxa/generic.c
++++ b/arch/arm/mach-pxa/generic.c
+@@ -32,7 +32,6 @@
+ #include <asm/mach/map.h>
+
+ #include <asm/arch/pxa-regs.h>
+-#include <asm/arch/gpio.h>
+ #include <asm/arch/udc.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/mmc.h>
+@@ -73,97 +72,6 @@ unsigned int get_memclk_frequency_10khz(void)
+ EXPORT_SYMBOL(get_memclk_frequency_10khz);
+
+ /*
+- * Handy function to set GPIO alternate functions
+- */
+-int pxa_last_gpio;
+-
+-int pxa_gpio_mode(int gpio_mode)
+-{
+- unsigned long flags;
+- int gpio = gpio_mode & GPIO_MD_MASK_NR;
+- int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
+- int gafr;
+-
+- if (gpio > pxa_last_gpio)
+- return -EINVAL;
+-
+- local_irq_save(flags);
+- if (gpio_mode & GPIO_DFLT_LOW)
+- GPCR(gpio) = GPIO_bit(gpio);
+- else if (gpio_mode & GPIO_DFLT_HIGH)
+- GPSR(gpio) = GPIO_bit(gpio);
+- if (gpio_mode & GPIO_MD_MASK_DIR)
+- GPDR(gpio) |= GPIO_bit(gpio);
+- else
+- GPDR(gpio) &= ~GPIO_bit(gpio);
+- gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
+- GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2));
+- local_irq_restore(flags);
+-
+- return 0;
+-}
+-
+-EXPORT_SYMBOL(pxa_gpio_mode);
+-
+-int gpio_direction_input(unsigned gpio)
+-{
+- unsigned long flags;
+- u32 mask;
+-
+- if (gpio > pxa_last_gpio)
+- return -EINVAL;
+-
+- mask = GPIO_bit(gpio);
+- local_irq_save(flags);
+- GPDR(gpio) &= ~mask;
+- local_irq_restore(flags);
+-
+- return 0;
+-}
+-EXPORT_SYMBOL(gpio_direction_input);
+-
+-int gpio_direction_output(unsigned gpio, int value)
+-{
+- unsigned long flags;
+- u32 mask;
+-
+- if (gpio > pxa_last_gpio)
+- return -EINVAL;
+-
+- mask = GPIO_bit(gpio);
+- local_irq_save(flags);
+- if (value)
+- GPSR(gpio) = mask;
+- else
+- GPCR(gpio) = mask;
+- GPDR(gpio) |= mask;
+- local_irq_restore(flags);
+-
+- return 0;
+-}
+-EXPORT_SYMBOL(gpio_direction_output);
+-
+-/*
+- * Return GPIO level
+- */
+-int pxa_gpio_get_value(unsigned gpio)
+-{
+- return __gpio_get_value(gpio);
+-}
+-
+-EXPORT_SYMBOL(pxa_gpio_get_value);
+-
+-/*
+- * Set output GPIO level
+- */
+-void pxa_gpio_set_value(unsigned gpio, int value)
+-{
+- __gpio_set_value(gpio, value);
+-}
+-
+-EXPORT_SYMBOL(pxa_gpio_set_value);
+-
+-/*
+ * Routine to safely enable or disable a clock in the CKEN
+ */
+ void __pxa_set_cken(int clock, int enable)
+@@ -178,7 +86,6 @@ void __pxa_set_cken(int clock, int enable)
+
+ local_irq_restore(flags);
+ }
+-
+ EXPORT_SYMBOL(__pxa_set_cken);
+
+ /*
+diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
+index b30f240..727a9f5 100644
+--- a/arch/arm/mach-pxa/generic.h
++++ b/arch/arm/mach-pxa/generic.h
+@@ -16,6 +16,7 @@ extern void __init pxa_init_irq_low(void);
+ extern void __init pxa_init_irq_high(void);
+ extern void __init pxa_init_irq_gpio(int gpio_nr);
+ extern void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int));
++extern void __init pxa_init_gpio(int gpio_nr);
+ extern void __init pxa25x_init_irq(void);
+ extern void __init pxa27x_init_irq(void);
+ extern void __init pxa3xx_init_irq(void);
+diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
+new file mode 100644
+index 0000000..8638dd7
+--- /dev/null
++++ b/arch/arm/mach-pxa/gpio.c
+@@ -0,0 +1,197 @@
++/*
++ * linux/arch/arm/mach-pxa/gpio.c
++ *
++ * Generic PXA GPIO handling
++ *
++ * Author: Nicolas Pitre
++ * Created: Jun 15, 2001
++ * Copyright: MontaVista Software Inc.
++ *
++ * 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.
++ */
++
++#include <linux/init.h>
++#include <linux/module.h>
++
++#include <asm/gpio.h>
++#include <asm/hardware.h>
++#include <asm/io.h>
++#include <asm/arch/pxa-regs.h>
++
++#include "generic.h"
++
++
++struct pxa_gpio_chip {
++ struct gpio_chip chip;
++ void __iomem *regbase;
++};
++
++int pxa_last_gpio;
++
++/*
++ * Configure pins for GPIO or other functions
++ */
++int pxa_gpio_mode(int gpio_mode)
++{
++ unsigned long flags;
++ int gpio = gpio_mode & GPIO_MD_MASK_NR;
++ int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
++ int gafr;
++
++ if (gpio > pxa_last_gpio)
++ return -EINVAL;
++
++ local_irq_save(flags);
++ if (gpio_mode & GPIO_DFLT_LOW)
++ GPCR(gpio) = GPIO_bit(gpio);
++ else if (gpio_mode & GPIO_DFLT_HIGH)
++ GPSR(gpio) = GPIO_bit(gpio);
++ if (gpio_mode & GPIO_MD_MASK_DIR)
++ GPDR(gpio) |= GPIO_bit(gpio);
++ else
++ GPDR(gpio) &= ~GPIO_bit(gpio);
++ gafr = GAFR(gpio) & ~(0x3 << (((gpio) & 0xf)*2));
++ GAFR(gpio) = gafr | (fn << (((gpio) & 0xf)*2));
++ local_irq_restore(flags);
++
++ return 0;
++}
++EXPORT_SYMBOL(pxa_gpio_mode);
++
++static int pxa_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
++{
++ unsigned long flags;
++ u32 mask = 1 << offset;
++ u32 value;
++ struct pxa_gpio_chip *pxa;
++ void __iomem *gpdr;
++
++ pxa = container_of(chip, struct pxa_gpio_chip, chip);
++ gpdr = pxa->regbase + GPDR_OFFSET;
++ local_irq_save(flags);
++ value = __raw_readl(gpdr);
++ value &= ~mask;
++ __raw_writel(value, gpdr);
++ local_irq_restore(flags);
++
++ return 0;
++}
++
++static int pxa_gpio_direction_output(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ unsigned long flags;
++ u32 mask = 1 << offset;
++ u32 tmp;
++ struct pxa_gpio_chip *pxa;
++ void __iomem *gpdr;
++
++ pxa = container_of(chip, struct pxa_gpio_chip, chip);
++ __raw_writel(mask,
++ pxa->regbase + (value ? GPSR_OFFSET : GPCR_OFFSET));
++ gpdr = pxa->regbase + GPDR_OFFSET;
++ local_irq_save(flags);
++ tmp = __raw_readl(gpdr);
++ tmp |= mask;
++ __raw_writel(tmp, gpdr);
++ local_irq_restore(flags);
++
++ return 0;
++}
++
++/*
++ * Return GPIO level
++ */
++static int pxa_gpio_get(struct gpio_chip *chip, unsigned offset)
++{
++ u32 mask = 1 << offset;
++ struct pxa_gpio_chip *pxa;
++
++ pxa = container_of(chip, struct pxa_gpio_chip, chip);
++ return __raw_readl(pxa->regbase + GPLR_OFFSET) & mask;
++}
++
++/*
++ * Set output GPIO level
++ */
++static void pxa_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
++{
++ u32 mask = 1 << offset;
++ struct pxa_gpio_chip *pxa;
++
++ pxa = container_of(chip, struct pxa_gpio_chip, chip);
++
++ if (value)
++ __raw_writel(mask, pxa->regbase + GPSR_OFFSET);
++ else
++ __raw_writel(mask, pxa->regbase + GPCR_OFFSET);
++}
++
++static struct pxa_gpio_chip pxa_gpio_chip[] = {
++ [0] = {
++ .regbase = GPIO0_BASE,
++ .chip = {
++ .label = "gpio-0",
++ .direction_input = pxa_gpio_direction_input,
++ .direction_output = pxa_gpio_direction_output,
++ .get = pxa_gpio_get,
++ .set = pxa_gpio_set,
++ .base = 0,
++ .ngpio = 32,
++ },
++ },
++ [1] = {
++ .regbase = GPIO1_BASE,
++ .chip = {
++ .label = "gpio-1",
++ .direction_input = pxa_gpio_direction_input,
++ .direction_output = pxa_gpio_direction_output,
++ .get = pxa_gpio_get,
++ .set = pxa_gpio_set,
++ .base = 32,
++ .ngpio = 32,
++ },
++ },
++ [2] = {
++ .regbase = GPIO2_BASE,
++ .chip = {
++ .label = "gpio-2",
++ .direction_input = pxa_gpio_direction_input,
++ .direction_output = pxa_gpio_direction_output,
++ .get = pxa_gpio_get,
++ .set = pxa_gpio_set,
++ .base = 64,
++ .ngpio = 32, /* 21 for PXA25x */
++ },
++ },
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
++ [3] = {
++ .regbase = GPIO3_BASE,
++ .chip = {
++ .label = "gpio-3",
++ .direction_input = pxa_gpio_direction_input,
++ .direction_output = pxa_gpio_direction_output,
++ .get = pxa_gpio_get,
++ .set = pxa_gpio_set,
++ .base = 96,
++ .ngpio = 32,
++ },
++ },
++#endif
++};
++
++void __init pxa_init_gpio(int gpio_nr)
++{
++ int i;
++
++ /* add a GPIO chip for each register bank.
++ * the last PXA25x register only contains 21 GPIOs
++ */
++ for (i = 0; i < gpio_nr; i += 32) {
++ if (i+32 > gpio_nr)
++ pxa_gpio_chip[i/32].chip.ngpio = gpio_nr - i;
++ gpiochip_add(&pxa_gpio_chip[i/32].chip);
++ }
++}
+diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
+index 07acb45..d0965ef 100644
+--- a/arch/arm/mach-pxa/irq.c
++++ b/arch/arm/mach-pxa/irq.c
+@@ -310,6 +310,8 @@ void __init pxa_init_irq_gpio(int gpio_nr)
+ /* Install handler for GPIO>=2 edge detect interrupts */
+ set_irq_chip(IRQ_GPIO_2_x, &pxa_internal_chip_low);
+ set_irq_chained_handler(IRQ_GPIO_2_x, pxa_gpio_demux_handler);
++
++ pxa_init_gpio(gpio_nr);
+ }
+
+ void __init pxa_init_irq_set_wake(int (*set_wake)(unsigned int, unsigned int))
+diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h
+index 9dbc2dc..bdbf5f9 100644
+--- a/include/asm-arm/arch-pxa/gpio.h
++++ b/include/asm-arm/arch-pxa/gpio.h
+@@ -28,43 +28,35 @@
+ #include <asm/irq.h>
+ #include <asm/hardware.h>
+
+-static inline int gpio_request(unsigned gpio, const char *label)
+-{
+- return 0;
+-}
++#include <asm-generic/gpio.h>
+
+-static inline void gpio_free(unsigned gpio)
+-{
+- return;
+-}
+
+-extern int gpio_direction_input(unsigned gpio);
+-extern int gpio_direction_output(unsigned gpio, int value);
++/* NOTE: some PXAs have fewer on-chip GPIOs (like PXA255, with 85).
++ * Those cases currently cause holes in the GPIO number space.
++ */
++#define NR_BUILTIN_GPIO 128
+
+-static inline int __gpio_get_value(unsigned gpio)
++static inline int gpio_get_value(unsigned gpio)
+ {
+- return GPLR(gpio) & GPIO_bit(gpio);
++ if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO))
++ return GPLR(gpio) & GPIO_bit(gpio);
++ else
++ return __gpio_get_value(gpio);
+ }
+
+-#define gpio_get_value(gpio) \
+- (__builtin_constant_p(gpio) ? \
+- __gpio_get_value(gpio) : \
+- pxa_gpio_get_value(gpio))
+-
+-static inline void __gpio_set_value(unsigned gpio, int value)
++static inline void gpio_set_value(unsigned gpio, int value)
+ {
+- if (value)
+- GPSR(gpio) = GPIO_bit(gpio);
+- else
+- GPCR(gpio) = GPIO_bit(gpio);
++ if (__builtin_constant_p(gpio) && (gpio < NR_BUILTIN_GPIO)) {
++ if (value)
++ GPSR(gpio) = GPIO_bit(gpio);
++ else
++ GPCR(gpio) = GPIO_bit(gpio);
++ } else {
++ __gpio_set_value(gpio, value);
++ }
+ }
+
+-#define gpio_set_value(gpio,value) \
+- (__builtin_constant_p(gpio) ? \
+- __gpio_set_value(gpio, value) : \
+- pxa_gpio_set_value(gpio, value))
+-
+-#include <asm-generic/gpio.h> /* cansleep wrappers */
++#define gpio_cansleep __gpio_cansleep
+
+ #define gpio_to_irq(gpio) IRQ_GPIO(gpio)
+ #define irq_to_gpio(irq) IRQ_TO_GPIO(irq)
+diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
+index 1bd398d..bd57417 100644
+--- a/include/asm-arm/arch-pxa/pxa-regs.h
++++ b/include/asm-arm/arch-pxa/pxa-regs.h
+@@ -1131,6 +1131,19 @@
+ * General Purpose I/O
+ */
+
++#define GPIO0_BASE ((void __iomem *)io_p2v(0x40E00000))
++#define GPIO1_BASE ((void __iomem *)io_p2v(0x40E00004))
++#define GPIO2_BASE ((void __iomem *)io_p2v(0x40E00008))
++#define GPIO3_BASE ((void __iomem *)io_p2v(0x40E00100))
++
++#define GPLR_OFFSET 0x00
++#define GPDR_OFFSET 0x0C
++#define GPSR_OFFSET 0x18
++#define GPCR_OFFSET 0x24
++#define GRER_OFFSET 0x30
++#define GFER_OFFSET 0x3C
++#define GEDR_OFFSET 0x48
++
+ #define GPLR0 __REG(0x40E00000) /* GPIO Pin-Level Register GPIO<31:0> */
+ #define GPLR1 __REG(0x40E00004) /* GPIO Pin-Level Register GPIO<63:32> */
+ #define GPLR2 __REG(0x40E00008) /* GPIO Pin-Level Register GPIO<80:64> */
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch b/packages/linux/linux-rp-2.6.24/tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch
new file mode 100644
index 0000000000..e460379de6
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch
@@ -0,0 +1,238 @@
+From 7ba82399f2d2df6114ad552999f2e1b9a19cb47a Mon Sep 17 00:00:00 2001
+From: David Brownell <dbrownell@users.sourceforge.net>
+Date: Sat, 19 Jan 2008 19:41:18 +0300
+Subject: [PATCH 24/64] Update Documentation/gpio.txt, primarily to include the new "gpiolib"
+ infrastructure.
+
+Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
+Cc: Jean Delvare <khali@linux-fr.org>
+Cc: Eric Miao <eric.miao@marvell.com>
+Cc: Sam Ravnborg <sam@ravnborg.org>
+Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
+Cc: Philipp Zabel <philipp.zabel@gmail.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Ben Gardner <bgardner@wabtec.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+---
+ Documentation/gpio.txt | 133 +++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 121 insertions(+), 12 deletions(-)
+
+diff --git a/Documentation/gpio.txt b/Documentation/gpio.txt
+index 6bc2ba2..8da724e 100644
+--- a/Documentation/gpio.txt
++++ b/Documentation/gpio.txt
+@@ -32,7 +32,7 @@ The exact capabilities of GPIOs vary between systems. Common options:
+ - Input values are likewise readable (1, 0). Some chips support readback
+ of pins configured as "output", which is very useful in such "wire-OR"
+ cases (to support bidirectional signaling). GPIO controllers may have
+- input de-glitch logic, sometimes with software controls.
++ input de-glitch/debounce logic, sometimes with software controls.
+
+ - Inputs can often be used as IRQ signals, often edge triggered but
+ sometimes level triggered. Such IRQs may be configurable as system
+@@ -60,10 +60,13 @@ used on a board that's wired differently. Only least-common-denominator
+ functionality can be very portable. Other features are platform-specific,
+ and that can be critical for glue logic.
+
+-Plus, this doesn't define an implementation framework, just an interface.
++Plus, this doesn't require any implementation framework, just an interface.
+ One platform might implement it as simple inline functions accessing chip
+ registers; another might implement it by delegating through abstractions
+-used for several very different kinds of GPIO controller.
++used for several very different kinds of GPIO controller. (There is some
++optional code supporting such an implementation strategy, described later
++in this document, but drivers acting as clients to the GPIO interface must
++not care how it's implemented.)
+
+ That said, if the convention is supported on their platform, drivers should
+ use it when possible. Platforms should declare GENERIC_GPIO support in
+@@ -121,6 +124,11 @@ before tasking is enabled, as part of early board setup.
+ For output GPIOs, the value provided becomes the initial output value.
+ This helps avoid signal glitching during system startup.
+
++For compatibility with legacy interfaces to GPIOs, setting the direction
++of a GPIO implicitly requests that GPIO (see below) if it has not been
++requested already. That compatibility may be removed in the future;
++explicitly requesting GPIOs is strongly preferred.
++
+ Setting the direction can fail if the GPIO number is invalid, or when
+ that particular GPIO can't be used in that mode. It's generally a bad
+ idea to rely on boot firmware to have set the direction correctly, since
+@@ -133,6 +141,7 @@ Spinlock-Safe GPIO access
+ -------------------------
+ Most GPIO controllers can be accessed with memory read/write instructions.
+ That doesn't need to sleep, and can safely be done from inside IRQ handlers.
++(That includes hardirq contexts on RT kernels.)
+
+ Use these calls to access such GPIOs:
+
+@@ -145,7 +154,7 @@ Use these calls to access such GPIOs:
+ The values are boolean, zero for low, nonzero for high. When reading the
+ value of an output pin, the value returned should be what's seen on the
+ pin ... that won't always match the specified output value, because of
+-issues including wire-OR and output latencies.
++issues including open-drain signaling and output latencies.
+
+ The get/set calls have no error returns because "invalid GPIO" should have
+ been reported earlier from gpio_direction_*(). However, note that not all
+@@ -170,7 +179,8 @@ get to the head of a queue to transmit a command and get its response.
+ This requires sleeping, which can't be done from inside IRQ handlers.
+
+ Platforms that support this type of GPIO distinguish them from other GPIOs
+-by returning nonzero from this call:
++by returning nonzero from this call (which requires a valid GPIO number,
++either explicitly or implicitly requested):
+
+ int gpio_cansleep(unsigned gpio);
+
+@@ -209,8 +219,11 @@ before tasking is enabled, as part of early board setup.
+ These calls serve two basic purposes. One is marking the signals which
+ are actually in use as GPIOs, for better diagnostics; systems may have
+ several hundred potential GPIOs, but often only a dozen are used on any
+-given board. Another is to catch conflicts between drivers, reporting
+-errors when drivers wrongly think they have exclusive use of that signal.
++given board. Another is to catch conflicts, identifying errors when
++(a) two or more drivers wrongly think they have exclusive use of that
++signal, or (b) something wrongly believes it's safe to remove drivers
++needed to manage a signal that's in active use. That is, requesting a
++GPIO can serve as a kind of lock.
+
+ These two calls are optional because not not all current Linux platforms
+ offer such functionality in their GPIO support; a valid implementation
+@@ -223,6 +236,9 @@ Note that requesting a GPIO does NOT cause it to be configured in any
+ way; it just marks that GPIO as in use. Separate code must handle any
+ pin setup (e.g. controlling which pin the GPIO uses, pullup/pulldown).
+
++Also note that it's your responsibility to have stopped using a GPIO
++before you free it.
++
+
+ GPIOs mapped to IRQs
+ --------------------
+@@ -238,7 +254,7 @@ map between them using calls like:
+
+ Those return either the corresponding number in the other namespace, or
+ else a negative errno code if the mapping can't be done. (For example,
+-some GPIOs can't used as IRQs.) It is an unchecked error to use a GPIO
++some GPIOs can't be used as IRQs.) It is an unchecked error to use a GPIO
+ number that wasn't set up as an input using gpio_direction_input(), or
+ to use an IRQ number that didn't originally come from gpio_to_irq().
+
+@@ -299,17 +315,110 @@ Related to multiplexing is configuration and enabling of the pullups or
+ pulldowns integrated on some platforms. Not all platforms support them,
+ or support them in the same way; and any given board might use external
+ pullups (or pulldowns) so that the on-chip ones should not be used.
++(When a circuit needs 5 kOhm, on-chip 100 kOhm resistors won't do.)
+
+ There are other system-specific mechanisms that are not specified here,
+ like the aforementioned options for input de-glitching and wire-OR output.
+ Hardware may support reading or writing GPIOs in gangs, but that's usually
+ configuration dependent: for GPIOs sharing the same bank. (GPIOs are
+ commonly grouped in banks of 16 or 32, with a given SOC having several such
+-banks.) Some systems can trigger IRQs from output GPIOs. Code relying on
+-such mechanisms will necessarily be nonportable.
++banks.) Some systems can trigger IRQs from output GPIOs, or read values
++from pins not managed as GPIOs. Code relying on such mechanisms will
++necessarily be nonportable.
+
+-Dynamic definition of GPIOs is not currently supported; for example, as
++Dynamic definition of GPIOs is not currently standard; for example, as
+ a side effect of configuring an add-on board with some GPIO expanders.
+
+ These calls are purely for kernel space, but a userspace API could be built
+-on top of it.
++on top of them.
++
++
++GPIO implementor's framework (OPTIONAL)
++=======================================
++As noted earlier, there is an optional implementation framework making it
++easier for platforms to support different kinds of GPIO controller using
++the same programming interface.
++
++As a debugging aid, if debugfs is available a /sys/kernel/debug/gpio file
++will be found there. That will list all the controllers registered through
++this framework, and the state of the GPIOs currently in use.
++
++
++Controller Drivers: gpio_chip
++-----------------------------
++In this framework each GPIO controller is packaged as a "struct gpio_chip"
++with information common to each controller of that type:
++
++ - methods to establish GPIO direction
++ - methods used to access GPIO values
++ - flag saying whether calls to its methods may sleep
++ - optional debugfs dump method (showing extra state like pullup config)
++ - label for diagnostics
++
++There is also per-instance data, which may come from device.platform_data:
++the number of its first GPIO, and how many GPIOs it exposes.
++
++The code implementing a gpio_chip should support multiple instances of the
++controller, possibly using the driver model. That code will configure each
++gpio_chip and issue gpiochip_add(). Removing a GPIO controller should be
++rare; use gpiochip_remove() when it is unavoidable.
++
++Most often a gpio_chip is part of an instance-specific structure with state
++not exposed by the GPIO interfaces, such as addressing, power management,
++and more. Chips such as codecs will have complex non-GPIO state,
++
++Any debugfs dump method should normally ignore signals which haven't been
++requested as GPIOs. They can use gpiochip_is_requested(), which returns
++either NULL or the label associated with that GPIO when it was requested.
++
++
++Platform Support
++----------------
++To support this framework, a platform's Kconfig will "select HAVE_GPIO_LIB"
++and arrange that its <asm/gpio.h> includes <asm-generic/gpio.h> and defines
++three functions: gpio_get_value(), gpio_set_value(), and gpio_cansleep().
++They may also want to provide a custom value for ARCH_NR_GPIOS.
++
++Trivial implementations of those functions can directly use framework
++code, which always dispatches through the gpio_chip:
++
++ #define gpio_get_value __gpio_get_value
++ #define gpio_set_value __gpio_set_value
++ #define gpio_cansleep __gpio_cansleep
++
++Fancier implementations could instead define those as inline functions with
++logic optimizing access to specific SOC-based GPIOs. For example, if the
++referenced GPIO is the constant "12", getting or setting its value could
++cost as little as two or three instructions, never sleeping. When such an
++optimization is not possible those calls must delegate to the framework
++code, costing at least a few dozen instructions. For bitbanged I/O, such
++instruction savings can be significant.
++
++For SOCs, platform-specific code defines and registers gpio_chip instances
++for each bank of on-chip GPIOs. Those GPIOs should be numbered/labeled to
++match chip vendor documentation, and directly match board schematics. They
++may well start at zero and go up to a platform-specific limit. Such GPIOs
++are normally integrated into platform initialization to make them always be
++available, from arch_initcall() or earlier; they can often serve as IRQs.
++
++
++Board Support
++-------------
++For external GPIO controllers -- such as I2C or SPI expanders, ASICs, multi
++function devices, FPGAs or CPLDs -- most often board-specific code handles
++registering controller devices and ensures that their drivers know what GPIO
++numbers to use with gpiochip_add(). Their numbers often start right after
++platform-specific GPIOs.
++
++For example, board setup code could create structures identifying the range
++of GPIOs that chip will expose, and passes them to each GPIO expander chip
++using platform_data. Then the chip driver's probe() routine could pass that
++data to gpiochip_add().
++
++Initialization order can be important. For example, when a device relies on
++an I2C-based GPIO, its probe() routine should only be called after that GPIO
++becomes available. That may mean the device should not be registered until
++calls for that GPIO can work. One way to address such dependencies is for
++such gpio_chip controllers to provide setup() and teardown() callbacks to
++board specific code; those board specific callbacks would register devices
++once all the necessary resources are available.
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch b/packages/linux/linux-rp-2.6.24/tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch
new file mode 100644
index 0000000000..84d0fd3e19
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch
@@ -0,0 +1,434 @@
+From 39717c1328f6aa13330eded0e0e268993cfd1eea Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Tue, 12 Feb 2008 10:39:53 +0300
+Subject: [PATCH 25/64] Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+
+---
+ arch/arm/mach-pxa/Makefile | 2 +-
+ arch/arm/mach-pxa/devices.c | 401 +++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 402 insertions(+), 1 deletions(-)
+ create mode 100644 arch/arm/mach-pxa/devices.c
+
+diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
+index 5cb0216..f276d24 100644
+--- a/arch/arm/mach-pxa/Makefile
++++ b/arch/arm/mach-pxa/Makefile
+@@ -4,7 +4,7 @@
+
+ # Common support (must be linked before board specific support)
+ obj-y += clock.o generic.o irq.o dma.o \
+- time.o gpio.o
++ time.o gpio.o devices.o
+ obj-$(CONFIG_PXA25x) += pxa25x.o
+ obj-$(CONFIG_PXA27x) += pxa27x.o
+ obj-$(CONFIG_PXA3xx) += pxa3xx.o mfp.o
+diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
+new file mode 100644
+index 0000000..928131a
+--- /dev/null
++++ b/arch/arm/mach-pxa/devices.c
+@@ -0,0 +1,401 @@
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/dma-mapping.h>
++
++#include <asm/arch/gpio.h>
++#include <asm/arch/udc.h>
++#include <asm/arch/pxafb.h>
++#include <asm/arch/mmc.h>
++#include <asm/arch/irda.h>
++#include <asm/arch/i2c.h>
++#include <asm/arch/ohci.h>
++
++#include "devices.h"
++
++#ifdef CONFIG_PXA25x
++
++static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa25x_resource_ssp[] = {
++ [0] = {
++ .start = 0x41000000,
++ .end = 0x4100001f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP,
++ .end = IRQ_SSP,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 13,
++ .end = 13,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 14,
++ .end = 14,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa25x_device_ssp = {
++ .name = "pxa25x-ssp",
++ .id = 0,
++ .dev = {
++ .dma_mask = &pxa25x_ssp_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa25x_resource_ssp,
++ .num_resources = ARRAY_SIZE(pxa25x_resource_ssp),
++};
++
++static u64 pxa25x_nssp_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa25x_resource_nssp[] = {
++ [0] = {
++ .start = 0x41400000,
++ .end = 0x4140002f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_NSSP,
++ .end = IRQ_NSSP,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 15,
++ .end = 15,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 16,
++ .end = 16,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa25x_device_nssp = {
++ .name = "pxa25x-nssp",
++ .id = 1,
++ .dev = {
++ .dma_mask = &pxa25x_nssp_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa25x_resource_nssp,
++ .num_resources = ARRAY_SIZE(pxa25x_resource_nssp),
++};
++
++static u64 pxa25x_assp_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa25x_resource_assp[] = {
++ [0] = {
++ .start = 0x41500000,
++ .end = 0x4150002f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_ASSP,
++ .end = IRQ_ASSP,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 23,
++ .end = 23,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 24,
++ .end = 24,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa25x_device_assp = {
++ /* ASSP is basically equivalent to NSSP */
++ .name = "pxa25x-nssp",
++ .id = 2,
++ .dev = {
++ .dma_mask = &pxa25x_assp_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa25x_resource_assp,
++ .num_resources = ARRAY_SIZE(pxa25x_resource_assp),
++};
++#endif /* CONFIG_PXA25x */
++
++#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
++
++static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa27x_resource_ohci[] = {
++ [0] = {
++ .start = 0x4C000000,
++ .end = 0x4C00ff6f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_USBH1,
++ .end = IRQ_USBH1,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++struct platform_device pxa27x_device_ohci = {
++ .name = "pxa27x-ohci",
++ .id = -1,
++ .dev = {
++ .dma_mask = &pxa27x_ohci_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .num_resources = ARRAY_SIZE(pxa27x_resource_ohci),
++ .resource = pxa27x_resource_ohci,
++};
++
++void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
++{
++ pxa_register_device(&pxa27x_device_ohci, info);
++}
++
++static u64 pxa27x_ssp1_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa27x_resource_ssp1[] = {
++ [0] = {
++ .start = 0x41000000,
++ .end = 0x4100003f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP,
++ .end = IRQ_SSP,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 13,
++ .end = 13,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 14,
++ .end = 14,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa27x_device_ssp1 = {
++ .name = "pxa27x-ssp",
++ .id = 0,
++ .dev = {
++ .dma_mask = &pxa27x_ssp1_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa27x_resource_ssp1,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp1),
++};
++
++static u64 pxa27x_ssp2_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa27x_resource_ssp2[] = {
++ [0] = {
++ .start = 0x41700000,
++ .end = 0x4170003f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP2,
++ .end = IRQ_SSP2,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 15,
++ .end = 15,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 16,
++ .end = 16,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa27x_device_ssp2 = {
++ .name = "pxa27x-ssp",
++ .id = 1,
++ .dev = {
++ .dma_mask = &pxa27x_ssp2_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa27x_resource_ssp2,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp2),
++};
++
++static u64 pxa27x_ssp3_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa27x_resource_ssp3[] = {
++ [0] = {
++ .start = 0x41900000,
++ .end = 0x4190003f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP3,
++ .end = IRQ_SSP3,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 66,
++ .end = 66,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 67,
++ .end = 67,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa27x_device_ssp3 = {
++ .name = "pxa27x-ssp",
++ .id = 2,
++ .dev = {
++ .dma_mask = &pxa27x_ssp3_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa27x_resource_ssp3,
++ .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
++};
++#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
++
++#ifdef CONFIG_PXA3xx
++static u64 pxa3xx_ssp4_dma_mask = DMA_BIT_MASK(32);
++
++static struct resource pxa3xx_resource_ssp4[] = {
++ [0] = {
++ .start = 0x41a00000,
++ .end = 0x41a0003f,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_SSP4,
++ .end = IRQ_SSP4,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ /* DRCMR for RX */
++ .start = 2,
++ .end = 2,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ /* DRCMR for TX */
++ .start = 3,
++ .end = 3,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa3xx_device_ssp4 = {
++ /* PXA3xx SSP is basically equivalent to PXA27x */
++ .name = "pxa27x-ssp",
++ .id = 3,
++ .dev = {
++ .dma_mask = &pxa3xx_ssp4_dma_mask,
++ .coherent_dma_mask = DMA_BIT_MASK(32),
++ },
++ .resource = pxa3xx_resource_ssp4,
++ .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4),
++};
++
++static struct resource pxa3xx_resources_mci2[] = {
++ [0] = {
++ .start = 0x42000000,
++ .end = 0x42000fff,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_MMC2,
++ .end = IRQ_MMC2,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .start = 93,
++ .end = 93,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ .start = 94,
++ .end = 94,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa3xx_device_mci2 = {
++ .name = "pxa2xx-mci",
++ .id = 1,
++ .dev = {
++ .dma_mask = &pxamci_dmamask,
++ .coherent_dma_mask = 0xffffffff,
++ },
++ .num_resources = ARRAY_SIZE(pxa3xx_resources_mci2),
++ .resource = pxa3xx_resources_mci2,
++};
++
++void __init pxa3xx_set_mci2_info(struct pxamci_platform_data *info)
++{
++ pxa_register_device(&pxa3xx_device_mci2, info);
++}
++
++static struct resource pxa3xx_resources_mci3[] = {
++ [0] = {
++ .start = 0x42500000,
++ .end = 0x42500fff,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = IRQ_MMC3,
++ .end = IRQ_MMC3,
++ .flags = IORESOURCE_IRQ,
++ },
++ [2] = {
++ .start = 100,
++ .end = 100,
++ .flags = IORESOURCE_DMA,
++ },
++ [3] = {
++ .start = 101,
++ .end = 101,
++ .flags = IORESOURCE_DMA,
++ },
++};
++
++struct platform_device pxa3xx_device_mci3 = {
++ .name = "pxa2xx-mci",
++ .id = 2,
++ .dev = {
++ .dma_mask = &pxamci_dmamask,
++ .coherent_dma_mask = 0xffffffff,
++ },
++ .num_resources = ARRAY_SIZE(pxa3xx_resources_mci3),
++ .resource = pxa3xx_resources_mci3,
++};
++
++void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
++{
++ pxa_register_device(&pxa3xx_device_mci3, info);
++}
++
++#endif /* CONFIG_PXA3xx */
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch b/packages/linux/linux-rp-2.6.24/tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch
new file mode 100644
index 0000000000..e1323e4edc
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch
@@ -0,0 +1,134 @@
+From cbe46408b666983284e8be290950d526dbc0f0a4 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:16 +0300
+Subject: [PATCH 26/64] I don't think we should check for IRQs when determining which one
+ of power supplies to register. Better use is_{ac,usb}_online
+ callbacks, this will not produce an obstacle to implement polling --
+ when irqs aren't mandatory. I'll send my two pending patches to show
+ the idea.
+
+For this particular issue, I think something like that should work.
+If it works for you, I'll commit that version, preserving your
+authorship, of course.
+---
+ drivers/power/pda_power.c | 80 ++++++++++++++++++++++++--------------------
+ 1 files changed, 44 insertions(+), 36 deletions(-)
+
+diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
+index c058f28..d98622f 100644
+--- a/drivers/power/pda_power.c
++++ b/drivers/power/pda_power.c
+@@ -168,66 +168,74 @@ static int pda_power_probe(struct platform_device *pdev)
+ pda_power_supplies[1].num_supplicants = pdata->num_supplicants;
+ }
+
+- ret = power_supply_register(&pdev->dev, &pda_power_supplies[0]);
+- if (ret) {
+- dev_err(dev, "failed to register %s power supply\n",
+- pda_power_supplies[0].name);
+- goto supply0_failed;
+- }
++ if (pdata->is_ac_online) {
++ ret = power_supply_register(&pdev->dev, &pda_power_supplies[0]);
++ if (ret) {
++ dev_err(dev, "failed to register %s power supply\n",
++ pda_power_supplies[0].name);
++ goto ac_supply_failed;
++ }
+
+- ret = power_supply_register(&pdev->dev, &pda_power_supplies[1]);
+- if (ret) {
+- dev_err(dev, "failed to register %s power supply\n",
+- pda_power_supplies[1].name);
+- goto supply1_failed;
++ if (ac_irq) {
++ ret = request_irq(ac_irq->start, power_changed_isr,
++ get_irq_flags(ac_irq), ac_irq->name,
++ &pda_power_supplies[0]);
++ if (ret) {
++ dev_err(dev, "request ac irq failed\n");
++ goto ac_irq_failed;
++ }
++ }
+ }
+
+- if (ac_irq) {
+- ret = request_irq(ac_irq->start, power_changed_isr,
+- get_irq_flags(ac_irq), ac_irq->name,
+- &pda_power_supplies[0]);
++ if (pdata->is_usb_online) {
++ ret = power_supply_register(&pdev->dev, &pda_power_supplies[1]);
+ if (ret) {
+- dev_err(dev, "request ac irq failed\n");
+- goto ac_irq_failed;
++ dev_err(dev, "failed to register %s power supply\n",
++ pda_power_supplies[1].name);
++ goto usb_supply_failed;
+ }
+- }
+
+- if (usb_irq) {
+- ret = request_irq(usb_irq->start, power_changed_isr,
+- get_irq_flags(usb_irq), usb_irq->name,
+- &pda_power_supplies[1]);
+- if (ret) {
+- dev_err(dev, "request usb irq failed\n");
+- goto usb_irq_failed;
++ if (usb_irq) {
++ ret = request_irq(usb_irq->start, power_changed_isr,
++ get_irq_flags(usb_irq),
++ usb_irq->name,
++ &pda_power_supplies[1]);
++ if (ret) {
++ dev_err(dev, "request usb irq failed\n");
++ goto usb_irq_failed;
++ }
+ }
+ }
+
+- goto success;
++ return 0;
+
+ usb_irq_failed:
+- if (ac_irq)
++ if (pdata->is_usb_online)
++ power_supply_unregister(&pda_power_supplies[1]);
++usb_supply_failed:
++ if (pdata->is_ac_online && ac_irq)
+ free_irq(ac_irq->start, &pda_power_supplies[0]);
+ ac_irq_failed:
+- power_supply_unregister(&pda_power_supplies[1]);
+-supply1_failed:
+- power_supply_unregister(&pda_power_supplies[0]);
+-supply0_failed:
++ if (pdata->is_ac_online)
++ power_supply_unregister(&pda_power_supplies[0]);
++ac_supply_failed:
+ noirqs:
+ wrongid:
+-success:
+ return ret;
+ }
+
+ static int pda_power_remove(struct platform_device *pdev)
+ {
+- if (usb_irq)
++ if (pdata->is_usb_online && usb_irq)
+ free_irq(usb_irq->start, &pda_power_supplies[1]);
+- if (ac_irq)
++ if (pdata->is_ac_online && ac_irq)
+ free_irq(ac_irq->start, &pda_power_supplies[0]);
+ del_timer_sync(&charger_timer);
+ del_timer_sync(&supply_timer);
+- power_supply_unregister(&pda_power_supplies[1]);
+- power_supply_unregister(&pda_power_supplies[0]);
++ if (pdata->is_usb_online)
++ power_supply_unregister(&pda_power_supplies[1]);
++ if (pdata->is_ac_online)
++ power_supply_unregister(&pda_power_supplies[0]);
+ return 0;
+ }
+
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch b/packages/linux/linux-rp-2.6.24/tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch
new file mode 100644
index 0000000000..240d2d0bd9
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch
@@ -0,0 +1,59 @@
+From e5e9808fd5ed9cb54dd9da9fb91b32c4f7e9da52 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:17 +0300
+Subject: [PATCH 27/64] Add LiMn (one of the most common for small non-rechargable batteries)i
+ battery technology and voltage_min/_max properties support.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/power/power_supply_sysfs.c | 5 ++++-
+ include/linux/power_supply.h | 3 +++
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
+index 249f61b..45d2f95 100644
+--- a/drivers/power/power_supply_sysfs.c
++++ b/drivers/power/power_supply_sysfs.c
+@@ -46,7 +46,8 @@ static ssize_t power_supply_show_property(struct device *dev,
+ "Unspecified failure"
+ };
+ static char *technology_text[] = {
+- "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd"
++ "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd",
++ "LiMn"
+ };
+ static char *capacity_level_text[] = {
+ "Unknown", "Critical", "Low", "Normal", "High", "Full"
+@@ -88,6 +89,8 @@ static struct device_attribute power_supply_attrs[] = {
+ POWER_SUPPLY_ATTR(present),
+ POWER_SUPPLY_ATTR(online),
+ POWER_SUPPLY_ATTR(technology),
++ POWER_SUPPLY_ATTR(voltage_max),
++ POWER_SUPPLY_ATTR(voltage_min),
+ POWER_SUPPLY_ATTR(voltage_max_design),
+ POWER_SUPPLY_ATTR(voltage_min_design),
+ POWER_SUPPLY_ATTR(voltage_now),
+diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
+index 606c095..cdbc5b8 100644
+--- a/include/linux/power_supply.h
++++ b/include/linux/power_supply.h
+@@ -54,6 +54,7 @@ enum {
+ POWER_SUPPLY_TECHNOLOGY_LIPO,
+ POWER_SUPPLY_TECHNOLOGY_LiFe,
+ POWER_SUPPLY_TECHNOLOGY_NiCd,
++ POWER_SUPPLY_TECHNOLOGY_LiMn,
+ };
+
+ enum {
+@@ -72,6 +73,8 @@ enum power_supply_property {
+ POWER_SUPPLY_PROP_PRESENT,
+ POWER_SUPPLY_PROP_ONLINE,
+ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN,
+ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
+ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+ POWER_SUPPLY_PROP_VOLTAGE_NOW,
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch b/packages/linux/linux-rp-2.6.24/tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch
new file mode 100644
index 0000000000..ac5df97dff
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch
@@ -0,0 +1,72 @@
+From df0801d2cd6a7081700c79f437d1185cbe1960a7 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:18 +0300
+Subject: [PATCH 28/64] Add suspend/resume/wakeup support for pda_power.
+ Now with device_init_wakeup.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/power/pda_power.c | 34 ++++++++++++++++++++++++++++++++++
+ 1 files changed, 34 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
+index d98622f..28360e8 100644
+--- a/drivers/power/pda_power.c
++++ b/drivers/power/pda_power.c
+@@ -207,6 +207,8 @@ static int pda_power_probe(struct platform_device *pdev)
+ }
+ }
+
++ device_init_wakeup(&pdev->dev, 1);
++
+ return 0;
+
+ usb_irq_failed:
+@@ -239,12 +241,44 @@ static int pda_power_remove(struct platform_device *pdev)
+ return 0;
+ }
+
++#ifdef CONFIG_PM
++static int pda_power_suspend(struct platform_device *pdev, pm_message_t state)
++{
++ if (device_may_wakeup(&pdev->dev)) {
++ if (ac_irq)
++ enable_irq_wake(ac_irq->start);
++ if (usb_irq)
++ enable_irq_wake(usb_irq->start);
++ }
++
++ return 0;
++}
++
++static int pda_power_resume(struct platform_device *pdev)
++{
++ if (device_may_wakeup(&pdev->dev)) {
++ if (usb_irq)
++ disable_irq_wake(usb_irq->start);
++ if (ac_irq)
++ disable_irq_wake(ac_irq->start);
++ }
++
++ return 0;
++}
++#else
++#define pda_power_suspend NULL
++#define pda_power_resume NULL
++#endif
++
++
+ static struct platform_driver pda_power_pdrv = {
+ .driver = {
+ .name = "pda-power",
+ },
+ .probe = pda_power_probe,
+ .remove = pda_power_remove,
++ .suspend = pda_power_suspend,
++ .resume = pda_power_resume,
+ };
+
+ static int __init pda_power_init(void)
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch b/packages/linux/linux-rp-2.6.24/tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch
new file mode 100644
index 0000000000..7347fd5a00
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch
@@ -0,0 +1,163 @@
+From 57d1450b4e5f27fa78c75895dc30213bde7191bc Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:18 +0300
+Subject: [PATCH 29/64] Support using VOLTAGE_* properties for apm calculations. It's pretty
+ dummy, but useful for batteries for which we can only get voltages.
+
+---
+ drivers/power/apm_power.c | 63 ++++++++++++++++++++++++++++++++++++--------
+ 1 files changed, 51 insertions(+), 12 deletions(-)
+
+diff --git a/drivers/power/apm_power.c b/drivers/power/apm_power.c
+index bbf3ee1..526c96e 100644
+--- a/drivers/power/apm_power.c
++++ b/drivers/power/apm_power.c
+@@ -13,6 +13,12 @@
+ #include <linux/power_supply.h>
+ #include <linux/apm-emulation.h>
+
++typedef enum {
++ SOURCE_ENERGY,
++ SOURCE_CHARGE,
++ SOURCE_VOLTAGE,
++} apm_source;
++
+ #define PSY_PROP(psy, prop, val) psy->get_property(psy, \
+ POWER_SUPPLY_PROP_##prop, val)
+
+@@ -87,7 +93,7 @@ static void find_main_battery(void)
+ }
+ }
+
+-static int calculate_time(int status, int using_charge)
++static int calculate_time(int status, apm_source source)
+ {
+ union power_supply_propval full;
+ union power_supply_propval empty;
+@@ -106,20 +112,34 @@ static int calculate_time(int status, int using_charge)
+ return -1;
+ }
+
+- if (using_charge) {
++ switch (source) {
++ case SOURCE_CHARGE:
+ full_prop = POWER_SUPPLY_PROP_CHARGE_FULL;
+ full_design_prop = POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN;
+ empty_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY;
+ empty_design_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY;
+ cur_avg_prop = POWER_SUPPLY_PROP_CHARGE_AVG;
+ cur_now_prop = POWER_SUPPLY_PROP_CHARGE_NOW;
+- } else {
++ break;
++ case SOURCE_ENERGY:
+ full_prop = POWER_SUPPLY_PROP_ENERGY_FULL;
+ full_design_prop = POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN;
+ empty_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY;
+ empty_design_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY;
+ cur_avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG;
+ cur_now_prop = POWER_SUPPLY_PROP_ENERGY_NOW;
++ break;
++ case SOURCE_VOLTAGE:
++ full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX;
++ full_design_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN;
++ empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;
++ empty_design_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN;
++ cur_avg_prop = POWER_SUPPLY_PROP_VOLTAGE_AVG;
++ cur_now_prop = POWER_SUPPLY_PROP_VOLTAGE_NOW;
++ break;
++ default:
++ printk(KERN_ERR "Unsupported source: %d\n", source);
++ return -1;
+ }
+
+ if (_MPSY_PROP(full_prop, &full)) {
+@@ -146,7 +166,7 @@ static int calculate_time(int status, int using_charge)
+ return -((cur.intval - empty.intval) * 60L) / I.intval;
+ }
+
+-static int calculate_capacity(int using_charge)
++static int calculate_capacity(apm_source source)
+ {
+ enum power_supply_property full_prop, empty_prop;
+ enum power_supply_property full_design_prop, empty_design_prop;
+@@ -154,20 +174,33 @@ static int calculate_capacity(int using_charge)
+ union power_supply_propval empty, full, cur;
+ int ret;
+
+- if (using_charge) {
++ switch (source) {
++ case SOURCE_CHARGE:
+ full_prop = POWER_SUPPLY_PROP_CHARGE_FULL;
+ empty_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY;
+ full_design_prop = POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN;
+ empty_design_prop = POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN;
+ now_prop = POWER_SUPPLY_PROP_CHARGE_NOW;
+ avg_prop = POWER_SUPPLY_PROP_CHARGE_AVG;
+- } else {
++ break;
++ case SOURCE_ENERGY:
+ full_prop = POWER_SUPPLY_PROP_ENERGY_FULL;
+ empty_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY;
+ full_design_prop = POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN;
+ empty_design_prop = POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN;
+ now_prop = POWER_SUPPLY_PROP_ENERGY_NOW;
+ avg_prop = POWER_SUPPLY_PROP_ENERGY_AVG;
++ case SOURCE_VOLTAGE:
++ full_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX;
++ empty_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN;
++ full_design_prop = POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN;
++ empty_design_prop = POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN;
++ now_prop = POWER_SUPPLY_PROP_VOLTAGE_NOW;
++ avg_prop = POWER_SUPPLY_PROP_VOLTAGE_AVG;
++ break;
++ default:
++ printk(KERN_ERR "Unsupported source: %d\n", source);
++ return -1;
+ }
+
+ if (_MPSY_PROP(full_prop, &full)) {
+@@ -234,10 +267,12 @@ static void apm_battery_apm_get_power_status(struct apm_power_info *info)
+ info->battery_life = capacity.intval;
+ } else {
+ /* try calculate using energy */
+- info->battery_life = calculate_capacity(0);
++ info->battery_life = calculate_capacity(SOURCE_ENERGY);
+ /* if failed try calculate using charge instead */
+ if (info->battery_life == -1)
+- info->battery_life = calculate_capacity(1);
++ info->battery_life = calculate_capacity(SOURCE_CHARGE);
++ if (info->battery_life == -1)
++ info->battery_life = calculate_capacity(SOURCE_VOLTAGE);
+ }
+
+ /* charging status */
+@@ -263,18 +298,22 @@ static void apm_battery_apm_get_power_status(struct apm_power_info *info)
+ !MPSY_PROP(TIME_TO_FULL_NOW, &time_to_full)) {
+ info->time = time_to_full.intval / 60;
+ } else {
+- info->time = calculate_time(status.intval, 0);
++ info->time = calculate_time(status.intval, SOURCE_ENERGY);
+ if (info->time == -1)
+- info->time = calculate_time(status.intval, 1);
++ info->time = calculate_time(status.intval, SOURCE_CHARGE);
++ if (info->time == -1)
++ info->time = calculate_time(status.intval, SOURCE_VOLTAGE);
+ }
+ } else {
+ if (!MPSY_PROP(TIME_TO_EMPTY_AVG, &time_to_empty) ||
+ !MPSY_PROP(TIME_TO_EMPTY_NOW, &time_to_empty)) {
+ info->time = time_to_empty.intval / 60;
+ } else {
+- info->time = calculate_time(status.intval, 0);
++ info->time = calculate_time(status.intval, SOURCE_ENERGY);
++ if (info->time == -1)
++ info->time = calculate_time(status.intval, SOURCE_CHARGE);
+ if (info->time == -1)
+- info->time = calculate_time(status.intval, 1);
++ info->time = calculate_time(status.intval, SOURCE_VOLTAGE);
+ }
+ }
+
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0030-Core-driver-for-WM97xx-touchscreens.patch b/packages/linux/linux-rp-2.6.24/tosa/0030-Core-driver-for-WM97xx-touchscreens.patch
new file mode 100644
index 0000000000..1c86a39c74
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0030-Core-driver-for-WM97xx-touchscreens.patch
@@ -0,0 +1,1083 @@
+From d3e044e0e10e6c6b75716cb927e92b4ec284132f Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:20 +0300
+Subject: [PATCH 30/64] Core driver for WM97xx touchscreens
+
+This patch series adds support for the touchscreen controllers provided
+by Wolfson Microelectronics WM97xx series chips in both polled and
+streaming modes.
+
+These drivers have been maintained out of tree since 2003. During that
+time the driver the primary maintainer was Liam Girdwood and a number of
+people have made contributions including Stanley Cai, Rodolfo Giometti,
+Russell King, Marc Kleine-Budde, Ian Molton, Vincent Sanders, Andrew
+Zabolotny, Graeme Gregory, Mike Arthur and myself. Apologies to anyone
+I have omitted.
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vincent Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/wm97xx-core.c | 724 +++++++++++++++++++++++++++++++
+ include/linux/wm97xx.h | 309 +++++++++++++
+ 2 files changed, 1033 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/wm97xx-core.c
+ create mode 100644 include/linux/wm97xx.h
+
+diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
+new file mode 100644
+index 0000000..27a0a99
+--- /dev/null
++++ b/drivers/input/touchscreen/wm97xx-core.c
+@@ -0,0 +1,724 @@
++/*
++ * wm97xx-core.c -- Touch screen driver core for Wolfson WM9705, WM9712
++ * and WM9713 AC97 Codecs.
++ *
++ * Copyright 2003, 2004, 2005, 2006, 2007, 2008 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * 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.
++ *
++ * Notes:
++ *
++ * Features:
++ * - supports WM9705, WM9712, WM9713
++ * - polling mode
++ * - continuous mode (arch-dependent)
++ * - adjustable rpu/dpp settings
++ * - adjustable pressure current
++ * - adjustable sample settle delay
++ * - 4 and 5 wire touchscreens (5 wire is WM9712 only)
++ * - pen down detection
++ * - battery monitor
++ * - sample AUX adcs
++ * - power management
++ * - codec GPIO
++ * - codec event notification
++ * Todo
++ * - Support for async sampling control for noisy LCDs.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/string.h>
++#include <linux/proc_fs.h>
++#include <linux/pm.h>
++#include <linux/interrupt.h>
++#include <linux/bitops.h>
++#include <linux/workqueue.h>
++#include <linux/wm97xx.h>
++#include <linux/uaccess.h>
++#include <linux/io.h>
++
++#define TS_NAME "wm97xx"
++#define WM_CORE_VERSION "0.65"
++#define DEFAULT_PRESSURE 0xb0c0
++
++
++/*
++ * Touchscreen absolute values
++ *
++ * These parameters are used to help the input layer discard out of
++ * range readings and reduce jitter etc.
++ *
++ * o min, max:- indicate the min and max values your touch screen returns
++ * o fuzz:- use a higher number to reduce jitter
++ *
++ * The default values correspond to Mainstone II in QVGA mode
++ *
++ * Please read
++ * Documentation/input/input-programming.txt for more details.
++ */
++
++static int abs_x[3] = {350, 3900, 5};
++module_param_array(abs_x, int, NULL, 0);
++MODULE_PARM_DESC(abs_x, "Touchscreen absolute X min, max, fuzz");
++
++static int abs_y[3] = {320, 3750, 40};
++module_param_array(abs_y, int, NULL, 0);
++MODULE_PARM_DESC(abs_y, "Touchscreen absolute Y min, max, fuzz");
++
++static int abs_p[3] = {0, 150, 4};
++module_param_array(abs_p, int, NULL, 0);
++MODULE_PARM_DESC(abs_p, "Touchscreen absolute Pressure min, max, fuzz");
++
++/*
++ * wm97xx IO access, all IO locking done by AC97 layer
++ */
++int wm97xx_reg_read(struct wm97xx *wm, u16 reg)
++{
++ if (wm->ac97)
++ return wm->ac97->bus->ops->read(wm->ac97, reg);
++ else
++ return -1;
++}
++EXPORT_SYMBOL_GPL(wm97xx_reg_read);
++
++void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val)
++{
++ /* cache digitiser registers */
++ if (reg >= AC97_WM9713_DIG1 && reg <= AC97_WM9713_DIG3)
++ wm->dig[(reg - AC97_WM9713_DIG1) >> 1] = val;
++
++ /* cache gpio regs */
++ if (reg >= AC97_GPIO_CFG && reg <= AC97_MISC_AFE)
++ wm->gpio[(reg - AC97_GPIO_CFG) >> 1] = val;
++
++ /* wm9713 irq reg */
++ if (reg == 0x5a)
++ wm->misc = val;
++
++ if (wm->ac97)
++ wm->ac97->bus->ops->write(wm->ac97, reg, val);
++}
++EXPORT_SYMBOL_GPL(wm97xx_reg_write);
++
++/**
++ * wm97xx_read_aux_adc - Read the aux adc.
++ * @wm: wm97xx device.
++ * @adcsel: codec ADC to be read
++ *
++ * Reads the selected AUX ADC.
++ */
++
++int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel)
++{
++ int power_adc = 0, auxval;
++ u16 power = 0;
++
++ /* get codec */
++ mutex_lock(&wm->codec_mutex);
++
++ /* When the touchscreen is not in use, we may have to power up
++ * the AUX ADC before we can use sample the AUX inputs->
++ */
++ if (wm->id == WM9713_ID2 &&
++ (power = wm97xx_reg_read(wm, AC97_EXTENDED_MID)) & 0x8000) {
++ power_adc = 1;
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, power & 0x7fff);
++ }
++
++ /* Prepare the codec for AUX reading */
++ wm->codec->aux_prepare(wm);
++
++ /* Turn polling mode on to read AUX ADC */
++ wm->pen_probably_down = 1;
++ wm->codec->poll_sample(wm, adcsel, &auxval);
++
++ if (power_adc)
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, power | 0x8000);
++
++ wm->codec->dig_restore(wm);
++
++ wm->pen_probably_down = 0;
++
++ mutex_unlock(&wm->codec_mutex);
++ return auxval & 0xfff;
++}
++EXPORT_SYMBOL_GPL(wm97xx_read_aux_adc);
++
++/**
++ * wm97xx_get_gpio - Get the status of a codec GPIO.
++ * @wm: wm97xx device.
++ * @gpio: gpio
++ *
++ * Get the status of a codec GPIO pin
++ */
++
++enum wm97xx_gpio_status wm97xx_get_gpio(struct wm97xx *wm, u32 gpio)
++{
++ u16 status;
++ enum wm97xx_gpio_status ret;
++
++ mutex_lock(&wm->codec_mutex);
++ status = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++
++ if (status & gpio)
++ ret = WM97XX_GPIO_HIGH;
++ else
++ ret = WM97XX_GPIO_LOW;
++
++ mutex_unlock(&wm->codec_mutex);
++ return ret;
++}
++EXPORT_SYMBOL_GPL(wm97xx_get_gpio);
++
++/**
++ * wm97xx_set_gpio - Set the status of a codec GPIO.
++ * @wm: wm97xx device.
++ * @gpio: gpio
++ *
++ *
++ * Set the status of a codec GPIO pin
++ */
++
++void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
++ enum wm97xx_gpio_status status)
++{
++ u16 reg;
++
++ mutex_lock(&wm->codec_mutex);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++
++ if (status & WM97XX_GPIO_HIGH)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ if (wm->id == WM9712_ID2)
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg << 1);
++ else
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg);
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_set_gpio);
++
++/*
++ * Codec GPIO pin configuration, this sets pin direction, polarity,
++ * stickyness and wake up.
++ */
++void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio, enum wm97xx_gpio_dir dir,
++ enum wm97xx_gpio_pol pol, enum wm97xx_gpio_sticky sticky,
++ enum wm97xx_gpio_wake wake)
++{
++ u16 reg;
++
++ mutex_lock(&wm->codec_mutex);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++
++ if (pol == WM97XX_GPIO_POL_HIGH)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
++
++ if (sticky == WM97XX_GPIO_STICKY)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
++
++ if (wake == WM97XX_GPIO_WAKE)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_WAKEUP, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++
++ if (dir == WM97XX_GPIO_IN)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, reg);
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_config_gpio);
++
++/*
++ * Handle a pen down interrupt.
++ */
++static void wm97xx_pen_irq_worker(struct work_struct *work)
++{
++ struct wm97xx *wm = container_of(work, struct wm97xx, pen_event_work);
++
++ /* do we need to enable the touch panel reader */
++ if (wm->id == WM9705_ID2) {
++ if (wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD) &
++ WM97XX_PEN_DOWN)
++ wm->pen_is_down = 1;
++ else
++ wm->pen_is_down = 0;
++ } else {
++ u16 status, pol;
++ mutex_lock(&wm->codec_mutex);
++ status = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++ pol = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++
++ if (WM97XX_GPIO_13 & pol & status) {
++ wm->pen_is_down = 1;
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, pol &
++ ~WM97XX_GPIO_13);
++ } else {
++ wm->pen_is_down = 0;
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, pol |
++ WM97XX_GPIO_13);
++ }
++
++ if (wm->id == WM9712_ID2)
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, (status &
++ ~WM97XX_GPIO_13) << 1);
++ else
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, status &
++ ~WM97XX_GPIO_13);
++ mutex_unlock(&wm->codec_mutex);
++ }
++
++ queue_delayed_work(wm->ts_workq, &wm->ts_reader, 0);
++
++ if (!wm->pen_is_down && wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->mach_ops->acc_pen_up(wm);
++ wm->mach_ops->irq_enable(wm, 1);
++}
++
++/*
++ * Codec PENDOWN irq handler
++ *
++ * We have to disable the codec interrupt in the handler because it can
++ * take upto 1ms to clear the interrupt source. The interrupt is then enabled
++ * again in the slow handler when the source has been cleared.
++ */
++static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id)
++{
++ struct wm97xx *wm = dev_id;
++ wm->mach_ops->irq_enable(wm, 0);
++ queue_work(wm->ts_workq, &wm->pen_event_work);
++ return IRQ_HANDLED;
++}
++
++/*
++ * initialise pen IRQ handler and workqueue
++ */
++static int wm97xx_init_pen_irq(struct wm97xx *wm)
++{
++ u16 reg;
++
++ /* If an interrupt is supplied an IRQ enable operation must also be
++ * provided. */
++ BUG_ON(!wm->mach_ops->irq_enable);
++
++ INIT_WORK(&wm->pen_event_work, wm97xx_pen_irq_worker);
++
++ if (request_irq(wm->pen_irq, wm97xx_pen_interrupt, IRQF_SHARED,
++ "wm97xx-pen", wm)) {
++ dev_err(wm->dev,
++ "Failed to register pen down interrupt, polling");
++ wm->pen_irq = 0;
++ return -EINVAL;
++ }
++
++ /* enable PEN down on wm9712/13 */
++ if (wm->id != WM9705_ID2) {
++ reg = wm97xx_reg_read(wm, AC97_MISC_AFE);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, reg & 0xfffb);
++ reg = wm97xx_reg_read(wm, 0x5a);
++ wm97xx_reg_write(wm, 0x5a, reg & ~0x0001);
++ }
++
++ return 0;
++}
++
++static int wm97xx_read_samples(struct wm97xx *wm)
++{
++ struct wm97xx_data data;
++ int rc;
++
++ mutex_lock(&wm->codec_mutex);
++
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ rc = wm->mach_ops->acc_pen_down(wm);
++ else
++ rc = wm->codec->poll_touch(wm, &data);
++
++ if (rc & RC_PENUP) {
++ if (wm->pen_is_down) {
++ wm->pen_is_down = 0;
++ dev_dbg(wm->dev, "pen up\n");
++ input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
++ input_sync(wm->input_dev);
++ } else if (!(rc & RC_AGAIN)) {
++ /* We need high frequency updates only while
++ * pen is down, the user never will be able to
++ * touch screen faster than a few times per
++ * second... On the other hand, when the user
++ * is actively working with the touchscreen we
++ * don't want to lose the quick response. So we
++ * will slowly increase sleep time after the
++ * pen is up and quicky restore it to ~one task
++ * switch when pen is down again.
++ */
++ if (wm->ts_reader_interval < HZ / 10)
++ wm->ts_reader_interval++;
++ }
++
++ } else if (rc & RC_VALID) {
++ dev_dbg(wm->dev,
++ "pen down: x=%x:%d, y=%x:%d, pressure=%x:%d\n",
++ data.x >> 12, data.x & 0xfff, data.y >> 12,
++ data.y & 0xfff, data.p >> 12, data.p & 0xfff);
++ input_report_abs(wm->input_dev, ABS_X, data.x & 0xfff);
++ input_report_abs(wm->input_dev, ABS_Y, data.y & 0xfff);
++ input_report_abs(wm->input_dev, ABS_PRESSURE, data.p & 0xfff);
++ input_sync(wm->input_dev);
++ wm->pen_is_down = 1;
++ wm->ts_reader_interval = wm->ts_reader_min_interval;
++ } else if (rc & RC_PENDOWN) {
++ dev_dbg(wm->dev, "pen down");
++ wm->pen_is_down = 1;
++ wm->ts_reader_interval = wm->ts_reader_min_interval;
++ }
++
++ mutex_unlock(&wm->codec_mutex);
++ return rc;
++}
++
++/*
++* The touchscreen sample reader.
++*/
++static void wm97xx_ts_reader(struct work_struct *work)
++{
++ int rc;
++ struct wm97xx *wm = container_of(work, struct wm97xx, ts_reader.work);
++
++ BUG_ON(!wm->codec);
++
++ do {
++ rc = wm97xx_read_samples(wm);
++ } while (rc & RC_AGAIN);
++
++ if (wm->pen_is_down || !wm->pen_irq)
++ queue_delayed_work(wm->ts_workq, &wm->ts_reader,
++ wm->ts_reader_interval);
++}
++
++/**
++ * wm97xx_ts_input_open - Open the touch screen input device.
++ * @idev: Input device to be opened.
++ *
++ * Called by the input sub system to open a wm97xx touchscreen device.
++ * Starts the touchscreen thread and touch digitiser.
++ */
++static int wm97xx_ts_input_open(struct input_dev *idev)
++{
++ struct wm97xx *wm = input_get_drvdata(idev);
++
++ wm->ts_workq = create_singlethread_workqueue("kwm97xx");
++ if (wm->ts_workq == NULL) {
++ dev_err(wm->dev,
++ "Failed to create workqueue\n");
++ return -EINVAL;
++ }
++
++ /* start digitiser */
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->codec->acc_enable(wm, 1);
++ wm->codec->dig_enable(wm, 1);
++
++ INIT_DELAYED_WORK(&wm->ts_reader, wm97xx_ts_reader);
++
++ wm->ts_reader_min_interval = HZ >= 100 ? HZ / 100 : 1;
++ if (wm->ts_reader_min_interval < 1)
++ wm->ts_reader_min_interval = 1;
++ wm->ts_reader_interval = wm->ts_reader_min_interval;
++
++ wm->pen_is_down = 0;
++ if (wm->pen_irq)
++ wm97xx_init_pen_irq(wm);
++ else
++ dev_err(wm->dev, "No IRQ specified\n");
++
++ /* If we either don't have an interrupt for pen down events or
++ * failed to acquire it then we need to poll.
++ */
++ if (wm->pen_irq == 0)
++ queue_delayed_work(wm->ts_workq, &wm->ts_reader,
++ wm->ts_reader_interval);
++
++ return 0;
++}
++
++/**
++ * wm97xx_ts_input_close - Close the touch screen input device.
++ * @idev: Input device to be closed.
++ *
++ * Called by the input sub system to close a wm97xx touchscreen device.
++ * Kills the touchscreen thread and stops the touch digitiser.
++ */
++
++static void wm97xx_ts_input_close(struct input_dev *idev)
++{
++ struct wm97xx *wm = input_get_drvdata(idev);
++
++ if (wm->pen_irq)
++ free_irq(wm->pen_irq, wm);
++
++ wm->pen_is_down = 0;
++
++ /* ts_reader rearms itself so we need to explicitly stop it
++ * before we destroy the workqueue.
++ */
++ cancel_delayed_work_sync(&wm->ts_reader);
++ destroy_workqueue(wm->ts_workq);
++
++ /* stop digitiser */
++ wm->codec->dig_enable(wm, 0);
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->codec->acc_enable(wm, 0);
++}
++
++static int wm97xx_probe(struct device *dev)
++{
++ struct wm97xx *wm;
++ int ret = 0, id = 0;
++
++ wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL);
++ if (!wm)
++ return -ENOMEM;
++ mutex_init(&wm->codec_mutex);
++
++ wm->dev = dev;
++ dev->driver_data = wm;
++ wm->ac97 = to_ac97_t(dev);
++
++ /* check that we have a supported codec */
++ id = wm97xx_reg_read(wm, AC97_VENDOR_ID1);
++ if (id != WM97XX_ID1) {
++ dev_err(dev, "Device with vendor %04x is not a wm97xx\n", id);
++ kfree(wm);
++ return -ENODEV;
++ }
++
++ wm->id = wm97xx_reg_read(wm, AC97_VENDOR_ID2);
++
++ dev_info(wm->dev, "detected a wm97%02x codec", wm->id & 0xff);
++
++ switch (wm->id & 0xff) {
++#ifdef CONFIG_TOUCHSCREEN_WM9705
++ case 0x05:
++ wm->codec = &wm9705_codec;
++ break;
++#endif
++#ifdef CONFIG_TOUCHSCREEN_WM9712
++ case 0x12:
++ wm->codec = &wm9712_codec;
++ break;
++#endif
++#ifdef CONFIG_TOUCHSCREEN_WM9713
++ case 0x13:
++ wm->codec = &wm9713_codec;
++ break;
++#endif
++ default:
++ dev_err(wm->dev, "Support for wm97%02x not compiled in.\n",
++ wm->id & 0xff);
++ kfree(wm);
++ return -ENODEV;
++ }
++
++ wm->input_dev = input_allocate_device();
++ if (wm->input_dev == NULL) {
++ kfree(wm);
++ return -ENOMEM;
++ }
++
++ /* set up touch configuration */
++ wm->input_dev->name = "wm97xx touchscreen";
++ wm->input_dev->open = wm97xx_ts_input_open;
++ wm->input_dev->close = wm97xx_ts_input_close;
++ set_bit(EV_ABS, wm->input_dev->evbit);
++ set_bit(ABS_X, wm->input_dev->absbit);
++ set_bit(ABS_Y, wm->input_dev->absbit);
++ set_bit(ABS_PRESSURE, wm->input_dev->absbit);
++ input_set_abs_params(wm->input_dev, ABS_X, abs_x[0], abs_x[1],
++ abs_x[2], 0);
++ input_set_abs_params(wm->input_dev, ABS_Y, abs_y[0], abs_y[1],
++ abs_y[2], 0);
++ input_set_abs_params(wm->input_dev, ABS_PRESSURE, abs_p[0], abs_p[1],
++ abs_p[2], 0);
++ input_set_drvdata(wm->input_dev, wm);
++ wm->input_dev->dev.parent = dev;
++ ret = input_register_device(wm->input_dev);
++ if (ret < 0) {
++ input_free_device(wm->input_dev);
++ kfree(wm);
++ return -ENOMEM;
++ }
++
++ /* set up physical characteristics */
++ wm->codec->phy_init(wm);
++
++ /* load gpio cache */
++ wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++ wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++ wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
++ wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
++ wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++ wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
++
++ /* register our battery device */
++ wm->battery_dev = platform_device_alloc("wm97xx-battery", 0);
++ if (!wm->battery_dev)
++ goto batt_err;
++ platform_set_drvdata(wm->battery_dev, wm);
++ wm->battery_dev->dev.parent = dev;
++ ret = platform_device_register(wm->battery_dev);
++ if (ret < 0)
++ goto batt_reg_err;
++
++ /* register our extended touch device (for machine specific
++ * extensions) */
++ wm->touch_dev = platform_device_alloc("wm97xx-touch", 0);
++ if (!wm->touch_dev)
++ goto touch_err;
++ platform_set_drvdata(wm->touch_dev, wm);
++ wm->touch_dev->dev.parent = dev;
++ ret = platform_device_register(wm->touch_dev);
++ if (ret < 0)
++ goto touch_reg_err;
++
++ return ret;
++
++ touch_reg_err:
++ platform_device_put(wm->touch_dev);
++ touch_err:
++ platform_device_unregister(wm->battery_dev);
++ batt_reg_err:
++ platform_device_put(wm->battery_dev);
++ batt_err:
++ input_unregister_device(wm->input_dev);
++ kfree(wm);
++ return ret;
++}
++
++static int wm97xx_remove(struct device *dev)
++{
++ struct wm97xx *wm = dev_get_drvdata(dev);
++
++ platform_device_unregister(wm->battery_dev);
++ platform_device_unregister(wm->touch_dev);
++ input_unregister_device(wm->input_dev);
++
++ kfree(wm);
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static int wm97xx_resume(struct device *dev)
++{
++ struct wm97xx *wm = dev_get_drvdata(dev);
++
++ /* restore digitiser and gpios */
++ if (wm->id == WM9713_ID2) {
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, wm->dig[0]);
++ wm97xx_reg_write(wm, 0x5a, wm->misc);
++ if (wm->input_dev->users) {
++ u16 reg;
++ reg = wm97xx_reg_read(wm, AC97_EXTENDED_MID) & 0x7fff;
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, reg);
++ }
++ }
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, wm->dig[1]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2]);
++
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, wm->gpio[0]);
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, wm->gpio[1]);
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, wm->gpio[2]);
++ wm97xx_reg_write(wm, AC97_GPIO_WAKEUP, wm->gpio[3]);
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, wm->gpio[4]);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, wm->gpio[5]);
++
++ return 0;
++}
++
++#else
++#define wm97xx_resume NULL
++#endif
++
++/*
++ * Machine specific operations
++ */
++int wm97xx_register_mach_ops(struct wm97xx *wm,
++ struct wm97xx_mach_ops *mach_ops)
++{
++ mutex_lock(&wm->codec_mutex);
++ if (wm->mach_ops) {
++ mutex_unlock(&wm->codec_mutex);
++ return -EINVAL;
++ }
++ wm->mach_ops = mach_ops;
++ mutex_unlock(&wm->codec_mutex);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(wm97xx_register_mach_ops);
++
++void wm97xx_unregister_mach_ops(struct wm97xx *wm)
++{
++ mutex_lock(&wm->codec_mutex);
++ wm->mach_ops = NULL;
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops);
++
++static struct device_driver wm97xx_driver = {
++ .name = "ac97",
++ .bus = &ac97_bus_type,
++ .owner = THIS_MODULE,
++ .probe = wm97xx_probe,
++ .remove = wm97xx_remove,
++ .resume = wm97xx_resume,
++};
++
++static int __init wm97xx_init(void)
++{
++ return driver_register(&wm97xx_driver);
++}
++
++static void __exit wm97xx_exit(void)
++{
++ driver_unregister(&wm97xx_driver);
++}
++
++module_init(wm97xx_init);
++module_exit(wm97xx_exit);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("WM97xx Core - Touch Screen / AUX ADC / GPIO Driver");
++MODULE_LICENSE("GPL");
+diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
+new file mode 100644
+index 0000000..fc6e0b3
+--- /dev/null
++++ b/include/linux/wm97xx.h
+@@ -0,0 +1,309 @@
++
++/*
++ * Register bits and API for Wolfson WM97xx series of codecs
++ */
++
++#ifndef _LINUX_WM97XX_H
++#define _LINUX_WM97XX_H
++
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/ac97_codec.h>
++#include <sound/initval.h>
++#include <linux/types.h>
++#include <linux/list.h>
++#include <linux/input.h> /* Input device layer */
++#include <linux/platform_device.h>
++
++/*
++ * WM97xx AC97 Touchscreen registers
++ */
++#define AC97_WM97XX_DIGITISER1 0x76
++#define AC97_WM97XX_DIGITISER2 0x78
++#define AC97_WM97XX_DIGITISER_RD 0x7a
++#define AC97_WM9713_DIG1 0x74
++#define AC97_WM9713_DIG2 AC97_WM97XX_DIGITISER1
++#define AC97_WM9713_DIG3 AC97_WM97XX_DIGITISER2
++
++/*
++ * WM97xx register bits
++ */
++#define WM97XX_POLL 0x8000 /* initiate a polling measurement */
++#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
++#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
++#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
++#define WM97XX_ADCSEL_MASK 0x7000
++#define WM97XX_COO 0x0800 /* enable coordinate mode */
++#define WM97XX_CTC 0x0400 /* enable continuous mode */
++#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */
++#define WM97XX_CM_RATE_187 0x0100 /* 187.5Hz continuous rate */
++#define WM97XX_CM_RATE_375 0x0200 /* 375Hz continuous rate */
++#define WM97XX_CM_RATE_750 0x0300 /* 750Hz continuous rate */
++#define WM97XX_CM_RATE_8K 0x00f0 /* 8kHz continuous rate */
++#define WM97XX_CM_RATE_12K 0x01f0 /* 12kHz continuous rate */
++#define WM97XX_CM_RATE_24K 0x02f0 /* 24kHz continuous rate */
++#define WM97XX_CM_RATE_48K 0x03f0 /* 48kHz continuous rate */
++#define WM97XX_CM_RATE_MASK 0x03f0
++#define WM97XX_RATE(i) (((i & 3) << 8) | ((i & 4) ? 0xf0 : 0))
++#define WM97XX_DELAY(i) ((i << 4) & 0x00f0) /* sample delay times */
++#define WM97XX_DELAY_MASK 0x00f0
++#define WM97XX_SLEN 0x0008 /* slot read back enable */
++#define WM97XX_SLT(i) ((i - 5) & 0x7) /* panel slot (5-11) */
++#define WM97XX_SLT_MASK 0x0007
++#define WM97XX_PRP_DETW 0x4000 /* detect on, digitise off, wake */
++#define WM97XX_PRP_DET 0x8000 /* detect on, digitise off, no wake */
++#define WM97XX_PRP_DET_DIG 0xc000 /* setect on, digitise on */
++#define WM97XX_RPR 0x2000 /* wake up on pen down */
++#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
++#define WM97XX_ADCSRC_MASK 0x7000 /* ADC source mask */
++
++#define WM97XX_AUX_ID1 0x8001
++#define WM97XX_AUX_ID2 0x8002
++#define WM97XX_AUX_ID3 0x8003
++#define WM97XX_AUX_ID4 0x8004
++
++
++/* WM9712 Bits */
++#define WM9712_45W 0x1000 /* set for 5-wire touchscreen */
++#define WM9712_PDEN 0x0800 /* measure only when pen down */
++#define WM9712_WAIT 0x0200 /* wait until adc is read before next sample */
++#define WM9712_PIL 0x0100 /* current used for pressure measurement. set 400uA else 200uA */
++#define WM9712_MASK_HI 0x0040 /* hi on mask pin (47) stops conversions */
++#define WM9712_MASK_EDGE 0x0080 /* rising/falling edge on pin delays sample */
++#define WM9712_MASK_SYNC 0x00c0 /* rising/falling edge on mask initiates sample */
++#define WM9712_RPU(i) (i&0x3f) /* internal pull up on pen detect (64k / rpu) */
++#define WM9712_PD(i) (0x1 << i) /* power management */
++
++/* WM9712 Registers */
++#define AC97_WM9712_POWER 0x24
++#define AC97_WM9712_REV 0x58
++
++/* WM9705 Bits */
++#define WM9705_PDEN 0x1000 /* measure only when pen is down */
++#define WM9705_PINV 0x0800 /* inverts sense of pen down output */
++#define WM9705_BSEN 0x0400 /* BUSY flag enable, pin47 is 1 when busy */
++#define WM9705_BINV 0x0200 /* invert BUSY (pin47) output */
++#define WM9705_WAIT 0x0100 /* wait until adc is read before next sample */
++#define WM9705_PIL 0x0080 /* current used for pressure measurement. set 400uA else 200uA */
++#define WM9705_PHIZ 0x0040 /* set PHONE and PCBEEP inputs to high impedance */
++#define WM9705_MASK_HI 0x0010 /* hi on mask stops conversions */
++#define WM9705_MASK_EDGE 0x0020 /* rising/falling edge on pin delays sample */
++#define WM9705_MASK_SYNC 0x0030 /* rising/falling edge on mask initiates sample */
++#define WM9705_PDD(i) (i & 0x000f) /* pen detect comparator threshold */
++
++
++/* WM9713 Bits */
++#define WM9713_PDPOL 0x0400 /* Pen down polarity */
++#define WM9713_POLL 0x0200 /* initiate a polling measurement */
++#define WM9713_CTC 0x0100 /* enable continuous mode */
++#define WM9713_ADCSEL_X 0x0002 /* X measurement */
++#define WM9713_ADCSEL_Y 0x0004 /* Y measurement */
++#define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */
++#define WM9713_COO 0x0001 /* enable coordinate mode */
++#define WM9713_PDEN 0x0800 /* measure only when pen down */
++#define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */
++#define WM9713_WAIT 0x0200 /* coordinate wait */
++
++/* AUX ADC ID's */
++#define TS_COMP1 0x0
++#define TS_COMP2 0x1
++#define TS_BMON 0x2
++#define TS_WIPER 0x3
++
++/* ID numbers */
++#define WM97XX_ID1 0x574d
++#define WM9712_ID2 0x4c12
++#define WM9705_ID2 0x4c05
++#define WM9713_ID2 0x4c13
++
++/* Codec GPIO's */
++#define WM97XX_MAX_GPIO 16
++#define WM97XX_GPIO_1 (1 << 1)
++#define WM97XX_GPIO_2 (1 << 2)
++#define WM97XX_GPIO_3 (1 << 3)
++#define WM97XX_GPIO_4 (1 << 4)
++#define WM97XX_GPIO_5 (1 << 5)
++#define WM97XX_GPIO_6 (1 << 6)
++#define WM97XX_GPIO_7 (1 << 7)
++#define WM97XX_GPIO_8 (1 << 8)
++#define WM97XX_GPIO_9 (1 << 9)
++#define WM97XX_GPIO_10 (1 << 10)
++#define WM97XX_GPIO_11 (1 << 11)
++#define WM97XX_GPIO_12 (1 << 12)
++#define WM97XX_GPIO_13 (1 << 13)
++#define WM97XX_GPIO_14 (1 << 14)
++#define WM97XX_GPIO_15 (1 << 15)
++
++
++#define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */
++
++
++/*---------------- Return codes from sample reading functions ---------------*/
++
++/* More data is available; call the sample gathering function again */
++#define RC_AGAIN 0x00000001
++/* The returned sample is valid */
++#define RC_VALID 0x00000002
++/* The pen is up (the first RC_VALID without RC_PENUP means pen is down) */
++#define RC_PENUP 0x00000004
++/* The pen is down (RC_VALID implies RC_PENDOWN, but sometimes it is helpful
++ to tell the handler that the pen is down but we don't know yet his coords,
++ so the handler should not sleep or wait for pendown irq) */
++#define RC_PENDOWN 0x00000008
++
++/*
++ * The wm97xx driver provides a private API for writing platform-specific
++ * drivers.
++ */
++
++/* The structure used to return arch specific sampled data into */
++struct wm97xx_data {
++ int x;
++ int y;
++ int p;
++};
++
++/*
++ * Codec GPIO status
++ */
++enum wm97xx_gpio_status {
++ WM97XX_GPIO_HIGH,
++ WM97XX_GPIO_LOW
++};
++
++/*
++ * Codec GPIO direction
++ */
++enum wm97xx_gpio_dir {
++ WM97XX_GPIO_IN,
++ WM97XX_GPIO_OUT
++};
++
++/*
++ * Codec GPIO polarity
++ */
++enum wm97xx_gpio_pol {
++ WM97XX_GPIO_POL_HIGH,
++ WM97XX_GPIO_POL_LOW
++};
++
++/*
++ * Codec GPIO sticky
++ */
++enum wm97xx_gpio_sticky {
++ WM97XX_GPIO_STICKY,
++ WM97XX_GPIO_NOTSTICKY
++};
++
++/*
++ * Codec GPIO wake
++ */
++enum wm97xx_gpio_wake {
++ WM97XX_GPIO_WAKE,
++ WM97XX_GPIO_NOWAKE
++};
++
++/*
++ * Digitiser ioctl commands
++ */
++#define WM97XX_DIG_START 0x1
++#define WM97XX_DIG_STOP 0x2
++#define WM97XX_PHY_INIT 0x3
++#define WM97XX_AUX_PREPARE 0x4
++#define WM97XX_DIG_RESTORE 0x5
++
++struct wm97xx;
++
++extern struct wm97xx_codec_drv wm9705_codec;
++extern struct wm97xx_codec_drv wm9712_codec;
++extern struct wm97xx_codec_drv wm9713_codec;
++
++/*
++ * Codec driver interface - allows mapping to WM9705/12/13 and newer codecs
++ */
++struct wm97xx_codec_drv {
++ u16 id;
++ char *name;
++
++ /* read 1 sample */
++ int (*poll_sample) (struct wm97xx *, int adcsel, int *sample);
++
++ /* read X,Y,[P] in poll */
++ int (*poll_touch) (struct wm97xx *, struct wm97xx_data *);
++
++ int (*acc_enable) (struct wm97xx *, int enable);
++ void (*phy_init) (struct wm97xx *);
++ void (*dig_enable) (struct wm97xx *, int enable);
++ void (*dig_restore) (struct wm97xx *);
++ void (*aux_prepare) (struct wm97xx *);
++};
++
++
++/* Machine specific and accelerated touch operations */
++struct wm97xx_mach_ops {
++
++ /* accelerated touch readback - coords are transmited on AC97 link */
++ int acc_enabled;
++ void (*acc_pen_up) (struct wm97xx *);
++ int (*acc_pen_down) (struct wm97xx *);
++ int (*acc_startup) (struct wm97xx *);
++ void (*acc_shutdown) (struct wm97xx *);
++
++ /* interrupt mask control - required for accelerated operation */
++ void (*irq_enable) (struct wm97xx *, int enable);
++
++ /* pre and post sample - can be used to minimise any analog noise */
++ void (*pre_sample) (int); /* function to run before sampling */
++ void (*post_sample) (int); /* function to run after sampling */
++};
++
++struct wm97xx {
++ u16 dig[3], id, gpio[6], misc; /* Cached codec registers */
++ u16 dig_save[3]; /* saved during aux reading */
++ struct wm97xx_codec_drv *codec; /* attached codec driver*/
++ struct input_dev *input_dev; /* touchscreen input device */
++ struct snd_ac97 *ac97; /* ALSA codec access */
++ struct device *dev; /* ALSA device */
++ struct platform_device *battery_dev;
++ struct platform_device *touch_dev;
++ struct wm97xx_mach_ops *mach_ops;
++ struct mutex codec_mutex;
++ struct delayed_work ts_reader; /* Used to poll touchscreen */
++ unsigned long ts_reader_interval; /* Current interval for timer */
++ unsigned long ts_reader_min_interval; /* Minimum interval */
++ unsigned int pen_irq; /* Pen IRQ number in use */
++ struct workqueue_struct *ts_workq;
++ struct work_struct pen_event_work;
++ u16 acc_slot; /* AC97 slot used for acc touch data */
++ u16 acc_rate; /* acc touch data rate */
++ unsigned pen_is_down:1; /* Pen is down */
++ unsigned aux_waiting:1; /* aux measurement waiting */
++ unsigned pen_probably_down:1; /* used in polling mode */
++};
++
++/*
++ * Codec GPIO access (not supported on WM9705)
++ * This can be used to set/get codec GPIO and Virtual GPIO status.
++ */
++enum wm97xx_gpio_status wm97xx_get_gpio(struct wm97xx *wm, u32 gpio);
++void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
++ enum wm97xx_gpio_status status);
++void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio,
++ enum wm97xx_gpio_dir dir,
++ enum wm97xx_gpio_pol pol,
++ enum wm97xx_gpio_sticky sticky,
++ enum wm97xx_gpio_wake wake);
++
++/* codec AC97 IO access */
++int wm97xx_reg_read(struct wm97xx *wm, u16 reg);
++void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val);
++
++/* aux adc readback */
++int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel);
++
++/* machine ops */
++int wm97xx_register_mach_ops(struct wm97xx *, struct wm97xx_mach_ops *);
++void wm97xx_unregister_mach_ops(struct wm97xx *);
++
++#endif
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch b/packages/linux/linux-rp-2.6.24/tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch
new file mode 100644
index 0000000000..3890795f61
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch
@@ -0,0 +1,383 @@
+From 7b366ca784d0540613a43908de803e4dedc100d3 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:20 +0300
+Subject: [PATCH 31/64] Add chip driver for WM9705 touchscreen
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vince Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/wm9705.c | 352 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 352 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/wm9705.c
+
+diff --git a/drivers/input/touchscreen/wm9705.c b/drivers/input/touchscreen/wm9705.c
+new file mode 100644
+index 0000000..f185104
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9705.c
+@@ -0,0 +1,352 @@
++/*
++ * wm9705.c -- Codec driver for Wolfson WM9705 AC97 Codec.
++ *
++ * Copyright 2003, 2004, 2005, 2006, 2007 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * 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.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9705_VERSION "0.62"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 4;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Pen detect comparator threshold.
++ *
++ * 0 to Vmid in 15 steps, 0 = use zero power comparator with Vmid threshold
++ * i.e. 1 = Vmid/15 threshold
++ * 15 = Vmid/1 threshold
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down events.
++ */
++static int pdd = 8;
++module_param(pdd, int, 0);
++MODULE_PARM_DESC(pdd, "Set pen detect comparator threshold");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, /* 1 AC97 Link frames */
++ 42, /* 2 */
++ 84, /* 4 */
++ 167, /* 8 */
++ 333, /* 16 */
++ 667, /* 32 */
++ 1000, /* 48 */
++ 1333, /* 64 */
++ 2000, /* 96 */
++ 2667, /* 128 */
++ 3333, /* 160 */
++ 4000, /* 192 */
++ 4667, /* 224 */
++ 5333, /* 256 */
++ 6000, /* 288 */
++ 0 /* No delay, switch matrix always on */
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay(3 * AC97_LINK_FRAME + delay_table[d]);
++}
++
++/*
++ * set up the physical settings of the WM9705
++ */
++static void wm9705_phy_init(struct wm97xx *wm)
++{
++ u16 dig1 = 0, dig2 = WM97XX_RPR;
++
++ /*
++ * mute VIDEO and AUX as they share X and Y touchscreen
++ * inputs on the WM9705
++ */
++ wm97xx_reg_write(wm, AC97_AUX, 0x8000);
++ wm97xx_reg_write(wm, AC97_VIDEO, 0x8000);
++
++ /* touchpanel pressure current*/
++ if (pil == 2) {
++ dig2 |= WM9705_PIL;
++ dev_dbg(wm->dev,
++ "setting pressure measurement current to 400uA.");
++ } else if (pil)
++ dev_dbg(wm->dev,
++ "setting pressure measurement current to 200uA.");
++ if (!pil)
++ pressure = 0;
++
++ /* polling mode sample settling delay */
++ if (delay != 4) {
++ if (delay < 0 || delay > 15) {
++ dev_dbg(wm->dev, "supplied delay out of range.");
++ delay = 4;
++ }
++ }
++ dig1 &= 0xff0f;
++ dig1 |= WM97XX_DELAY(delay);
++ dev_dbg(wm->dev, "setting adc sample delay to %d u Secs.",
++ delay_table[delay]);
++
++ /* WM9705 pdd */
++ dig2 |= (pdd & 0x000f);
++ dev_dbg(wm->dev, "setting pdd to Vmid/%d", 1 - (pdd & 0x000f));
++
++ /* mask */
++ dig2 |= ((mask & 0x3) << 4);
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++}
++
++static void wm9705_dig_enable(struct wm97xx *wm, int enable)
++{
++ if (enable) {
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2,
++ wm->dig[2] | WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ } else
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2,
++ wm->dig[2] & ~WM97XX_PRP_DET_DIG);
++}
++
++static void wm9705_aux_prepare(struct wm97xx *wm)
++{
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, 0);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, WM97XX_PRP_DET_DIG);
++}
++
++static void wm9705_dig_restore(struct wm97xx *wm)
++{
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, wm->dig_save[2]);
++}
++
++static inline int is_pden(struct wm97xx *wm)
++{
++ return wm->dig[2] & WM9705_PDEN;
++}
++
++/*
++ * Read a sample from the WM9705 adc in polling mode.
++ */
++static int wm9705_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = ((adcsel & 0x7fff) + 3) << 12;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1,
++ adcsel | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL)
++ && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSEL_MASK) != adcsel) {
++ dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSEL_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Sample the WM9705 touchscreen in polling mode
++ */
++static int wm9705_poll_touch(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_X, &data->x);
++ if (rc != RC_VALID)
++ return rc;
++ rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_Y, &data->y);
++ if (rc != RC_VALID)
++ return rc;
++ if (pil) {
++ rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_PRES, &data->p);
++ if (rc != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9705 continuous mode, i.e. touch data is streamed across
++ * an AC97 slot
++ */
++static int wm9705_acc_enable(struct wm97xx *wm, int enable)
++{
++ u16 dig1, dig2;
++ int ret = 0;
++
++ dig1 = wm->dig[1];
++ dig2 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup &&
++ (ret = wm->mach_ops->acc_startup(wm)) < 0)
++ return ret;
++ dig1 &= ~(WM97XX_CM_RATE_MASK | WM97XX_ADCSEL_MASK |
++ WM97XX_DELAY_MASK | WM97XX_SLT_MASK);
++ dig1 |= WM97XX_CTC | WM97XX_COO | WM97XX_SLEN |
++ WM97XX_DELAY(delay) |
++ WM97XX_SLT(wm->acc_slot) |
++ WM97XX_RATE(wm->acc_rate);
++ if (pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++ dig2 |= WM9705_PDEN;
++ } else {
++ dig1 &= ~(WM97XX_CTC | WM97XX_COO | WM97XX_SLEN);
++ dig2 &= ~WM9705_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++ return ret;
++}
++
++struct wm97xx_codec_drv wm9705_codec = {
++ .id = WM9705_ID2,
++ .name = "wm9705",
++ .poll_sample = wm9705_poll_sample,
++ .poll_touch = wm9705_poll_touch,
++ .acc_enable = wm9705_acc_enable,
++ .phy_init = wm9705_phy_init,
++ .dig_enable = wm9705_dig_enable,
++ .dig_restore = wm9705_dig_restore,
++ .aux_prepare = wm9705_aux_prepare,
++};
++EXPORT_SYMBOL_GPL(wm9705_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("WM9705 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch b/packages/linux/linux-rp-2.6.24/tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch
new file mode 100644
index 0000000000..6265910a1e
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch
@@ -0,0 +1,492 @@
+From b2640063b8321bdfb324c00d5f0c3366ac31696b Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:19 +0300
+Subject: [PATCH 32/64] Add chip driver for WM9712 touchscreen
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vince Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/wm9712.c | 461 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 461 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/wm9712.c
+
+diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c
+new file mode 100644
+index 0000000..eaab326
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9712.c
+@@ -0,0 +1,461 @@
++/*
++ * wm9712.c -- Codec driver for Wolfson WM9712 AC97 Codecs.
++ *
++ * Copyright 2003, 2004, 2005, 2006, 2007 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * 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.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9712_VERSION "0.61"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set internal pull up for pen detect.
++ *
++ * Pull up is in the range 1.02k (least sensitive) to 64k (most sensitive)
++ * i.e. pull up resistance = 64k Ohms / rpu.
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down event.
++ */
++static int rpu = 8;
++module_param(rpu, int, 0);
++MODULE_PARM_DESC(rpu, "Set internal pull up resitor for pen detect.");
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 3;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Set five_wire = 1 to use a 5 wire touchscreen.
++ *
++ * NOTE: Five wire mode does not allow for readback of pressure.
++ */
++static int five_wire;
++module_param(five_wire, int, 0);
++MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen.");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * Coordinate Polling Enable.
++ *
++ * Set to 1 to enable coordinate polling. e.g. x,y[,p] is sampled together
++ * for every poll.
++ */
++static int coord;
++module_param(coord, int, 0);
++MODULE_PARM_DESC(coord, "Polling coordinate mode");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, /* 1 AC97 Link frames */
++ 42, /* 2 */
++ 84, /* 4 */
++ 167, /* 8 */
++ 333, /* 16 */
++ 667, /* 32 */
++ 1000, /* 48 */
++ 1333, /* 64 */
++ 2000, /* 96 */
++ 2667, /* 128 */
++ 3333, /* 160 */
++ 4000, /* 192 */
++ 4667, /* 224 */
++ 5333, /* 256 */
++ 6000, /* 288 */
++ 0 /* No delay, switch matrix always on */
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay(3 * AC97_LINK_FRAME + delay_table[d]);
++}
++
++/*
++ * set up the physical settings of the WM9712
++ */
++static void wm9712_phy_init(struct wm97xx *wm)
++{
++ u16 dig1 = 0;
++ u16 dig2 = WM97XX_RPR | WM9712_RPU(1);
++
++ /* WM9712 rpu */
++ if (rpu) {
++ dig2 &= 0xffc0;
++ dig2 |= WM9712_RPU(rpu);
++ dev_dbg(wm->dev, "setting pen detect pull-up to %d Ohms",
++ 64000 / rpu);
++ }
++
++ /* touchpanel pressure current*/
++ if (pil == 2) {
++ dig2 |= WM9712_PIL;
++ dev_dbg(wm->dev,
++ "setting pressure measurement current to 400uA.");
++ } else if (pil)
++ dev_dbg(wm->dev,
++ "setting pressure measurement current to 200uA.");
++ if (!pil)
++ pressure = 0;
++
++ /* WM9712 five wire */
++ if (five_wire) {
++ dig2 |= WM9712_45W;
++ dev_dbg(wm->dev, "setting 5-wire touchscreen mode.");
++ }
++
++ /* polling mode sample settling delay */
++ if (delay < 0 || delay > 15) {
++ dev_dbg(wm->dev, "supplied delay out of range.");
++ delay = 4;
++ }
++ dig1 &= 0xff0f;
++ dig1 |= WM97XX_DELAY(delay);
++ dev_dbg(wm->dev, "setting adc sample delay to %d u Secs.",
++ delay_table[delay]);
++
++ /* mask */
++ dig2 |= ((mask & 0x3) << 6);
++ if (mask) {
++ u16 reg;
++ /* Set GPIO4 as Mask Pin*/
++ reg = wm97xx_reg_read(wm, AC97_MISC_AFE);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, reg | WM97XX_GPIO_4);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, reg | WM97XX_GPIO_4);
++ }
++
++ /* wait - coord mode */
++ if (coord)
++ dig2 |= WM9712_WAIT;
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++}
++
++static void wm9712_dig_enable(struct wm97xx *wm, int enable)
++{
++ u16 dig2 = wm->dig[2];
++
++ if (enable) {
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2,
++ dig2 | WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ } else
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2,
++ dig2 & ~WM97XX_PRP_DET_DIG);
++}
++
++static void wm9712_aux_prepare(struct wm97xx *wm)
++{
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, 0);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, WM97XX_PRP_DET_DIG);
++}
++
++static void wm9712_dig_restore(struct wm97xx *wm)
++{
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, wm->dig_save[2]);
++}
++
++static inline int is_pden(struct wm97xx *wm)
++{
++ return wm->dig[2] & WM9712_PDEN;
++}
++
++/*
++ * Read a sample from the WM9712 adc in polling mode.
++ */
++static int wm9712_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = ((adcsel & 0x7fff) + 3) << 12;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1,
++ adcsel | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL)
++ && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSEL_MASK) != adcsel) {
++ dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSEL_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Read a coord from the WM9712 adc in polling mode.
++ */
++static int wm9712_poll_coord(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data_rd = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data_rd & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1,
++ WM97XX_COO | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion and read x */
++ poll_delay(delay);
++ data->x = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL)
++ && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ /* read back y data */
++ data->y = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (pil)
++ data->p = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ else
++ data->p = DEFAULT_PRESSURE;
++
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ /* check we have correct sample */
++ if (!(data->x & WM97XX_ADCSEL_X) || !(data->y & WM97XX_ADCSEL_Y))
++ goto err;
++ if (pil && !(data->p & WM97XX_ADCSEL_PRES))
++ goto err;
++
++ if (!(data->x & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++ return RC_VALID;
++err:
++ return RC_PENUP;
++}
++
++/*
++ * Sample the WM9712 touchscreen in polling mode
++ */
++static int wm9712_poll_touch(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ if (coord) {
++ rc = wm9712_poll_coord(wm, data);
++ if (rc != RC_VALID)
++ return rc;
++ } else {
++ rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_X, &data->x);
++ if (rc != RC_VALID)
++ return rc;
++
++ rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_Y, &data->y);
++ if (rc != RC_VALID)
++ return rc;
++
++ if (pil && !five_wire) {
++ rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_PRES,
++ &data->p);
++ if (rc != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++ }
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9712 continuous mode, i.e. touch data is streamed across
++ * an AC97 slot
++ */
++static int wm9712_acc_enable(struct wm97xx *wm, int enable)
++{
++ u16 dig1, dig2;
++ int ret = 0;
++
++ dig1 = wm->dig[1];
++ dig2 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup) {
++ ret = wm->mach_ops->acc_startup(wm);
++ if (ret < 0)
++ return ret;
++ }
++ dig1 &= ~(WM97XX_CM_RATE_MASK | WM97XX_ADCSEL_MASK |
++ WM97XX_DELAY_MASK | WM97XX_SLT_MASK);
++ dig1 |= WM97XX_CTC | WM97XX_COO | WM97XX_SLEN |
++ WM97XX_DELAY(delay) |
++ WM97XX_SLT(wm->acc_slot) |
++ WM97XX_RATE(wm->acc_rate);
++ if (pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++ dig2 |= WM9712_PDEN;
++ } else {
++ dig1 &= ~(WM97XX_CTC | WM97XX_COO | WM97XX_SLEN);
++ dig2 &= ~WM9712_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++ return 0;
++}
++
++struct wm97xx_codec_drv wm9712_codec = {
++ .id = WM9712_ID2,
++ .name = "wm9712",
++ .poll_sample = wm9712_poll_sample,
++ .poll_touch = wm9712_poll_touch,
++ .acc_enable = wm9712_acc_enable,
++ .phy_init = wm9712_phy_init,
++ .dig_enable = wm9712_dig_enable,
++ .dig_restore = wm9712_dig_restore,
++ .aux_prepare = wm9712_aux_prepare,
++};
++EXPORT_SYMBOL_GPL(wm9712_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("WM9712 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch b/packages/linux/linux-rp-2.6.24/tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch
new file mode 100644
index 0000000000..a9dfa18557
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch
@@ -0,0 +1,490 @@
+From 05b2a361eedb5461e902c73ebc6e30f9916b3a8a Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:19 +0300
+Subject: [PATCH 33/64] Add chip driver for WM9713 touchscreen
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vince Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/wm9713.c | 459 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 459 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/wm9713.c
+
+diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c
+new file mode 100644
+index 0000000..5067e59
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9713.c
+@@ -0,0 +1,459 @@
++/*
++ * wm9713.c -- Codec touch driver for Wolfson WM9713 AC97 Codec.
++ *
++ * Copyright 2003, 2004, 2005, 2006, 2007, 2008 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * 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.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9713_VERSION "0.53"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set internal pull up for pen detect.
++ *
++ * Pull up is in the range 1.02k (least sensitive) to 64k (most sensitive)
++ * i.e. pull up resistance = 64k Ohms / rpu.
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down event.
++ */
++static int rpu = 8;
++module_param(rpu, int, 0);
++MODULE_PARM_DESC(rpu, "Set internal pull up resitor for pen detect.");
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 4;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * Coordinate Polling Enable.
++ *
++ * Set to 1 to enable coordinate polling. e.g. x,y[,p] is sampled together
++ * for every poll.
++ */
++static int coord;
++module_param(coord, int, 0);
++MODULE_PARM_DESC(coord, "Polling coordinate mode");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, /* 1 AC97 Link frames */
++ 42, /* 2 */
++ 84, /* 4 */
++ 167, /* 8 */
++ 333, /* 16 */
++ 667, /* 32 */
++ 1000, /* 48 */
++ 1333, /* 64 */
++ 2000, /* 96 */
++ 2667, /* 128 */
++ 3333, /* 160 */
++ 4000, /* 192 */
++ 4667, /* 224 */
++ 5333, /* 256 */
++ 6000, /* 288 */
++ 0 /* No delay, switch matrix always on */
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay(3 * AC97_LINK_FRAME + delay_table[d]);
++}
++
++/*
++ * set up the physical settings of the WM9713
++ */
++static void wm9713_phy_init(struct wm97xx *wm)
++{
++ u16 dig1 = 0, dig2, dig3;
++
++ /* default values */
++ dig2 = WM97XX_DELAY(4) | WM97XX_SLT(5);
++ dig3 = WM9712_RPU(1);
++
++ /* rpu */
++ if (rpu) {
++ dig3 &= 0xffc0;
++ dig3 |= WM9712_RPU(rpu);
++ dev_info(wm->dev, "setting pen detect pull-up to %d Ohms\n",
++ 64000 / rpu);
++ }
++
++ /* touchpanel pressure */
++ if (pil == 2) {
++ dig3 |= WM9712_PIL;
++ dev_info(wm->dev,
++ "setting pressure measurement current to 400uA.");
++ } else if (pil)
++ dev_info(wm->dev,
++ "setting pressure measurement current to 200uA.");
++ if (!pil)
++ pressure = 0;
++
++ /* sample settling delay */
++ if (delay < 0 || delay > 15) {
++ dev_info(wm->dev, "supplied delay out of range.");
++ delay = 4;
++ dev_info(wm->dev, "setting adc sample delay to %d u Secs.",
++ delay_table[delay]);
++ }
++ dig2 &= 0xff0f;
++ dig2 |= WM97XX_DELAY(delay);
++
++ /* mask */
++ dig3 |= ((mask & 0x3) << 4);
++ if (coord)
++ dig3 |= WM9713_WAIT;
++
++ wm->misc = wm97xx_reg_read(wm, 0x5a);
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, dig2);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, dig3);
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, 0x0);
++}
++
++static void wm9713_dig_enable(struct wm97xx *wm, int enable)
++{
++ u16 val;
++
++ if (enable) {
++ val = wm97xx_reg_read(wm, AC97_EXTENDED_MID);
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, val & 0x7fff);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2] |
++ WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ } else {
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2] &
++ ~WM97XX_PRP_DET_DIG);
++ val = wm97xx_reg_read(wm, AC97_EXTENDED_MID);
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, val | 0x8000);
++ }
++}
++
++static void wm9713_dig_restore(struct wm97xx *wm)
++{
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, wm->dig_save[0]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig_save[2]);
++}
++
++static void wm9713_aux_prepare(struct wm97xx *wm)
++{
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, 0);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, 0);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, WM97XX_PRP_DET_DIG);
++}
++
++static inline int is_pden(struct wm97xx *wm)
++{
++ return wm->dig[2] & WM9713_PDEN;
++}
++
++/*
++ * Read a sample from the WM9713 adc in polling mode.
++ */
++static int wm9713_poll_sample(struct wm97xx *wm, int adcsel, int *sample)
++{
++ u16 dig1;
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = 1 << ((adcsel & 0x7fff) + 3);
++
++ dig1 = wm97xx_reg_read(wm, AC97_WM9713_DIG1);
++ dig1 &= ~WM9713_ADCSEL_MASK;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1 | adcsel | WM9713_POLL);
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM9713_DIG1) & WM9713_POLL) &&
++ timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSRC_MASK) != ffs(adcsel >> 1) << 12) {
++ dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSRC_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Read a coordinate from the WM9713 adc in polling mode.
++ */
++static int wm9713_poll_coord(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ u16 dig1;
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ dig1 = wm97xx_reg_read(wm, AC97_WM9713_DIG1);
++ dig1 &= ~WM9713_ADCSEL_MASK;
++ if (pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1,
++ dig1 | WM9713_POLL | WM9713_COO);
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++ data->x = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM9713_DIG1) & WM9713_POLL)
++ && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dev_dbg(wm->dev, "adc sample timeout");
++ return RC_PENUP;
++ }
++
++ /* read back data */
++ data->y = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (pil)
++ data->p = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ else
++ data->p = DEFAULT_PRESSURE;
++
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ /* check we have correct sample */
++ if (!(data->x & WM97XX_ADCSEL_X) || !(data->y & WM97XX_ADCSEL_Y))
++ goto err;
++ if (pil && !(data->p & WM97XX_ADCSEL_PRES))
++ goto err;
++
++ if (!(data->x & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++ return RC_VALID;
++err:
++ return RC_PENUP;
++}
++
++/*
++ * Sample the WM9713 touchscreen in polling mode
++ */
++static int wm9713_poll_touch(struct wm97xx *wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ if (coord) {
++ rc = wm9713_poll_coord(wm, data);
++ if (rc != RC_VALID)
++ return rc;
++ } else {
++ rc = wm9713_poll_sample(wm, WM9713_ADCSEL_X, &data->x);
++ if (rc != RC_VALID)
++ return rc;
++ rc = wm9713_poll_sample(wm, WM9713_ADCSEL_Y, &data->y);
++ if (rc != RC_VALID)
++ return rc;
++ if (pil) {
++ rc = wm9713_poll_sample(wm, WM9713_ADCSEL_PRES,
++ &data->p);
++ if (rc != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++ }
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9713 continuous mode, i.e. touch data is streamed across
++ * an AC97 slot
++ */
++static int wm9713_acc_enable(struct wm97xx *wm, int enable)
++{
++ u16 dig1, dig2, dig3;
++ int ret = 0;
++
++ dig1 = wm->dig[0];
++ dig2 = wm->dig[1];
++ dig3 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup &&
++ (ret = wm->mach_ops->acc_startup(wm)) < 0)
++ return ret;
++
++ dig1 &= ~WM9713_ADCSEL_MASK;
++ dig1 |= WM9713_CTC | WM9713_COO | WM9713_ADCSEL_X |
++ WM9713_ADCSEL_Y;
++ if (pil)
++ dig1 |= WM9713_ADCSEL_PRES;
++ dig2 &= ~(WM97XX_DELAY_MASK | WM97XX_SLT_MASK |
++ WM97XX_CM_RATE_MASK);
++ dig2 |= WM97XX_SLEN | WM97XX_DELAY(delay) |
++ WM97XX_SLT(wm->acc_slot) | WM97XX_RATE(wm->acc_rate);
++ dig3 |= WM9713_PDEN;
++ } else {
++ dig1 &= ~(WM9713_CTC | WM9713_COO);
++ dig2 &= ~WM97XX_SLEN;
++ dig3 &= ~WM9713_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, dig2);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, dig3);
++ return ret;
++}
++
++struct wm97xx_codec_drv wm9713_codec = {
++ .id = WM9713_ID2,
++ .name = "wm9713",
++ .poll_sample = wm9713_poll_sample,
++ .poll_touch = wm9713_poll_touch,
++ .acc_enable = wm9713_acc_enable,
++ .phy_init = wm9713_phy_init,
++ .dig_enable = wm9713_dig_enable,
++ .dig_restore = wm9713_dig_restore,
++ .aux_prepare = wm9713_aux_prepare,
++};
++EXPORT_SYMBOL_GPL(wm9713_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("WM9713 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch b/packages/linux/linux-rp-2.6.24/tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch
new file mode 100644
index 0000000000..0391cfcd83
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch
@@ -0,0 +1,329 @@
+From 821604bad5ce1ef942eeb420afd9ea2c5c92875e Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:19 +0300
+Subject: [PATCH 34/64] Driver for WM97xx touchscreens in streaming mode on Mainstone
+
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com>
+Signed-off-by: Mike Arthur <mike.arthur@wolfsonmicro.com>
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Cc: Stanley Cai <stanley.cai@intel.com>
+Cc: Rodolfo Giometti <giometti@enneenne.com>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Marc Kleine-Budde <mkl@pengutronix.de>
+Cc: Ian Molton <spyro@f2s.com>
+Cc: Vince Sanders <vince@kyllikki.org>
+Cc: Andrew Zabolotny <zap@homelink.ru>
+---
+ drivers/input/touchscreen/mainstone-wm97xx.c | 298 ++++++++++++++++++++++++++
+ 1 files changed, 298 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/mainstone-wm97xx.c
+
+diff --git a/drivers/input/touchscreen/mainstone-wm97xx.c b/drivers/input/touchscreen/mainstone-wm97xx.c
+new file mode 100644
+index 0000000..8e1c35d
+--- /dev/null
++++ b/drivers/input/touchscreen/mainstone-wm97xx.c
+@@ -0,0 +1,298 @@
++/*
++ * mainstone-wm97xx.c -- Mainstone Continuous Touch screen driver for
++ * Wolfson WM97xx AC97 Codecs.
++ *
++ * Copyright 2004, 2007 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ *
++ * 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.
++ *
++ * Notes:
++ * This is a wm97xx extended touch driver to capture touch
++ * data in a continuous manner on the Intel XScale archictecture
++ *
++ * Features:
++ * - codecs supported:- WM9705, WM9712, WM9713
++ * - processors supported:- Intel XScale PXA25x, PXA26x, PXA27x
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/irq.h>
++#include <linux/interrupt.h>
++#include <linux/wm97xx.h>
++#include <linux/io.h>
++#include <asm/arch/pxa-regs.h>
++
++#define VERSION "0.13"
++
++struct continuous {
++ u16 id; /* codec id */
++ u8 code; /* continuous code */
++ u8 reads; /* number of coord reads per read cycle */
++ u32 speed; /* number of coords per second */
++};
++
++#define WM_READS(sp) ((sp / HZ) + 1)
++
++static const struct continuous cinfo[] = {
++ {WM9705_ID2, 0, WM_READS(94), 94},
++ {WM9705_ID2, 1, WM_READS(188), 188},
++ {WM9705_ID2, 2, WM_READS(375), 375},
++ {WM9705_ID2, 3, WM_READS(750), 750},
++ {WM9712_ID2, 0, WM_READS(94), 94},
++ {WM9712_ID2, 1, WM_READS(188), 188},
++ {WM9712_ID2, 2, WM_READS(375), 375},
++ {WM9712_ID2, 3, WM_READS(750), 750},
++ {WM9713_ID2, 0, WM_READS(94), 94},
++ {WM9713_ID2, 1, WM_READS(120), 120},
++ {WM9713_ID2, 2, WM_READS(154), 154},
++ {WM9713_ID2, 3, WM_READS(188), 188},
++};
++
++/* continuous speed index */
++static int sp_idx;
++static u16 last, tries;
++
++/*
++ * Pen sampling frequency (Hz) in continuous mode.
++ */
++static int cont_rate = 200;
++module_param(cont_rate, int, 0);
++MODULE_PARM_DESC(cont_rate, "Sampling rate in continuous mode (Hz)");
++
++/*
++ * Pen down detection.
++ *
++ * This driver can either poll or use an interrupt to indicate a pen down
++ * event. If the irq request fails then it will fall back to polling mode.
++ */
++static int pen_int;
++module_param(pen_int, int, 0);
++MODULE_PARM_DESC(pen_int, "Pen down detection (1 = interrupt, 0 = polling)");
++
++/*
++ * Pressure readback.
++ *
++ * Set to 1 to read back pen down pressure
++ */
++static int pressure;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Pressure readback (1 = pressure, 0 = no pressure)");
++
++/*
++ * AC97 touch data slot.
++ *
++ * Touch screen readback data ac97 slot
++ */
++static int ac97_touch_slot = 5;
++module_param(ac97_touch_slot, int, 0);
++MODULE_PARM_DESC(ac97_touch_slot, "Touch screen data slot AC97 number");
++
++
++/* flush AC97 slot 5 FIFO on pxa machines */
++#ifdef CONFIG_PXA27x
++static void wm97xx_acc_pen_up(struct wm97xx *wm)
++{
++ set_current_state(TASK_INTERRUPTIBLE);
++ schedule_timeout(1);
++
++ while (MISR & (1 << 2))
++ MODR;
++}
++#else
++static void wm97xx_acc_pen_up(struct wm97xx *wm)
++{
++ int count = 16;
++ set_current_state(TASK_INTERRUPTIBLE);
++ schedule_timeout(1);
++
++ while (count < 16) {
++ MODR;
++ count--;
++ }
++}
++#endif
++
++static int wm97xx_acc_pen_down(struct wm97xx *wm)
++{
++ u16 x, y, p = 0x100 | WM97XX_ADCSEL_PRES;
++ int reads = 0;
++
++ /* data is never immediately available after pen down irq */
++ set_current_state(TASK_INTERRUPTIBLE);
++ schedule_timeout(1);
++
++ if (tries > 5) {
++ tries = 0;
++ return RC_PENUP;
++ }
++
++ x = MODR;
++ if (x == last) {
++ tries++;
++ return RC_AGAIN;
++ }
++ last = x;
++ do {
++ if (reads)
++ x = MODR;
++ y = MODR;
++ if (pressure)
++ p = MODR;
++
++ /* are samples valid */
++ if ((x & 0x7000) != WM97XX_ADCSEL_X ||
++ (y & 0x7000) != WM97XX_ADCSEL_Y ||
++ (p & 0x7000) != WM97XX_ADCSEL_PRES)
++ goto up;
++
++ /* coordinate is good */
++ tries = 0;
++ input_report_abs(wm->input_dev, ABS_X, x & 0xfff);
++ input_report_abs(wm->input_dev, ABS_Y, y & 0xfff);
++ input_report_abs(wm->input_dev, ABS_PRESSURE, p & 0xfff);
++ input_sync(wm->input_dev);
++ reads++;
++ } while (reads < cinfo[sp_idx].reads);
++up:
++ return RC_PENDOWN | RC_AGAIN;
++}
++
++static int wm97xx_acc_startup(struct wm97xx *wm)
++{
++ int idx = 0;
++
++ /* check we have a codec */
++ if (wm->ac97 == NULL)
++ return -ENODEV;
++
++ /* Go you big red fire engine */
++ for (idx = 0; idx < ARRAY_SIZE(cinfo); idx++) {
++ if (wm->id != cinfo[idx].id)
++ continue;
++ sp_idx = idx;
++ if (cont_rate <= cinfo[idx].speed)
++ break;
++ }
++ wm->acc_rate = cinfo[sp_idx].code;
++ wm->acc_slot = ac97_touch_slot;
++ dev_info(wm->dev,
++ "mainstone accelerated touchscreen driver, %d samples/sec\n",
++ cinfo[sp_idx].speed);
++
++ /* codec specific irq config */
++ if (pen_int) {
++ switch (wm->id) {
++ case WM9705_ID2:
++ wm->pen_irq = IRQ_GPIO(4);
++ set_irq_type(IRQ_GPIO(4), IRQT_BOTHEDGE);
++ break;
++ case WM9712_ID2:
++ case WM9713_ID2:
++ /* enable pen down interrupt */
++ /* use PEN_DOWN GPIO 13 to assert IRQ on GPIO line 2 */
++ wm->pen_irq = MAINSTONE_AC97_IRQ;
++ wm97xx_config_gpio(wm, WM97XX_GPIO_13, WM97XX_GPIO_IN,
++ WM97XX_GPIO_POL_HIGH,
++ WM97XX_GPIO_STICKY,
++ WM97XX_GPIO_WAKE);
++ wm97xx_config_gpio(wm, WM97XX_GPIO_2, WM97XX_GPIO_OUT,
++ WM97XX_GPIO_POL_HIGH,
++ WM97XX_GPIO_NOTSTICKY,
++ WM97XX_GPIO_NOWAKE);
++ break;
++ default:
++ dev_err(wm->dev,
++ "pen down irq not supported on this device\n");
++ pen_int = 0;
++ break;
++ }
++ }
++
++ return 0;
++}
++
++static void wm97xx_acc_shutdown(struct wm97xx *wm)
++{
++ /* codec specific deconfig */
++ if (pen_int) {
++ switch (wm->id & 0xffff) {
++ case WM9705_ID2:
++ wm->pen_irq = 0;
++ break;
++ case WM9712_ID2:
++ case WM9713_ID2:
++ /* disable interrupt */
++ wm->pen_irq = 0;
++ break;
++ }
++ }
++}
++
++static void wm97xx_irq_enable(struct wm97xx *wm, int enable)
++{
++ if (enable)
++ enable_irq(wm->pen_irq);
++ else
++ disable_irq(wm->pen_irq);
++}
++
++static struct wm97xx_mach_ops mainstone_mach_ops = {
++ .acc_enabled = 1,
++ .acc_pen_up = wm97xx_acc_pen_up,
++ .acc_pen_down = wm97xx_acc_pen_down,
++ .acc_startup = wm97xx_acc_startup,
++ .acc_shutdown = wm97xx_acc_shutdown,
++ .irq_enable = wm97xx_irq_enable,
++};
++
++static int mainstone_wm97xx_probe(struct platform_device *pdev)
++{
++ struct wm97xx *wm = platform_get_drvdata(pdev);
++ return wm97xx_register_mach_ops(wm, &mainstone_mach_ops);
++}
++
++static int mainstone_wm97xx_remove(struct platform_device *pdev)
++{
++ struct wm97xx *wm = platform_get_drvdata(pdev);
++ wm97xx_unregister_mach_ops(wm);
++ return 0;
++}
++
++static struct platform_driver mainstone_wm97xx_driver = {
++ .probe = mainstone_wm97xx_probe,
++ .remove = mainstone_wm97xx_remove,
++ .driver = {
++ .name = "wm97xx-touch",
++ },
++};
++
++static int __init mainstone_wm97xx_init(void)
++{
++ return platform_driver_register(&mainstone_wm97xx_driver);
++}
++
++static void __exit mainstone_wm97xx_exit(void)
++{
++ platform_driver_unregister(&mainstone_wm97xx_driver);
++}
++
++module_init(mainstone_wm97xx_init);
++module_exit(mainstone_wm97xx_exit);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood <liam.girdwood@wolfsonmicro.com>");
++MODULE_DESCRIPTION("wm97xx continuous touch driver for mainstone");
++MODULE_LICENSE("GPL");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch b/packages/linux/linux-rp-2.6.24/tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch
new file mode 100644
index 0000000000..aa0918f43e
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch
@@ -0,0 +1,122 @@
+From eba6a504393932764a33aae64021827dd2c5c70c Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sat, 26 Jan 2008 21:14:18 +0300
+Subject: [PATCH 35/64] Build system and MAINTAINERS entry for WM97xx touchscreen drivers
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Signed-off-by: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+---
+ MAINTAINERS | 10 +++++++
+ drivers/input/touchscreen/Kconfig | 52 ++++++++++++++++++++++++++++++++++++
+ drivers/input/touchscreen/Makefile | 7 +++++
+ 3 files changed, 69 insertions(+), 0 deletions(-)
+
+diff --git a/MAINTAINERS b/MAINTAINERS
+index 2340cfb..f02851c 100644
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -4204,6 +4204,16 @@ L: linux-wireless@vger.kernel.org
+ W: http://oops.ghostprotocols.net:81/blog
+ S: Maintained
+
++WM97XX TOUCHSCREEN DRIVERS
++P: Mark Brown
++M: broonie@opensource.wolfsonmicro.com
++P: Liam Girdwood
++M: liam.girdwood@wolfsonmicro.com
++L: linux-input@vger.kernel.org
++T: git git://opensource.wolfsonmicro.com/linux-2.6-touch
++W: http://opensource.wolfsonmicro.com/node/7
++S: Supported
++
+ X.25 NETWORK LAYER
+ P: Henner Eisen
+ M: eis@baty.hanse.de
+diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
+index 90e8e92..0be05a2 100644
+--- a/drivers/input/touchscreen/Kconfig
++++ b/drivers/input/touchscreen/Kconfig
+@@ -158,6 +158,58 @@ config TOUCHSCREEN_TOUCHRIGHT
+ To compile this driver as a module, choose M here: the
+ module will be called touchright.
+
++config TOUCHSCREEN_WM97XX
++ tristate "Support for WM97xx AC97 touchscreen controllers"
++ depends on AC97_BUS
++
++config TOUCHSCREEN_WM9705
++ bool "WM9705 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have a Wolfson Microelectronics WM9705 touchscreen
++ controller connected to your system.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9705.
++
++config TOUCHSCREEN_WM9712
++ bool "WM9712 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have a Wolfson Microelectronics WM9712 touchscreen
++ controller connected to your system.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9712.
++
++config TOUCHSCREEN_WM9713
++ bool "WM9713 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have a Wolfson Microelectronics WM9713 touchscreen
++ controller connected to your system.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9713.
++
++config TOUCHSCREEN_WM97XX_MAINSTONE
++ tristate "WM97xx Mainstone accelerated touch"
++ depends on TOUCHSCREEN_WM97XX && ARCH_PXA
++ help
++ Say Y here for support for streaming mode with WM97xx touchscreens
++ on Mainstone systems.
++
++ If unsure, say N
++
++ To compile this driver as a module, choose M here: the
++ module will be called mainstone-wm97xx
++
+ config TOUCHSCREEN_TOUCHWIN
+ tristate "Touchwin serial touchscreen"
+ select SERIO
+diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
+index 35d4097..d38156e 100644
+--- a/drivers/input/touchscreen/Makefile
++++ b/drivers/input/touchscreen/Makefile
+@@ -4,6 +4,8 @@
+
+ # Each configuration option enables a list of files.
+
++wm97xx-ts-y := wm97xx-core.o
++
+ obj-$(CONFIG_TOUCHSCREEN_ADS7846) += ads7846.o
+ obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o
+ obj-$(CONFIG_TOUCHSCREEN_CORGI) += corgi_ts.o
+@@ -19,3 +21,8 @@ obj-$(CONFIG_TOUCHSCREEN_PENMOUNT) += penmount.o
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_TSC2101) += tsc2101_ts.o
++obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o
++obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE) += mainstone-wm97xx.o
++wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o
++wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o
++wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch b/packages/linux/linux-rp-2.6.24/tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch
new file mode 100644
index 0000000000..dd10b34586
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch
@@ -0,0 +1,35 @@
+From 9ea478cbd5473f52ca036cccc00dddad717d7861 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 30 Jan 2008 19:27:13 +0300
+Subject: [PATCH 36/64] Set id to -1 for wm97xx subdevices
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/input/touchscreen/wm97xx-core.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
+index 27a0a99..e066acc 100644
+--- a/drivers/input/touchscreen/wm97xx-core.c
++++ b/drivers/input/touchscreen/wm97xx-core.c
+@@ -592,7 +592,7 @@ static int wm97xx_probe(struct device *dev)
+ wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
+
+ /* register our battery device */
+- wm->battery_dev = platform_device_alloc("wm97xx-battery", 0);
++ wm->battery_dev = platform_device_alloc("wm97xx-battery", -1);
+ if (!wm->battery_dev)
+ goto batt_err;
+ platform_set_drvdata(wm->battery_dev, wm);
+@@ -603,7 +603,7 @@ static int wm97xx_probe(struct device *dev)
+
+ /* register our extended touch device (for machine specific
+ * extensions) */
+- wm->touch_dev = platform_device_alloc("wm97xx-touch", 0);
++ wm->touch_dev = platform_device_alloc("wm97xx-touch", -1);
+ if (!wm->touch_dev)
+ goto touch_err;
+ platform_set_drvdata(wm->touch_dev, wm);
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch b/packages/linux/linux-rp-2.6.24/tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch
new file mode 100644
index 0000000000..010194dd96
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch
@@ -0,0 +1,41 @@
+From d2888c7643b07687b14a839239cbe7fc5bf565e6 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Mon, 14 Jan 2008 23:24:26 +0300
+Subject: [PATCH 37/64] Don't lock the codec list in snd_soc_dapm_new_widgets()
+
+snd_soc_dapm_new_widgets() takes the codec lock when adding new widgets,
+causing lockdep warnings when applications later call down through ALSA
+to adjust controls. Since widgets are only added during probe this lock
+should be unneeded so don't take it.
+
+Thanks to Dmitry Baryshkov <dbaryshkov@gmail.com> for reporting this issue.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ sound/soc/soc-dapm.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
+index 29a546f..e46cdc5 100644
+--- a/sound/soc/soc-dapm.c
++++ b/sound/soc/soc-dapm.c
+@@ -963,7 +963,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec)
+ {
+ struct snd_soc_dapm_widget *w;
+
+- mutex_lock(&codec->mutex);
+ list_for_each_entry(w, &codec->dapm_widgets, list)
+ {
+ if (w->new)
+@@ -998,7 +997,6 @@ int snd_soc_dapm_new_widgets(struct snd_soc_codec *codec)
+ }
+
+ dapm_power_widgets(codec, SND_SOC_DAPM_STREAM_NOP);
+- mutex_unlock(&codec->mutex);
+ return 0;
+ }
+ EXPORT_SYMBOL_GPL(snd_soc_dapm_new_widgets);
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch b/packages/linux/linux-rp-2.6.24/tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch
new file mode 100644
index 0000000000..7a3eb61a27
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch
@@ -0,0 +1,57 @@
+From 5bae1fab16c7b14a458aa90e5654fe3a1d8d960f Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Sun, 20 Jan 2008 00:06:06 +0300
+Subject: [PATCH 38/64] Don't lock the codec list in snd_soc_dapm_new_widgets()
+
+On Wed, Jan 16, 2008 at 02:40:55AM +0300, Dmitry wrote:
+
+> I'm sorry, but I tested this patch only now. And I just got another
+> message from lockdep:
+
+Could you give this patch a try, please?
+---
+ sound/soc/soc-core.c | 7 +++++--
+ 1 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
+index e6a67b5..7f3ed9f 100644
+--- a/sound/soc/soc-core.c
++++ b/sound/soc/soc-core.c
+@@ -1090,7 +1090,6 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
+ struct snd_soc_machine *machine = socdev->machine;
+ int ret = 0, i, ac97 = 0, err = 0;
+
+- mutex_lock(&codec->mutex);
+ for(i = 0; i < machine->num_links; i++) {
+ if (socdev->machine->dai_link[i].init) {
+ err = socdev->machine->dai_link[i].init(codec);
+@@ -1116,12 +1115,14 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
+ goto out;
+ }
+
++ mutex_lock(&codec->mutex);
+ #ifdef CONFIG_SND_SOC_AC97_BUS
+ if (ac97) {
+ ret = soc_ac97_dev_register(codec);
+ if (ret < 0) {
+ printk(KERN_ERR "asoc: AC97 device register failed\n");
+ snd_card_free(codec->card);
++ mutex_unlock(&codec->mutex);
+ goto out;
+ }
+ }
+@@ -1134,8 +1135,10 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
+ err = device_create_file(socdev->dev, &dev_attr_codec_reg);
+ if (err < 0)
+ printk(KERN_WARNING "asoc: failed to add codec sysfs entries\n");
+-out:
++
+ mutex_unlock(&codec->mutex);
++
++out:
+ return ret;
+ }
+ EXPORT_SYMBOL_GPL(snd_soc_register_card);
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0039-Add-generic-framework-for-managing-clocks.patch b/packages/linux/linux-rp-2.6.24/tosa/0039-Add-generic-framework-for-managing-clocks.patch
new file mode 100644
index 0000000000..c09c208c6a
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0039-Add-generic-framework-for-managing-clocks.patch
@@ -0,0 +1,446 @@
+From 62c9a23cfa7181369637d0b61a8e90c83c562f03 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 03:01:06 +0300
+Subject: [PATCH 39/64] Add generic framework for managing clocks.
+
+Provide a generic framework that platform may choose
+to support clocks api. In particular this provides
+platform-independant struct clk definition, a full
+implementation of clocks api and a set of functions
+for registering and unregistering clocks in a safe way.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ include/linux/clklib.h | 85 ++++++++++++++
+ init/Kconfig | 7 +
+ kernel/Makefile | 1 +
+ kernel/clklib.c | 295 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 388 insertions(+), 0 deletions(-)
+ create mode 100644 include/linux/clklib.h
+ create mode 100644 kernel/clklib.c
+
+diff --git a/include/linux/clklib.h b/include/linux/clklib.h
+new file mode 100644
+index 0000000..4bd9b4a
+--- /dev/null
++++ b/include/linux/clklib.h
+@@ -0,0 +1,85 @@
++/*
++ * Copyright (C) 2008 Dmitry Baryshkov
++ *
++ * This file is released under the GPL v2.
++ */
++
++#ifndef CLKLIB_H
++#define CLKLIB_H
++
++#include <linux/list.h>
++
++struct clk {
++ struct list_head node;
++ struct clk *parent;
++
++ const char *name;
++ struct module *owner;
++
++ int users;
++ unsigned long rate;
++ int delay;
++
++ int (*can_get) (struct clk *, struct device *);
++ int (*set_parent) (struct clk *, struct clk *);
++ int (*enable) (struct clk *);
++ void (*disable) (struct clk *);
++ unsigned long (*getrate) (struct clk*);
++ int (*setrate) (struct clk *, unsigned long);
++ long (*roundrate) (struct clk *, unsigned long);
++
++ void *priv;
++};
++
++int clk_register(struct clk *clk);
++void clk_unregister(struct clk *clk);
++static void __maybe_unused clks_register(struct clk *clks, size_t num)
++{
++ int i;
++ for (i = 0; i < num; i++) {
++ clk_register(&clks[i]);
++ }
++}
++
++
++int clk_alloc_function(const char *parent, struct clk *clk);
++
++struct clk_function {
++ const char *parent;
++ struct clk *clk;
++};
++
++#define CLK_FUNC(_clock, _function, _can_get, _data, _format) \
++ { \
++ .parent = _clock, \
++ .clk = &(struct clk) { \
++ .name= _function, \
++ .owner = THIS_MODULE, \
++ .can_get = _can_get, \
++ .priv = _data, \
++ .format = _format, \
++ }, \
++ }
++
++static int __maybe_unused clk_alloc_functions(
++ struct clk_function *funcs,
++ int num)
++{
++ int i;
++ int rc;
++
++ for (i = 0; i < num; i++) {
++ rc = clk_alloc_function(funcs[i].parent, funcs[i].clk);
++
++ if (rc) {
++ printk(KERN_ERR "Error allocating %s.%s function.\n",
++ funcs[i].parent,
++ funcs[i].clk->name);
++ return rc;
++ }
++ }
++
++ return 0;
++}
++
++#endif
+diff --git a/init/Kconfig b/init/Kconfig
+index b9d11a8..05b62ba 100644
+--- a/init/Kconfig
++++ b/init/Kconfig
+@@ -435,6 +435,13 @@ config CC_OPTIMIZE_FOR_SIZE
+ config SYSCTL
+ bool
+
++config HAVE_CLOCK_LIB
++ bool
++ help
++ Platforms select clocklib if they use this infrastructure
++ for managing their clocks both built into SoC and provided
++ by external devices.
++
+ menuconfig EMBEDDED
+ bool "Configure standard kernel features (for small systems)"
+ help
+diff --git a/kernel/Makefile b/kernel/Makefile
+index 6d9a87c..0b2ade7 100644
+--- a/kernel/Makefile
++++ b/kernel/Makefile
+@@ -58,6 +58,7 @@ obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
+ obj-$(CONFIG_TASKSTATS) += taskstats.o tsacct.o
+ obj-$(CONFIG_MARKERS) += marker.o
+ obj-$(CONFIG_LATENCYTOP) += latencytop.o
++obj-$(CONFIG_HAVE_CLOCK_LIB) += clklib.o
+
+ ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
+ # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
+diff --git a/kernel/clklib.c b/kernel/clklib.c
+new file mode 100644
+index 0000000..203af3d
+--- /dev/null
++++ b/kernel/clklib.c
+@@ -0,0 +1,295 @@
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/clk.h>
++#include <linux/clklib.h>
++#include <linux/spinlock.h>
++#include <linux/err.h>
++#include <linux/delay.h>
++
++static LIST_HEAD(clocks);
++static DEFINE_SPINLOCK(clocks_lock);
++
++static int __clk_register(struct clk *clk)
++{
++ if (clk->parent &&
++ !try_module_get(clk->parent->owner))
++ return -EINVAL;
++
++ list_add_tail(&clk->node, &clocks);
++
++ return 0;
++}
++
++int clk_register(struct clk *clk)
++{
++ unsigned long flags;
++ int rc;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rc = __clk_register(clk);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_register);
++
++void clk_unregister(struct clk *clk)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++ list_del(&clk->node);
++ if (clk->parent)
++ module_put(clk->parent->owner);
++ spin_unlock_irqrestore(&clocks_lock, flags);
++}
++EXPORT_SYMBOL(clk_unregister);
++
++struct clk *clk_get(struct device *dev, const char *id)
++{
++ struct clk *p, *clk = ERR_PTR(-ENOENT);
++ unsigned long flags;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ list_for_each_entry(p, &clocks, node) {
++ if (strcmp(id, p->name) == 0 &&
++ (!p->can_get || p->can_get(p, dev)) &&
++ try_module_get(p->owner)) {
++ clk = p;
++ break;
++ }
++ }
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return clk;
++}
++EXPORT_SYMBOL(clk_get);
++
++void clk_put(struct clk *clk)
++{
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ module_put(clk->owner);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++}
++EXPORT_SYMBOL(clk_put);
++
++int clk_set_parent(struct clk *clk, struct clk *parent)
++{
++ int rc;
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ if (!clk->set_parent)
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rc = clk->set_parent(clk, parent);
++ if (!rc)
++ clk->parent = parent;
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_set_parent);
++
++static int __clk_enable(struct clk *clk)
++{
++ int rc = 0;
++
++ if (clk->parent) {
++ rc = __clk_enable(clk->parent);
++
++ if (rc)
++ return rc;
++ }
++
++ if (clk->users++ == 0)
++ if (clk->enable)
++ rc = clk->enable(clk);
++
++ if (clk->delay)
++ udelay(clk->delay);
++
++ return rc;
++}
++
++int clk_enable(struct clk *clk)
++{
++ unsigned long flags;
++ int rc;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rc = __clk_enable(clk);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_enable);
++
++static void __clk_disable(struct clk *clk)
++{
++ if (clk->users <= 0) {
++ WARN_ON(1);
++ return;
++ }
++
++ if (--clk->users == 0)
++ if (clk->disable)
++ clk->disable(clk);
++
++ if (clk->parent)
++ __clk_disable(clk->parent);
++}
++
++void clk_disable(struct clk *clk)
++{
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ __clk_disable(clk);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++}
++EXPORT_SYMBOL(clk_disable);
++
++static unsigned long __clk_get_rate(struct clk *clk)
++{
++ unsigned long rate = 0;
++
++ for (;;) {
++ if (rate || !clk)
++ return rate;
++
++ if (clk->getrate)
++ rate = clk->getrate(clk);
++ else if (clk->rate)
++ rate = clk->rate;
++ else
++ clk = clk->parent;
++ }
++}
++
++unsigned long clk_get_rate(struct clk *clk)
++{
++ unsigned long rate = 0;
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rate = __clk_get_rate(clk);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rate;
++}
++EXPORT_SYMBOL(clk_get_rate);
++
++long clk_round_rate(struct clk *clk, unsigned long rate)
++{
++ long res;
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ if (!clk->roundrate)
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ res = clk->roundrate(clk, rate);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return res;
++}
++EXPORT_SYMBOL(clk_round_rate);
++
++int clk_set_rate(struct clk *clk, unsigned long rate)
++{
++ int rc;
++ unsigned long flags;
++
++ if (!clk || IS_ERR(clk))
++ return -EINVAL;
++
++ if (!clk->setrate)
++ return -EINVAL;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ rc = clk->setrate(clk, rate);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_set_rate);
++
++int clk_alloc_function(const char *parent, struct clk *clk)
++{
++ int rc = 0;
++ unsigned long flags;
++ struct clk *pclk;
++ bool found = false;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ list_for_each_entry(pclk, &clocks, node) {
++ if (strcmp(parent, pclk->name) == 0 &&
++ try_module_get(pclk->owner)) {
++ found = true;
++ break;
++ }
++ }
++
++ if (!found) {
++ rc = -ENODEV;
++ goto out;
++ }
++
++ clk->parent = pclk;
++
++ __clk_register(clk);
++ /*
++ * We locked parent owner during search
++ * and also in __clk_register. Free one reference
++ */
++ module_put(pclk->owner);
++
++out:
++ if (rc) {
++ kfree(clk);
++ }
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return rc;
++}
++EXPORT_SYMBOL(clk_alloc_function);
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0040-Clocklib-debugfs-support.patch b/packages/linux/linux-rp-2.6.24/tosa/0040-Clocklib-debugfs-support.patch
new file mode 100644
index 0000000000..160b274f4f
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0040-Clocklib-debugfs-support.patch
@@ -0,0 +1,108 @@
+From cae12d96586dac77d223559d686487ea2d457a41 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 03:01:05 +0300
+Subject: [PATCH 40/64] Clocklib debugfs support
+
+Provide /sys/kernel/debug/clock to ease debugging.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ include/linux/clklib.h | 5 +++
+ kernel/clklib.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 73 insertions(+), 0 deletions(-)
+
+diff --git a/include/linux/clklib.h b/include/linux/clklib.h
+index 4bd9b4a..f916693 100644
+--- a/include/linux/clklib.h
++++ b/include/linux/clklib.h
+@@ -28,6 +28,11 @@ struct clk {
+ int (*setrate) (struct clk *, unsigned long);
+ long (*roundrate) (struct clk *, unsigned long);
+
++ /*
++ * format any additional info
++ */
++ int (*format) (struct clk *, struct seq_file *);
++
+ void *priv;
+ };
+
+diff --git a/kernel/clklib.c b/kernel/clklib.c
+index 203af3d..b782220 100644
+--- a/kernel/clklib.c
++++ b/kernel/clklib.c
+@@ -293,3 +293,71 @@ out:
+ return rc;
+ }
+ EXPORT_SYMBOL(clk_alloc_function);
++
++#ifdef CONFIG_DEBUG_FS
++
++#include <linux/debugfs.h>
++#include <linux/seq_file.h>
++static void dump_clocks(struct seq_file *s, struct clk *parent, int nest)
++{
++ struct clk *clk;
++ int i;
++
++ list_for_each_entry(clk, &clocks, node) {
++ if (clk->parent == parent) {
++ for (i = 0; i < nest; i++)
++ seq_putc(s, ' ');
++ seq_puts(s, clk->name);
++
++ i = nest + strlen(clk->name);
++ if (i >= 16)
++ i = 15;
++ for (; i < 16; i++)
++ seq_putc(s, ' ');
++ seq_printf(s, "%c use=%d rate=%lu KHz",
++ clk->set_parent ? '*' : ' ',
++ clk->users,
++ __clk_get_rate(clk));
++ if (clk->format)
++ clk->format(clk, s);
++ seq_putc(s, '\n');
++
++ dump_clocks(s, clk, nest + 1);
++ }
++ }
++}
++
++static int clocklib_show(struct seq_file *s, void *unused)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&clocks_lock, flags);
++
++ dump_clocks(s, NULL, 0);
++
++ spin_unlock_irqrestore(&clocks_lock, flags);
++
++ return 0;
++}
++
++static int clocklib_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, clocklib_show, NULL);
++}
++
++static struct file_operations clocklib_operations = {
++ .open = clocklib_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static int __init clocklib_debugfs_init(void)
++{
++ debugfs_create_file("clock", S_IFREG | S_IRUGO,
++ NULL, NULL, &clocklib_operations);
++ return 0;
++}
++subsys_initcall(clocklib_debugfs_init);
++
++#endif /* DEBUG_FS */
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch b/packages/linux/linux-rp-2.6.24/tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch
new file mode 100644
index 0000000000..9c95c67e78
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch
@@ -0,0 +1,593 @@
+From 2a143b9546b01fd6c58ebaac7eb46568a17d6a41 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Tue, 12 Feb 2008 04:58:59 +0300
+Subject: [PATCH 41/64] From 80a359e60c2aec59ccf4fca0a7fd20495f82b1d2 Mon Sep 17 00:00:00 2001
+ In-Reply-To: <20080207005839.GA28509@doriath.ww600.siemens.net>
+ References: <20080207005839.GA28509@doriath.ww600.siemens.net>
+ Date: Thu, 7 Feb 2008 03:35:08 +0300
+ Subject: [PATCH 3/5] Use clocklib for ARM pxa sub-arch.
+ Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-pxa/clock.c | 108 ++++++--------------------------------------
+ arch/arm/mach-pxa/clock.h | 58 +++++++++++++-----------
+ arch/arm/mach-pxa/pxa25x.c | 64 +++++++++++++++-----------
+ arch/arm/mach-pxa/pxa27x.c | 61 +++++++++++++-----------
+ arch/arm/mach-pxa/pxa3xx.c | 91 +++++++++++++++++++++----------------
+ 6 files changed, 169 insertions(+), 214 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 423e953..47f3c73 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -347,6 +347,7 @@ config ARCH_PXA
+ select GENERIC_CLOCKEVENTS
+ select TICK_ONESHOT
+ select HAVE_GPIO_LIB
++ select HAVE_CLOCK_LIB
+ help
+ Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
+
+diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c
+index 83ef5ec..3296b02 100644
+--- a/arch/arm/mach-pxa/clock.c
++++ b/arch/arm/mach-pxa/clock.c
+@@ -8,6 +8,7 @@
+ #include <linux/err.h>
+ #include <linux/string.h>
+ #include <linux/clk.h>
++#include <linux/clklib.h>
+ #include <linux/spinlock.h>
+ #include <linux/platform_device.h>
+ #include <linux/delay.h>
+@@ -19,123 +20,42 @@
+ #include "generic.h"
+ #include "clock.h"
+
+-static LIST_HEAD(clocks);
+-static DEFINE_MUTEX(clocks_mutex);
+-static DEFINE_SPINLOCK(clocks_lock);
+-
+-struct clk *clk_get(struct device *dev, const char *id)
+-{
+- struct clk *p, *clk = ERR_PTR(-ENOENT);
+-
+- mutex_lock(&clocks_mutex);
+- list_for_each_entry(p, &clocks, node) {
+- if (strcmp(id, p->name) == 0 &&
+- (p->dev == NULL || p->dev == dev)) {
+- clk = p;
+- break;
+- }
+- }
+- mutex_unlock(&clocks_mutex);
+-
+- return clk;
+-}
+-EXPORT_SYMBOL(clk_get);
+-
+-void clk_put(struct clk *clk)
++static int clk_gpio27_enable(struct clk *clk)
+ {
+-}
+-EXPORT_SYMBOL(clk_put);
+-
+-int clk_enable(struct clk *clk)
+-{
+- unsigned long flags;
+-
+- spin_lock_irqsave(&clocks_lock, flags);
+- if (clk->enabled++ == 0)
+- clk->ops->enable(clk);
+- spin_unlock_irqrestore(&clocks_lock, flags);
+-
+- if (clk->delay)
+- udelay(clk->delay);
++ pxa_gpio_mode(GPIO11_3_6MHz_MD);
+
+ return 0;
+ }
+-EXPORT_SYMBOL(clk_enable);
+-
+-void clk_disable(struct clk *clk)
+-{
+- unsigned long flags;
+-
+- WARN_ON(clk->enabled == 0);
+-
+- spin_lock_irqsave(&clocks_lock, flags);
+- if (--clk->enabled == 0)
+- clk->ops->disable(clk);
+- spin_unlock_irqrestore(&clocks_lock, flags);
+-}
+-EXPORT_SYMBOL(clk_disable);
+-
+-unsigned long clk_get_rate(struct clk *clk)
+-{
+- unsigned long rate;
+-
+- rate = clk->rate;
+- if (clk->ops->getrate)
+- rate = clk->ops->getrate(clk);
+-
+- return rate;
+-}
+-EXPORT_SYMBOL(clk_get_rate);
+-
+-
+-static void clk_gpio27_enable(struct clk *clk)
+-{
+- pxa_gpio_mode(GPIO11_3_6MHz_MD);
+-}
+
+ static void clk_gpio27_disable(struct clk *clk)
+ {
++ /* FIXME: disable clock */
+ }
+
+-static const struct clkops clk_gpio27_ops = {
+- .enable = clk_gpio27_enable,
+- .disable = clk_gpio27_disable,
+-};
+-
+-
+-void clk_cken_enable(struct clk *clk)
++int clk_cken_enable(struct clk *clk)
+ {
+- CKEN |= 1 << clk->cken;
++ int cken = ((struct clk_cken_priv *)clk->priv)->cken;
++ CKEN |= 1 << cken;
++
++ return 0;
+ }
+
+ void clk_cken_disable(struct clk *clk)
+ {
+- CKEN &= ~(1 << clk->cken);
++ int cken = ((struct clk_cken_priv *)clk->priv)->cken;
++ CKEN &= ~(1 << cken);
+ }
+
+-const struct clkops clk_cken_ops = {
+- .enable = clk_cken_enable,
+- .disable = clk_cken_disable,
+-};
+-
+ static struct clk common_clks[] = {
+ {
+ .name = "GPIO27_CLK",
+- .ops = &clk_gpio27_ops,
+ .rate = 3686400,
++ .owner = THIS_MODULE,
++ .enable = clk_gpio27_enable,
++ .disable = clk_gpio27_disable,
+ },
+ };
+
+-void clks_register(struct clk *clks, size_t num)
+-{
+- int i;
+-
+- mutex_lock(&clocks_mutex);
+- for (i = 0; i < num; i++)
+- list_add(&clks[i].node, &clocks);
+- mutex_unlock(&clocks_mutex);
+-}
+-
+ static int __init clk_init(void)
+ {
+ clks_register(common_clks, ARRAY_SIZE(common_clks));
+diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h
+index bc6b77e..5d0d067 100644
+--- a/arch/arm/mach-pxa/clock.h
++++ b/arch/arm/mach-pxa/clock.h
+@@ -1,43 +1,47 @@
+-struct clk;
++#include <linux/clklib.h>
++#include <linux/seq_file.h>
+
+-struct clkops {
+- void (*enable)(struct clk *);
+- void (*disable)(struct clk *);
+- unsigned long (*getrate)(struct clk *);
++struct clk_cken_priv {
++ unsigned int cken;
+ };
+
+-struct clk {
+- struct list_head node;
+- const char *name;
+- struct device *dev;
+- const struct clkops *ops;
+- unsigned long rate;
+- unsigned int cken;
+- unsigned int delay;
+- unsigned int enabled;
+-};
+-
+-#define INIT_CKEN(_name, _cken, _rate, _delay, _dev) \
++#define INIT_CKEN(_name, _cken, _rate, _delay) \
+ { \
+ .name = _name, \
+- .dev = _dev, \
+- .ops = &clk_cken_ops, \
++ .enable = clk_cken_enable, \
++ .disable = clk_cken_disable, \
+ .rate = _rate, \
+- .cken = CKEN_##_cken, \
+ .delay = _delay, \
++ .priv = &(struct clk_cken_priv) { \
++ .cken = CKEN_##_cken, \
++ }, \
+ }
+
+-#define INIT_CK(_name, _cken, _ops, _dev) \
++#define INIT_CK(_name, _cken, _getrate) \
+ { \
+ .name = _name, \
+- .dev = _dev, \
+- .ops = _ops, \
+- .cken = CKEN_##_cken, \
++ .enable = clk_cken_enable, \
++ .disable = clk_cken_disable, \
++ .getrate = _getrate, \
++ .priv = &(struct clk_cken_priv) { \
++ .cken = CKEN_##_cken, \
++ }, \
+ }
+
+-extern const struct clkops clk_cken_ops;
+-
+-void clk_cken_enable(struct clk *clk);
++int clk_cken_enable(struct clk *clk);
+ void clk_cken_disable(struct clk *clk);
+
+ void clks_register(struct clk *clks, size_t num);
++
++static int __maybe_unused clk_dev_can_get(struct clk *clk, struct device *dev)
++{
++ return (dev == clk->priv);
++}
++
++static int __maybe_unused clk_dev_format(struct clk *clk, struct seq_file *s)
++{
++ BUG_ON(!clk->priv);
++ seq_puts(s, "for device ");
++ seq_puts(s, ((struct device *)clk->priv)->bus_id);
++ return 0;
++}
+diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
+index 5988d99..ed3719b 100644
+--- a/arch/arm/mach-pxa/pxa25x.c
++++ b/arch/arm/mach-pxa/pxa25x.c
+@@ -100,40 +100,50 @@ static unsigned long clk_pxa25x_lcd_getrate(struct clk *clk)
+ return pxa25x_get_memclk_frequency_10khz() * 10000;
+ }
+
+-static const struct clkops clk_pxa25x_lcd_ops = {
+- .enable = clk_cken_enable,
+- .disable = clk_cken_disable,
+- .getrate = clk_pxa25x_lcd_getrate,
+-};
+-
+ /*
+ * 3.6864MHz -> OST, GPIO, SSP, PWM, PLLs (95.842MHz, 147.456MHz)
+ * 95.842MHz -> MMC 19.169MHz, I2C 31.949MHz, FICP 47.923MHz, USB 47.923MHz
+ * 147.456MHz -> UART 14.7456MHz, AC97 12.288MHz, I2S 5.672MHz (allegedly)
+ */
+-static struct clk pxa25x_hwuart_clk =
+- INIT_CKEN("UARTCLK", HWUART, 14745600, 1, &pxa_device_hwuart.dev)
+-;
++static struct clk pxa25x_hwuart_clk[] = {
++ INIT_CKEN("HWUARTCLK", HWUART, 14745600, 1),
++ {
++ .parent = &pxa25x_hwuart_clk[0],
++ .name = "UARTCLK",
++ .can_get = clk_dev_can_get,
++ .priv = &pxa_device_hwuart.dev,
++ },
++};
+
+ static struct clk pxa25x_clks[] = {
+- INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_ops, &pxa_device_fb.dev),
+- INIT_CKEN("UARTCLK", FFUART, 14745600, 1, &pxa_device_ffuart.dev),
+- INIT_CKEN("UARTCLK", BTUART, 14745600, 1, &pxa_device_btuart.dev),
+- INIT_CKEN("UARTCLK", STUART, 14745600, 1, NULL),
+- INIT_CKEN("UDCCLK", USB, 47923000, 5, &pxa_device_udc.dev),
+- INIT_CKEN("MMCCLK", MMC, 19169000, 0, &pxa_device_mci.dev),
+- INIT_CKEN("I2CCLK", I2C, 31949000, 0, &pxa_device_i2c.dev),
+-
+- INIT_CKEN("SSPCLK", SSP, 3686400, 0, &pxa25x_device_ssp.dev),
+- INIT_CKEN("SSPCLK", NSSP, 3686400, 0, &pxa25x_device_nssp.dev),
+- INIT_CKEN("SSPCLK", ASSP, 3686400, 0, &pxa25x_device_assp.dev),
++ INIT_CK("LCDCLK", LCD, &clk_pxa25x_lcd_getrate),
++ INIT_CKEN("FFUARTCLK", FFUART, 14745600, 1),
++ INIT_CKEN("BTUARTCLK", BTUART, 14745600, 1),
++ INIT_CKEN("STUARTCLK", STUART, 14745600, 1),
++ INIT_CKEN("UDCCLK", USB, 47923000, 5),
++ INIT_CKEN("MMCCLK", MMC, 19169000, 0),
++ INIT_CKEN("I2CCLK", I2C, 31949000, 0),
++
++ INIT_CKEN("SSP_CLK", SSP, 3686400, 0),
++ INIT_CKEN("NSSPCLK", NSSP, 3686400, 0),
++ INIT_CKEN("ASSPCLK", ASSP, 3686400, 0),
+
+ /*
+- INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
+- INIT_CKEN("PWMCLK", PWM0, 3686400, 0, NULL),
+- INIT_CKEN("I2SCLK", I2S, 14745600, 0, NULL),
++ INIT_CKEN("PWMCLK", PWM0, 3686400, 0),
++ INIT_CKEN("PWMCLK", PWM0, 3686400, 0),
++ INIT_CKEN("I2SCLK", I2S, 14745600, 0),
+ */
+- INIT_CKEN("FICPCLK", FICP, 47923000, 0, NULL),
++ INIT_CKEN("FICPCLK", FICP, 47923000, 0),
++};
++
++static struct clk_function __initdata pxa25x_clk_funcs[] = {
++ CLK_FUNC("FFUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_ffuart.dev, clk_dev_format),
++ CLK_FUNC("BTUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_btuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_stuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "SIRCLK", NULL, NULL, NULL),
++ CLK_FUNC("SSP_CLK", "SSPCLK", clk_dev_can_get, &pxa25x_device_ssp.dev, clk_dev_format),
++ CLK_FUNC("NSSPCLK", "SSPCLK", clk_dev_can_get, &pxa25x_device_nssp.dev, clk_dev_format),
++ CLK_FUNC("ASSPCLK", "SSPCLK", clk_dev_can_get, &pxa25x_device_assp.dev, clk_dev_format),
+ };
+
+ #ifdef CONFIG_PM
+@@ -313,11 +323,13 @@ static int __init pxa25x_init(void)
+ int ret = 0;
+
+ /* Only add HWUART for PXA255/26x; PXA210/250/27x do not have it. */
+- if (cpu_is_pxa25x())
+- clks_register(&pxa25x_hwuart_clk, 1);
++ if (cpu_is_pxa25x()) {
++ clks_register(pxa25x_hwuart_clk, ARRAY_SIZE(pxa25x_hwuart_clk));
++ }
+
+ if (cpu_is_pxa21x() || cpu_is_pxa25x()) {
+ clks_register(pxa25x_clks, ARRAY_SIZE(pxa25x_clks));
++ clk_alloc_functions(pxa25x_clk_funcs, ARRAY_SIZE(pxa25x_clk_funcs));
+
+ if ((ret = pxa_init_dma(16)))
+ return ret;
+diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
+index 30ca4fd..c51e7b2 100644
+--- a/arch/arm/mach-pxa/pxa27x.c
++++ b/arch/arm/mach-pxa/pxa27x.c
+@@ -126,44 +126,48 @@ static unsigned long clk_pxa27x_lcd_getrate(struct clk *clk)
+ return pxa27x_get_lcdclk_frequency_10khz() * 10000;
+ }
+
+-static const struct clkops clk_pxa27x_lcd_ops = {
+- .enable = clk_cken_enable,
+- .disable = clk_cken_disable,
+- .getrate = clk_pxa27x_lcd_getrate,
+-};
+-
+ static struct clk pxa27x_clks[] = {
+- INIT_CK("LCDCLK", LCD, &clk_pxa27x_lcd_ops, &pxa_device_fb.dev),
+- INIT_CK("CAMCLK", CAMERA, &clk_pxa27x_lcd_ops, NULL),
++ INIT_CK("LCDCLK", LCD, &clk_pxa27x_lcd_getrate),
++ INIT_CK("CAMCLK", CAMERA, &clk_pxa27x_lcd_getrate),
+
+- INIT_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
+- INIT_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
+- INIT_CKEN("UARTCLK", STUART, 14857000, 1, NULL),
++ INIT_CKEN("FFUARTCLK", FFUART, 14857000, 1),
++ INIT_CKEN("BTUARTCLK", BTUART, 14857000, 1),
++ INIT_CKEN("STUARTCLK", STUART, 14857000, 1),
+
+- INIT_CKEN("I2SCLK", I2S, 14682000, 0, &pxa_device_i2s.dev),
+- INIT_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
+- INIT_CKEN("UDCCLK", USB, 48000000, 5, &pxa_device_udc.dev),
+- INIT_CKEN("MMCCLK", MMC, 19500000, 0, &pxa_device_mci.dev),
+- INIT_CKEN("FICPCLK", FICP, 48000000, 0, &pxa_device_ficp.dev),
++ INIT_CKEN("I2SCLK", I2S, 14682000, 0),
++ INIT_CKEN("I2CCLK", I2C, 32842000, 0),
++ INIT_CKEN("UDCCLK", USB, 48000000, 5),
++ INIT_CKEN("MMCCLK", MMC, 19500000, 0),
++ INIT_CKEN("FICPCLK", FICP, 48000000, 0),
+
+- INIT_CKEN("USBCLK", USBHOST, 48000000, 0, &pxa27x_device_ohci.dev),
+- INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0, &pxa27x_device_i2c_power.dev),
+- INIT_CKEN("KBDCLK", KEYPAD, 32768, 0, NULL),
++ INIT_CKEN("USBCLK", USBHOST, 48000000, 0),
++ INIT_CKEN("I2CCLK", PWRI2C, 13000000, 0),
++ INIT_CKEN("KBDCLK", KEYPAD, 32768, 0),
+
+- INIT_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
+- INIT_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
+- INIT_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
++ INIT_CKEN("SSP1CLK", SSP1, 13000000, 0),
++ INIT_CKEN("SSP2CLK", SSP2, 13000000, 0),
++ INIT_CKEN("SSP3CLK", SSP3, 13000000, 0),
+
+ /*
+- INIT_CKEN("PWMCLK", PWM0, 13000000, 0, NULL),
+- INIT_CKEN("MSLCLK", MSL, 48000000, 0, NULL),
+- INIT_CKEN("USIMCLK", USIM, 48000000, 0, NULL),
+- INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0, NULL),
+- INIT_CKEN("IMCLK", IM, 0, 0, NULL),
+- INIT_CKEN("MEMCLK", MEMC, 0, 0, NULL),
++ INIT_CKEN("PWMCLK", PWM0, 13000000, 0),
++ INIT_CKEN("MSLCLK", MSL, 48000000, 0),
++ INIT_CKEN("USIMCLK", USIM, 48000000, 0),
++ INIT_CKEN("MSTKCLK", MEMSTK, 19500000, 0),
++ INIT_CKEN("IMCLK", IM, 0, 0),
++ INIT_CKEN("MEMCLK", MEMC, 0, 0),
+ */
+ };
+
++static struct clk_function __initdata pxa27x_clk_funcs[] = {
++ CLK_FUNC("FFUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_ffuart.dev, clk_dev_format),
++ CLK_FUNC("BTUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_btuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_stuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "SIRCLK", NULL, NULL, NULL),
++ CLK_FUNC("SSP1CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp1.dev, clk_dev_format),
++ CLK_FUNC("SSP2CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp2.dev, clk_dev_format),
++ CLK_FUNC("SSP3CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp3.dev, clk_dev_format),
++};
++
+ #ifdef CONFIG_PM
+
+ #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x
+@@ -453,6 +457,7 @@ static int __init pxa27x_init(void)
+ int ret = 0;
+ if (cpu_is_pxa27x()) {
+ clks_register(pxa27x_clks, ARRAY_SIZE(pxa27x_clks));
++ clk_alloc_functions(pxa27x_clk_funcs, ARRAY_SIZE(pxa27x_clk_funcs));
+
+ if ((ret = pxa_init_dma(32)))
+ return ret;
+diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
+index ccab9da..0f8bbf3 100644
+--- a/arch/arm/mach-pxa/pxa3xx.c
++++ b/arch/arm/mach-pxa/pxa3xx.c
+@@ -122,27 +122,31 @@ static unsigned long clk_pxa3xx_hsio_getrate(struct clk *clk)
+ return hsio_clk;
+ }
+
+-static void clk_pxa3xx_cken_enable(struct clk *clk)
++static int clk_pxa3xx_cken_enable(struct clk *clk)
+ {
+- unsigned long mask = 1ul << (clk->cken & 0x1f);
++ int cken = ((struct clk_cken_priv *)clk->priv)->cken;
++ unsigned long mask = 1ul << (cken & 0x1f);
+
+ local_irq_disable();
+
+- if (clk->cken < 32)
++ if (cken < 32)
+ CKENA |= mask;
+ else
+ CKENB |= mask;
+
+ local_irq_enable();
++
++ return 0;
+ }
+
+ static void clk_pxa3xx_cken_disable(struct clk *clk)
+ {
+- unsigned long mask = 1ul << (clk->cken & 0x1f);
++ int cken = ((struct clk_cken_priv *)clk->priv)->cken;
++ unsigned long mask = 1ul << (cken & 0x1f);
+
+ local_irq_disable();
+
+- if (clk->cken < 32)
++ if (cken < 32)
+ CKENA &= ~mask;
+ else
+ CKENB &= ~mask;
+@@ -150,55 +154,63 @@ static void clk_pxa3xx_cken_disable(struct clk *clk)
+ local_irq_enable();
+ }
+
+-static const struct clkops clk_pxa3xx_cken_ops = {
+- .enable = clk_pxa3xx_cken_enable,
+- .disable = clk_pxa3xx_cken_disable,
+-};
+-
+-static const struct clkops clk_pxa3xx_hsio_ops = {
+- .enable = clk_pxa3xx_cken_enable,
+- .disable = clk_pxa3xx_cken_disable,
+- .getrate = clk_pxa3xx_hsio_getrate,
+-};
+-
+-#define PXA3xx_CKEN(_name, _cken, _rate, _delay, _dev) \
++#define PXA3xx_CKEN(_name, _cken, _rate, _delay) \
+ { \
+ .name = _name, \
+- .dev = _dev, \
+- .ops = &clk_pxa3xx_cken_ops, \
++ .enable = clk_pxa3xx_cken_enable, \
++ .disable = clk_pxa3xx_cken_disable, \
+ .rate = _rate, \
+- .cken = CKEN_##_cken, \
+ .delay = _delay, \
++ .priv = &(struct clk_cken_priv) { \
++ .cken = CKEN_##_cken, \
++ }, \
+ }
+
+-#define PXA3xx_CK(_name, _cken, _ops, _dev) \
++#define PXA3xx_CK(_name, _cken, _getrate) \
+ { \
+ .name = _name, \
+- .dev = _dev, \
+- .ops = _ops, \
+- .cken = CKEN_##_cken, \
++ .enable = clk_pxa3xx_cken_enable, \
++ .disable = clk_pxa3xx_cken_disable, \
++ .getrate = _getrate, \
++ .priv = &(struct clk_cken_priv) { \
++ .cken = CKEN_##_cken, \
++ }, \
+ }
+
+ static struct clk pxa3xx_clks[] = {
+- PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_ops, &pxa_device_fb.dev),
+- PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_ops, NULL),
++ PXA3xx_CK("LCDCLK", LCD, &clk_pxa3xx_hsio_getrate),
++ PXA3xx_CK("CAMCLK", CAMERA, &clk_pxa3xx_hsio_getrate),
+
+- PXA3xx_CKEN("UARTCLK", FFUART, 14857000, 1, &pxa_device_ffuart.dev),
+- PXA3xx_CKEN("UARTCLK", BTUART, 14857000, 1, &pxa_device_btuart.dev),
+- PXA3xx_CKEN("UARTCLK", STUART, 14857000, 1, NULL),
++ PXA3xx_CKEN("FFUARTCLK", FFUART, 14857000, 1),
++ PXA3xx_CKEN("BTUARTCLK", BTUART, 14857000, 1),
++ PXA3xx_CKEN("STUARTCLK", STUART, 14857000, 1),
+
+- PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0, &pxa_device_i2c.dev),
+- PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5, &pxa_device_udc.dev),
+- PXA3xx_CKEN("USBCLK", USBH, 48000000, 0, &pxa27x_device_ohci.dev),
++ PXA3xx_CKEN("I2CCLK", I2C, 32842000, 0),
++ PXA3xx_CKEN("UDCCLK", UDC, 48000000, 5),
++ PXA3xx_CKEN("USBCLK", USBH, 48000000, 0),
+
+- PXA3xx_CKEN("SSPCLK", SSP1, 13000000, 0, &pxa27x_device_ssp1.dev),
+- PXA3xx_CKEN("SSPCLK", SSP2, 13000000, 0, &pxa27x_device_ssp2.dev),
+- PXA3xx_CKEN("SSPCLK", SSP3, 13000000, 0, &pxa27x_device_ssp3.dev),
+- PXA3xx_CKEN("SSPCLK", SSP4, 13000000, 0, &pxa3xx_device_ssp4.dev),
++ PXA3xx_CKEN("SSP1CLK", SSP1, 13000000, 0),
++ PXA3xx_CKEN("SSP2CLK", SSP2, 13000000, 0),
++ PXA3xx_CKEN("SSP3CLK", SSP3, 13000000, 0),
++ PXA3xx_CKEN("SSP4CLK", SSP4, 13000000, 0),
++
++ PXA3xx_CKEN("MMC1CLK", MMC1, 19500000, 0),
++ PXA3xx_CKEN("MMC2CLK", MMC2, 19500000, 0),
++ PXA3xx_CKEN("MMC3CLK", MMC3, 19500000, 0),
++};
+
+- PXA3xx_CKEN("MMCCLK", MMC1, 19500000, 0, &pxa_device_mci.dev),
+- PXA3xx_CKEN("MMCCLK", MMC2, 19500000, 0, &pxa3xx_device_mci2.dev),
+- PXA3xx_CKEN("MMCCLK", MMC3, 19500000, 0, &pxa3xx_device_mci3.dev),
++static struct clk_function __initdata pxa3xx_clk_funcs[] = {
++ CLK_FUNC("FFUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_ffuart.dev, clk_dev_format),
++ CLK_FUNC("BTUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_btuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "UARTCLK", clk_dev_can_get, &pxa_device_stuart.dev, clk_dev_format),
++ CLK_FUNC("STUARTCLK", "SIRCLK", NULL, NULL, NULL),
++ CLK_FUNC("SSP1CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp1.dev, clk_dev_format),
++ CLK_FUNC("SSP2CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp2.dev, clk_dev_format),
++ CLK_FUNC("SSP3CLK", "SSPCLK", clk_dev_can_get, &pxa27x_device_ssp3.dev, clk_dev_format),
++ CLK_FUNC("SSP4CLK", "SSPCLK", clk_dev_can_get, &pxa3xx_device_ssp4.dev, clk_dev_format),
++ CLK_FUNC("MMC1CLK", "MMCCLK", clk_dev_can_get, &pxa_device_mci.dev, clk_dev_format),
++ CLK_FUNC("MMC2CLK", "MMCCLK", clk_dev_can_get, &pxa3xx_device_mci2.dev, clk_dev_format),
++ CLK_FUNC("MMC3CLK", "MMCCLK", clk_dev_can_get, &pxa3xx_device_mci3.dev, clk_dev_format),
+ };
+
+ #ifdef CONFIG_PM
+@@ -255,6 +267,7 @@ static int __init pxa3xx_init(void)
+
+ if (cpu_is_pxa3xx()) {
+ clks_register(pxa3xx_clks, ARRAY_SIZE(pxa3xx_clks));
++ clk_alloc_functions(pxa3xx_clk_funcs, ARRAY_SIZE(pxa3xx_clk_funcs));
+
+ if ((ret = pxa_init_dma(32)))
+ return ret;
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch b/packages/linux/linux-rp-2.6.24/tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch
new file mode 100644
index 0000000000..a605735df0
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch
@@ -0,0 +1,26 @@
+From 70dfe7e736467af6242c61092cb64f44d2fd50e3 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 03:01:05 +0300
+Subject: [PATCH 42/64] Use correct clock for IrDA on pxa
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/net/irda/pxaficp_ir.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
+index 8c09344..36d2ec0 100644
+--- a/drivers/net/irda/pxaficp_ir.c
++++ b/drivers/net/irda/pxaficp_ir.c
+@@ -814,7 +814,7 @@ static int pxa_irda_probe(struct platform_device *pdev)
+ si->dev = &pdev->dev;
+ si->pdata = pdev->dev.platform_data;
+
+- si->sir_clk = clk_get(&pdev->dev, "UARTCLK");
++ si->sir_clk = clk_get(&pdev->dev, "SIRCLK");
+ si->fir_clk = clk_get(&pdev->dev, "FICPCLK");
+ if (IS_ERR(si->sir_clk) || IS_ERR(si->fir_clk)) {
+ err = PTR_ERR(IS_ERR(si->sir_clk) ? si->sir_clk : si->fir_clk);
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch b/packages/linux/linux-rp-2.6.24/tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch
new file mode 100644
index 0000000000..22b8414b2d
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch
@@ -0,0 +1,153 @@
+From 3932e0f5c4c05200c030b60606ed2eb83550f4bb Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 03:01:04 +0300
+Subject: [PATCH 43/64] Use clocklib for sa1100 sub-arch.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/Kconfig | 1 +
+ arch/arm/mach-sa1100/clock.c | 95 ++---------------------------------------
+ 2 files changed, 6 insertions(+), 90 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 47f3c73..fa47201 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -370,6 +370,7 @@ config ARCH_SA1100
+ select ARCH_MTD_XIP
+ select GENERIC_GPIO
+ select GENERIC_TIME
++ select HAVE_CLOCK_LIB
+ help
+ Support for StrongARM 11x0 based boards.
+
+diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
+index fc97fe5..6b3cc51 100644
+--- a/arch/arm/mach-sa1100/clock.c
++++ b/arch/arm/mach-sa1100/clock.c
+@@ -8,83 +8,13 @@
+ #include <linux/err.h>
+ #include <linux/string.h>
+ #include <linux/clk.h>
++#include <linux/clklib.h>
+ #include <linux/spinlock.h>
+ #include <linux/mutex.h>
+
+ #include <asm/hardware.h>
+
+-/*
+- * Very simple clock implementation - we only have one clock to
+- * deal with at the moment, so we only match using the "name".
+- */
+-struct clk {
+- struct list_head node;
+- unsigned long rate;
+- const char *name;
+- unsigned int enabled;
+- void (*enable)(void);
+- void (*disable)(void);
+-};
+-
+-static LIST_HEAD(clocks);
+-static DEFINE_MUTEX(clocks_mutex);
+-static DEFINE_SPINLOCK(clocks_lock);
+-
+-struct clk *clk_get(struct device *dev, const char *id)
+-{
+- struct clk *p, *clk = ERR_PTR(-ENOENT);
+-
+- mutex_lock(&clocks_mutex);
+- list_for_each_entry(p, &clocks, node) {
+- if (strcmp(id, p->name) == 0) {
+- clk = p;
+- break;
+- }
+- }
+- mutex_unlock(&clocks_mutex);
+-
+- return clk;
+-}
+-EXPORT_SYMBOL(clk_get);
+-
+-void clk_put(struct clk *clk)
+-{
+-}
+-EXPORT_SYMBOL(clk_put);
+-
+-int clk_enable(struct clk *clk)
+-{
+- unsigned long flags;
+-
+- spin_lock_irqsave(&clocks_lock, flags);
+- if (clk->enabled++ == 0)
+- clk->enable();
+- spin_unlock_irqrestore(&clocks_lock, flags);
+- return 0;
+-}
+-EXPORT_SYMBOL(clk_enable);
+-
+-void clk_disable(struct clk *clk)
+-{
+- unsigned long flags;
+-
+- WARN_ON(clk->enabled == 0);
+-
+- spin_lock_irqsave(&clocks_lock, flags);
+- if (--clk->enabled == 0)
+- clk->disable();
+- spin_unlock_irqrestore(&clocks_lock, flags);
+-}
+-EXPORT_SYMBOL(clk_disable);
+-
+-unsigned long clk_get_rate(struct clk *clk)
+-{
+- return clk->rate;
+-}
+-EXPORT_SYMBOL(clk_get_rate);
+-
+-
+-static void clk_gpio27_enable(void)
++static int clk_gpio27_enable(struct clk *clk)
+ {
+ /*
+ * First, set up the 3.6864MHz clock on GPIO 27 for the SA-1111:
+@@ -93,9 +23,11 @@ static void clk_gpio27_enable(void)
+ GAFR |= GPIO_32_768kHz;
+ GPDR |= GPIO_32_768kHz;
+ TUCR = TUCR_3_6864MHz;
++
++ return 0;
+ }
+
+-static void clk_gpio27_disable(void)
++static void clk_gpio27_disable(struct clk *clk)
+ {
+ TUCR = 0;
+ GPDR &= ~GPIO_32_768kHz;
+@@ -109,23 +41,6 @@ static struct clk clk_gpio27 = {
+ .disable = clk_gpio27_disable,
+ };
+
+-int clk_register(struct clk *clk)
+-{
+- mutex_lock(&clocks_mutex);
+- list_add(&clk->node, &clocks);
+- mutex_unlock(&clocks_mutex);
+- return 0;
+-}
+-EXPORT_SYMBOL(clk_register);
+-
+-void clk_unregister(struct clk *clk)
+-{
+- mutex_lock(&clocks_mutex);
+- list_del(&clk->node);
+- mutex_unlock(&clocks_mutex);
+-}
+-EXPORT_SYMBOL(clk_unregister);
+-
+ static int __init clk_init(void)
+ {
+ clk_register(&clk_gpio27);
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0044-fix-tmio_mmc-debug-compilation.patch b/packages/linux/linux-rp-2.6.24/tosa/0044-fix-tmio_mmc-debug-compilation.patch
new file mode 100644
index 0000000000..5ca8228604
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0044-fix-tmio_mmc-debug-compilation.patch
@@ -0,0 +1,26 @@
+From 03fdebde257197c13c0d10882e16a2a888ab4e0a Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sat, 2 Feb 2008 20:23:01 +0300
+Subject: [PATCH 44/64] fix tmio_mmc debug compilation
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/mmc/host/tmio_mmc.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
+index 735c386..b0d38e2 100644
+--- a/drivers/mmc/host/tmio_mmc.c
++++ b/drivers/mmc/host/tmio_mmc.c
+@@ -329,7 +329,7 @@ static irqreturn_t tmio_mmc_irq(int irq, void *devid)
+ if (!ireg) {
+ disable_mmc_irqs(ctl, status & ~irq_mask);
+ #ifdef CONFIG_MMC_DEBUG
+- WARN("tmio_mmc: Spurious MMC irq, disabling! 0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg);
++ printk(KERN_WARNING "tmio_mmc: Spurious MMC irq, disabling! 0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg);
+ debug_status(status);
+ #endif
+ goto out;
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0045-Update-tmio_ohci.patch b/packages/linux/linux-rp-2.6.24/tosa/0045-Update-tmio_ohci.patch
new file mode 100644
index 0000000000..10f483b89d
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0045-Update-tmio_ohci.patch
@@ -0,0 +1,416 @@
+From fe3c05491370965eb821aedc95f771b86ebab3ab Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:01:44 +0300
+Subject: [PATCH 45/64] Update tmio_ohci:
+ Ports management.
+ Basic support for ohci suspend/resume.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/mfd/tc6393xb.c | 40 ++++++++
+ drivers/usb/host/ohci-tmio.c | 206 +++++++++++++++++++++++++++++++++++++++---
+ 2 files changed, 235 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index 9439f39..5d17687 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -224,6 +224,44 @@ static int tc6393xb_ohci_enable(struct platform_device *ohci)
+ return 0;
+ }
+
++static int tc6393xb_ohci_suspend(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.usbcken = 0;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_ohci_resume(struct platform_device *ohci)
++{
++ struct platform_device *dev = to_platform_device(ohci->dev.parent);
++ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ union tc6393xb_scr_ccr ccr;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ ccr.raw = ioread16(&scr->ccr);
++ ccr.bits.usbcken = 1;
++ iowrite16(ccr.raw, &scr->ccr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
+ static int tc6393xb_fb_disable(struct platform_device *fb)
+ {
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+@@ -423,6 +461,8 @@ static struct mfd_cell tc6393xb_cells[] = {
+ .name = "tmio-ohci",
+ .enable = tc6393xb_ohci_enable,
+ .disable = tc6393xb_ohci_disable,
++ .suspend = tc6393xb_ohci_suspend,
++ .resume = tc6393xb_ohci_resume,
+ .num_resources = ARRAY_SIZE(tc6393xb_ohci_resources),
+ .resources = tc6393xb_ohci_resources,
+ },
+diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
+index be609f3..65e3cd3 100644
+--- a/drivers/usb/host/ohci-tmio.c
++++ b/drivers/usb/host/ohci-tmio.c
+@@ -75,10 +75,13 @@ struct tmio_uhccr {
+ u8 x07[3];
+ } __attribute__((packed));
+
++#define MAX_TMIO_OHCI_PORTS 3
++
+ #define UHCCR_PM_GKEN 0x0001
+ #define UHCCR_PM_CKRNEN 0x0002
+ #define UHCCR_PM_USBPW1 0x0004
+ #define UHCCR_PM_USBPW2 0x0008
++#define UHCCR_PM_USBPW3 0x0008
+ #define UHCCR_PM_PMEE 0x0100
+ #define UHCCR_PM_PMES 0x8000
+
+@@ -86,44 +89,96 @@ struct tmio_uhccr {
+
+ struct tmio_hcd {
+ struct tmio_uhccr __iomem *ccr;
++ spinlock_t lock; /* protects RMW cycles and disabled_ports data */
++ bool disabled_ports[MAX_TMIO_OHCI_PORTS];
+ };
+
+ #define hcd_to_tmio(hcd) ((struct tmio_hcd *)(hcd_to_ohci(hcd) + 1))
+ #define ohci_to_tmio(ohci) ((struct tmio_hcd *)(ohci + 1))
+
++struct indexed_device_attribute{
++ struct device_attribute dev_attr;
++ int index;
++};
++#define to_indexed_dev_attr(_dev_attr) \
++ container_of(_dev_attr, struct indexed_device_attribute, dev_attr)
++
++#define INDEXED_ATTR(_name, _mode, _show, _store, _index) \
++ { .dev_attr = __ATTR(_name ## _index, _mode, _show, _store), \
++ .index = _index }
++
++#define INDEXED_DEVICE_ATTR(_name, _mode, _show, _store, _index) \
++struct indexed_device_attribute dev_attr_##_name ## _index \
++ = INDEXED_ATTR(_name, _mode, _show, _store, _index)
++
++static bool disabled_tmio_ports[MAX_TMIO_OHCI_PORTS];
++module_param_array(disabled_tmio_ports, bool, NULL, 0644);
++MODULE_PARM_DESC(disabled_tmio_ports,
++ "disable specified TC6393 usb ports (default: all enabled)");
++
+ /*-------------------------------------------------------------------------*/
+
++static void tmio_write_pm(struct platform_device *dev)
++{
++ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ u16 pm;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tmio->lock, flags);
++
++ pm = UHCCR_PM_GKEN | UHCCR_PM_CKRNEN |
++ UHCCR_PM_PMEE | UHCCR_PM_PMES;
++
++ if (tmio->disabled_ports[0])
++ pm |= UHCCR_PM_USBPW1;
++ if (tmio->disabled_ports[1])
++ pm |= UHCCR_PM_USBPW2;
++ if (tmio->disabled_ports[2])
++ pm |= UHCCR_PM_USBPW3;
++
++ iowrite16(pm, &ccr->pm);
++ spin_unlock_irqrestore(&tmio->lock, flags);
++}
++
+ static void tmio_stop_hc(struct platform_device *dev)
+ {
+ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
++ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
+ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
+ struct tmio_uhccr __iomem *ccr = tmio->ccr;
+ u16 pm;
+
+- pm = UHCCR_PM_GKEN | UHCCR_PM_CKRNEN | UHCCR_PM_USBPW1 | UHCCR_PM_USBPW2;
++ pm = UHCCR_PM_GKEN | UHCCR_PM_CKRNEN;
++ switch (ohci->num_ports) {
++ default:
++ dev_err(&dev->dev, "Unsupported amount of ports: %d\n", ohci->num_ports);
++ case 3:
++ pm |= UHCCR_PM_USBPW3;
++ case 2:
++ pm |= UHCCR_PM_USBPW2;
++ case 1:
++ pm |= UHCCR_PM_USBPW1;
++ }
+ iowrite8(0, &ccr->intc);
+ iowrite8(0, &ccr->ilme);
+ iowrite16(0, &ccr->basel);
+ iowrite16(0, &ccr->baseh);
+- iowrite16(pm, &ccr->pm);
++ iowrite16(pm, &ccr->pm);
+
+ cell->disable(dev);
+ }
+
+ static void tmio_start_hc(struct platform_device *dev)
+ {
+- struct mfd_cell *cell = mfd_get_cell(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
+ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
+ struct tmio_uhccr __iomem *ccr = tmio->ccr;
+- u16 pm;
+ unsigned long base = hcd->rsrc_start;
+
+- pm = UHCCR_PM_CKRNEN | UHCCR_PM_GKEN | UHCCR_PM_PMEE | UHCCR_PM_PMES;
+- cell->enable(dev);
+-
+- iowrite16(pm, &ccr->pm);
++ tmio_write_pm(dev);
+ iowrite16(base, &ccr->basel);
+ iowrite16(base >> 16, &ccr->baseh);
+ iowrite8(1, &ccr->ilme);
+@@ -133,9 +188,56 @@ static void tmio_start_hc(struct platform_device *dev)
+ ioread8(&ccr->revid), hcd->rsrc_start, hcd->irq);
+ }
+
++static ssize_t tmio_disabled_port_show(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ struct usb_hcd *hcd = dev_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ int index = to_indexed_dev_attr(attr)->index;
++ return snprintf(buf, PAGE_SIZE, "%c",
++ tmio->disabled_ports[index-1]? 'Y': 'N');
++}
++
++static ssize_t tmio_disabled_port_store(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ struct usb_hcd *hcd = dev_get_drvdata(dev);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ int index = to_indexed_dev_attr(attr)->index;
++
++ if (!count)
++ return -EINVAL;
++
++ switch (buf[0]) {
++ case 'y': case 'Y': case '1':
++ tmio->disabled_ports[index-1] = true;
++ break;
++ case 'n': case 'N': case '0':
++ tmio->disabled_ports[index-1] = false;
++ break;
++ default:
++ return -EINVAL;
++ }
++
++ tmio_write_pm(to_platform_device(dev));
++
++ return 1;
++}
++
++
++static INDEXED_DEVICE_ATTR(disabled_usb_port, S_IRUGO | S_IWUSR,
++ tmio_disabled_port_show, tmio_disabled_port_store, 1);
++static INDEXED_DEVICE_ATTR(disabled_usb_port, S_IRUGO | S_IWUSR,
++ tmio_disabled_port_show, tmio_disabled_port_store, 2);
++static INDEXED_DEVICE_ATTR(disabled_usb_port, S_IRUGO | S_IWUSR,
++ tmio_disabled_port_show, tmio_disabled_port_store, 3);
++
+ static int usb_hcd_tmio_probe(const struct hc_driver *driver,
+ struct platform_device *dev)
+ {
++ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct resource *config = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_CONFIG);
+ struct resource *regs = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_CONTROL);
+ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
+@@ -159,6 +261,12 @@ static int usb_hcd_tmio_probe(const struct hc_driver *driver,
+
+ tmio = hcd_to_tmio(hcd);
+
++ spin_lock_init(&tmio->lock);
++
++ memcpy(tmio->disabled_ports,
++ disabled_tmio_ports,
++ sizeof(disabled_tmio_ports));
++
+ tmio->ccr = ioremap(config->start, config->end - config->start + 1);
+ if (!tmio->ccr) {
+ retval = -ENOMEM;
+@@ -183,17 +291,46 @@ static int usb_hcd_tmio_probe(const struct hc_driver *driver,
+ if (retval)
+ goto err_dmabounce_register_dev;
+
++ retval = cell->enable(dev);
++ if (retval)
++ goto err_enable;
++
+ tmio_start_hc(dev);
+ ohci = hcd_to_ohci(hcd);
+ ohci_hcd_init(ohci);
+
+ retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
++ if (retval)
++ goto err_add_hcd;
++
++ switch (ohci->num_ports) {
++ default:
++ dev_err(&dev->dev, "Unsupported amount of ports: %d\n",
++ ohci->num_ports);
++ case 3:
++ retval |= device_create_file(&dev->dev,
++ &dev_attr_disabled_usb_port3.dev_attr);
++ case 2:
++ retval |= device_create_file(&dev->dev,
++ &dev_attr_disabled_usb_port2.dev_attr);
++ case 1:
++ retval |= device_create_file(&dev->dev,
++ &dev_attr_disabled_usb_port1.dev_attr);
++ }
+
+ if (retval == 0)
+ return retval;
+
+- tmio_stop_hc(dev);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port3.dev_attr);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port2.dev_attr);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port1.dev_attr);
++
++ usb_remove_hcd(hcd);
+
++err_add_hcd:
++ tmio_stop_hc(dev);
++ cell->disable(dev);
++err_enable:
+ dmabounce_unregister_dev(&dev->dev);
+ err_dmabounce_register_dev:
+ dma_release_declared_memory(&dev->dev);
+@@ -212,6 +349,9 @@ static void usb_hcd_tmio_remove(struct usb_hcd *hcd, struct platform_device *dev
+ {
+ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
+
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port3.dev_attr);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port2.dev_attr);
++ device_remove_file(&dev->dev, &dev_attr_disabled_usb_port1.dev_attr);
+ usb_remove_hcd(hcd);
+ tmio_stop_hc(dev);
+ dmabounce_unregister_dev(&dev->dev);
+@@ -297,13 +437,22 @@ static u64 dma_mask = DMA_32BIT_MASK;
+ static int ohci_hcd_tmio_drv_probe(struct platform_device *dev)
+ {
+ struct resource *sram = platform_get_resource_byname(dev, IORESOURCE_MEM, TMIO_OHCI_SRAM);
++ int retval;
+
+ dev->dev.dma_mask = &dma_mask;
+ dev->dev.coherent_dma_mask = DMA_32BIT_MASK;
+
++ /* FIXME: move dmabounce checkers to tc6393xb core? */
+ dmabounce_register_checker(tmio_dmabounce_check, sram);
+
+- return usb_hcd_tmio_probe(&ohci_tmio_hc_driver, dev);
++ retval = usb_hcd_tmio_probe(&ohci_tmio_hc_driver, dev);
++
++ if (retval == 0)
++ return retval;
++
++ dmabounce_remove_checker(tmio_dmabounce_check, sram);
++
++ return retval;
+ }
+
+ static int ohci_hcd_tmio_drv_remove(struct platform_device *dev)
+@@ -323,14 +472,31 @@ static int ohci_hcd_tmio_drv_remove(struct platform_device *dev)
+ #ifdef CONFIG_PM
+ static int ohci_hcd_tmio_drv_suspend(struct platform_device *dev, pm_message_t state)
+ {
++ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ unsigned long flags;
++ u8 misc;
++ int ret;
+
+ if (time_before(jiffies, ohci->next_statechange))
+ msleep(5);
+ ohci->next_statechange = jiffies;
+
+- tmio_stop_hc(dev);
++ spin_lock_irqsave(&tmio->lock, flags);
++
++ misc = ioread8(&ccr->misc);
++ misc |= 1 << 3; /* USSUSP */
++ iowrite8(misc, &ccr->misc);
++
++ spin_unlock_irqrestore(&tmio->lock, flags);
++
++ ret = cell->suspend(dev);
++ if (ret)
++ return ret;
++
+ hcd->state = HC_STATE_SUSPENDED;
+ dev->dev.power.power_state = PMSG_SUSPEND;
+
+@@ -339,15 +505,33 @@ static int ohci_hcd_tmio_drv_suspend(struct platform_device *dev, pm_message_t s
+
+ static int ohci_hcd_tmio_drv_resume(struct platform_device *dev)
+ {
++ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(dev);
+ struct ohci_hcd *ohci = hcd_to_ohci(hcd);
++ struct tmio_hcd *tmio = hcd_to_tmio(hcd);
++ struct tmio_uhccr __iomem *ccr = tmio->ccr;
++ unsigned long flags;
++ u8 misc;
++ int ret;
+
+ if (time_before(jiffies, ohci->next_statechange))
+ msleep(5);
+ ohci->next_statechange = jiffies;
+
++ ret = cell->resume(dev);
++ if (ret)
++ return ret;
++
+ tmio_start_hc(dev);
+
++ spin_lock_irqsave(&tmio->lock, flags);
++
++ misc = ioread8(&ccr->misc);
++ misc &= ~(1 << 3); /* USSUSP */
++ iowrite8(misc, &ccr->misc);
++
++ spin_unlock_irqrestore(&tmio->lock, flags);
++
+ dev->dev.power.power_state = PMSG_ON;
+ usb_hcd_resume_root_hub(hcd);
+
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch b/packages/linux/linux-rp-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch
new file mode 100644
index 0000000000..c4b57cb2d1
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0046-patch-tc6393xb-cleanup.patch
@@ -0,0 +1,66 @@
+From edaab7ec86235871d8ad219a1d225ce12f67f8af Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:13:29 +0300
+Subject: [PATCH 46/64] patch tc6393xb-cleanup
+
+---
+ drivers/mfd/tc6393xb.c | 20 ++++++++++++--------
+ 1 files changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index 5d17687..dfae61d 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -590,16 +590,8 @@ static int tc6393xb_hw_init(struct platform_device *dev, int resume)
+ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- int ret;
+ int i;
+
+- if (resume)
+- ret = tcpd->resume(dev);
+- else
+- ret = tcpd->enable(dev);
+- if (ret)
+- return ret;
+-
+ iowrite8(resume ?
+ tc6393xb->suspend_state.fer.raw :
+ 0, &scr->fer);
+@@ -664,6 +656,10 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ goto err_ioremap;
+ }
+
++ retval = tcpd->enable(dev);
++ if (retval)
++ goto err_enable;
++
+ retval = tc6393xb_hw_init(dev, 0);
+ if (retval)
+ goto err_hw_init;
+@@ -690,6 +686,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ tc6393xb_detach_irq(dev);
+
+ err_hw_init:
++ tcpd->disable(dev);
++err_enable:
+ iounmap(tc6393xb->scr);
+ err_ioremap:
+ release_resource(rscr);
+@@ -743,6 +741,12 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
+
+ static int tc6393xb_resume(struct platform_device *dev)
+ {
++ struct tc6393xb_platform_data *tcpd = dev->dev.platform_data;
++ int ret = tcpd->resume(dev);
++
++ if (ret)
++ return ret;
++
+ return tc6393xb_hw_init(dev, 1);
+ }
+ #else
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch b/packages/linux/linux-rp-2.6.24/tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch
new file mode 100644
index 0000000000..54e88253d1
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch
@@ -0,0 +1,412 @@
+From c18b8e34c39ec0d395988318e6651076a748d6bd Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Tue, 12 Feb 2008 04:40:54 +0300
+Subject: [PATCH 47/64] tc6393xb: use bitmasks instead of bit-field structs
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/mfd/tc6393xb.c | 162 ++++++++++++++++++++++++-----------------
+ include/linux/mfd/tc6393xb.h | 63 +++-------------
+ 2 files changed, 107 insertions(+), 118 deletions(-)
+
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index dfae61d..1a394e4 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -24,6 +24,31 @@
+ #include <linux/mfd/tmio.h>
+ #include <linux/mfd/tc6393xb.h>
+
++#define TC6393XB_FER_USBEN BIT(0) /* USB host enable */
++#define TC6393XB_FER_LCDCVEN BIT(1) /* polysilicon TFT enable */
++#define TC6393XB_FER_SLCDEN BIT(2) /* SLCD enable */
++
++enum pincontrol {
++ opendrain = 0,
++ tristate = 1,
++ pushpull = 2,
++ /* reserved = 3, */
++};
++
++#define TC6393XB_MCR_RDY_MASK (3 << 0)
++#define TC6393XB_MCR_RDY_OPENDRAIN (0 << 0)
++#define TC6393XB_MCR_RDY_TRISTATE (1 << 0)
++#define TC6393XB_MCR_RDY_PUSHPULL (2 << 0)
++#define TC6393XB_MCR_RDY_UNK BIT(2)
++#define TC6393XB_MCR_RDY_EN BIT(3)
++#define TC6393XB_MCR_INT_MASK (3 << 4)
++#define TC6393XB_MCR_INT_OPENDRAIN (0 << 4)
++#define TC6393XB_MCR_INT_TRISTATE (1 << 4)
++#define TC6393XB_MCR_INT_PUSHPULL (2 << 4)
++#define TC6393XB_MCR_INT_UNK BIT(6)
++#define TC6393XB_MCR_INT_EN BIT(7)
++/* bits 8 - 16 are unknown */
++
+ struct tc6393xb_scr {
+ u8 x00[8];
+ u8 revid; /* 0x08 Revision ID */
+@@ -74,8 +99,8 @@ struct tc6393xb {
+ spinlock_t lock; /* protects RMW cycles */
+
+ struct {
+- union tc6393xb_scr_fer fer;
+- union tc6393xb_scr_ccr ccr;
++ u8 fer;
++ u16 ccr;
+ u8 gpi_bcr[4];
+ } suspend_state;
+
+@@ -90,13 +115,13 @@ static int tc6393xb_mmc_enable(struct platform_device *mmc) {
+ struct platform_device *dev = to_platform_device(mmc->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.ck32ken = 1;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr |= TC6393XB_CCR_CK32K;
++ iowrite16(ccr, &scr->ccr);
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+ return 0;
+@@ -106,13 +131,13 @@ static int tc6393xb_mmc_disable(struct platform_device *mmc) {
+ struct platform_device *dev = to_platform_device(mmc->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.ck32ken = 0;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr &= ~TC6393XB_CCR_CK32K;
++ iowrite16(ccr, &scr->ccr);
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+ return 0;
+@@ -148,14 +173,17 @@ int tc6393xb_lcd_set_power(struct platform_device *fb, bool on)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_fer fer;
++ u8 fer;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- fer.raw = ioread8(&scr->fer);
+- fer.bits.slcden = on ? 1 : 0;
+- iowrite8(fer.raw, &scr->fer);
++ fer = ioread8(&scr->fer);
++ if (on)
++ fer |= TC6393XB_FER_SLCDEN;
++ else
++ fer &= ~TC6393XB_FER_SLCDEN;
++ iowrite8(fer, &scr->fer);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -181,19 +209,19 @@ static int tc6393xb_ohci_disable(struct platform_device *ohci)
+ struct platform_device *dev = to_platform_device(ohci->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
+- union tc6393xb_scr_fer fer;
++ u16 ccr;
++ u8 fer;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- fer.raw = ioread8(&scr->fer);
+- fer.bits.usben = 0;
+- iowrite8(fer.raw, &scr->fer);
++ fer = ioread8(&scr->fer);
++ fer &= ~TC6393XB_FER_USBEN;
++ iowrite8(fer, &scr->fer);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.usbcken = 0;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr &= ~TC6393XB_CCR_USBCK;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -205,19 +233,19 @@ static int tc6393xb_ohci_enable(struct platform_device *ohci)
+ struct platform_device *dev = to_platform_device(ohci->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
+- union tc6393xb_scr_fer fer;
++ u16 ccr;
++ u8 fer;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.usbcken = 1;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr |= TC6393XB_CCR_USBCK;
++ iowrite16(ccr, &scr->ccr);
+
+- fer.raw = ioread8(&scr->fer);
+- fer.bits.usben = 1;
+- iowrite8(fer.raw, &scr->fer);
++ fer = ioread8(&scr->fer);
++ fer |= TC6393XB_FER_USBEN;
++ iowrite8(fer, &scr->fer);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -229,14 +257,14 @@ static int tc6393xb_ohci_suspend(struct platform_device *ohci)
+ struct platform_device *dev = to_platform_device(ohci->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.usbcken = 0;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr &= ~TC6393XB_CCR_USBCK;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -248,14 +276,14 @@ static int tc6393xb_ohci_resume(struct platform_device *ohci)
+ struct platform_device *dev = to_platform_device(ohci->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.usbcken = 1;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr |= TC6393XB_CCR_USBCK;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -267,8 +295,8 @@ static int tc6393xb_fb_disable(struct platform_device *fb)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
+- union tc6393xb_scr_fer fer;
++ u16 ccr;
++ u8 fer;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+@@ -276,14 +304,13 @@ static int tc6393xb_fb_disable(struct platform_device *fb)
+ /*
+ * FIXME: is this correct or it should be moved to other _disable?
+ */
+- fer.raw = ioread8(&scr->fer);
+- fer.bits.slcden = 0;
+-/* fer.bits.lcdcven = 0; */
+- iowrite8(fer.raw, &scr->fer);
++ fer = ioread8(&scr->fer);
++ fer &= ~TC6393XB_FER_SLCDEN;
++ iowrite8(fer, &scr->fer);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.mclksel = disable;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr = (ccr & ~TC6393XB_CCR_MCLK_MASK) | TC6393XB_CCR_MCLK_OFF;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -295,14 +322,14 @@ static int tc6393xb_fb_enable(struct platform_device *fb)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.mclksel = m48MHz;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr = (ccr & ~TC6393XB_CCR_MCLK_MASK) | TC6393XB_CCR_MCLK_48;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -314,14 +341,14 @@ static int tc6393xb_fb_suspend(struct platform_device *fb)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.mclksel = disable;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr = (ccr & ~TC6393XB_CCR_MCLK_MASK) | TC6393XB_CCR_MCLK_OFF;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -333,14 +360,14 @@ static int tc6393xb_fb_resume(struct platform_device *fb)
+ struct platform_device *dev = to_platform_device(fb->dev.parent);
+ struct tc6393xb *tc6393xb = platform_get_drvdata(dev);
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+- union tc6393xb_scr_ccr ccr;
++ u16 ccr;
+ unsigned long flags;
+
+ spin_lock_irqsave(&tc6393xb->lock, flags);
+
+- ccr.raw = ioread16(&scr->ccr);
+- ccr.bits.mclksel = m48MHz;
+- iowrite16(ccr.raw, &scr->ccr);
++ ccr = ioread16(&scr->ccr);
++ ccr = (ccr & ~TC6393XB_CCR_MCLK_MASK) | TC6393XB_CCR_MCLK_48;
++ iowrite16(ccr, &scr->ccr);
+
+ spin_unlock_irqrestore(&tc6393xb->lock, flags);
+
+@@ -592,14 +619,15 @@ static int tc6393xb_hw_init(struct platform_device *dev, int resume)
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+ int i;
+
+- iowrite8(resume ?
+- tc6393xb->suspend_state.fer.raw :
+- 0, &scr->fer);
++ iowrite8(resume ? tc6393xb->suspend_state.fer : 0,
++ &scr->fer);
+ iowrite16(tcpd->scr_pll2cr, &scr->pll2cr);
+ iowrite16(resume?
+- tc6393xb->suspend_state.ccr.raw :
+- tcpd->scr_ccr.raw, &scr->ccr);
+- iowrite16(tcpd->scr_mcr.raw, &scr->mcr);
++ tc6393xb->suspend_state.ccr :
++ tcpd->scr_ccr, &scr->ccr);
++ iowrite16(TC6393XB_MCR_RDY_OPENDRAIN | TC6393XB_MCR_RDY_UNK | TC6393XB_MCR_RDY_EN |
++ TC6393XB_MCR_INT_OPENDRAIN | TC6393XB_MCR_INT_UNK | TC6393XB_MCR_INT_EN |
++ BIT(15), &scr->mcr);
+ iowrite16(tcpd->scr_gper, &scr->gper);
+ iowrite8(0, &scr->irr);
+ iowrite8(0xbf, &scr->imr);
+@@ -730,8 +758,8 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
+ int i;
+
+
+- tc6393xb->suspend_state.ccr.raw = ioread16(&scr->ccr);
+- tc6393xb->suspend_state.fer.raw = ioread8(&scr->fer);
++ tc6393xb->suspend_state.ccr = ioread16(&scr->ccr);
++ tc6393xb->suspend_state.fer = ioread8(&scr->fer);
+ for (i = 0; i < 4; i++)
+ tc6393xb->suspend_state.gpi_bcr[i] =
+ ioread8(scr->gpi_bcr + i);
+diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
+index e699294..2c69f63 100644
+--- a/include/linux/mfd/tc6393xb.h
++++ b/include/linux/mfd/tc6393xb.h
+@@ -20,60 +20,21 @@
+ #include <linux/mfd-core.h>
+ #include <linux/mfd/tmio.h>
+
+-union tc6393xb_scr_fer {
+- u8 raw;
+-struct {
+- unsigned usben:1; /* D0 USB enable */
+- unsigned lcdcven:1; /* D1 polysylicon TFT enable */
+- unsigned slcden:1; /* D2 SLCD enable */
+-} __attribute__ ((packed)) bits;
+-} __attribute__ ((packed));
+-
+-union tc6393xb_scr_ccr {
+- u16 raw;
+-struct {
+- unsigned ck32ken:1; /* D0 SD host clock enable */
+- unsigned usbcken:1; /* D1 USB host clock enable */
+- unsigned x00:2;
+- unsigned sharp:1; /* D4 ??? set in Sharp's code */
+- unsigned x01:3;
+- enum { disable = 0,
+- m12MHz = 1,
+- m24MHz = 2,
+- m48MHz = 3,
+- } mclksel:3; /* D10-D8 LCD controller clock */
+- unsigned x02:1;
+- enum { h24MHz = 0,
+- h48MHz = 1,
+- } hclksel:2; /* D13-D12 host bus clock */
+- unsigned x03:2;
+-} __attribute__ ((packed)) bits;
+-} __attribute__ ((packed));
+-
+-enum pincontrol {
+- opendrain = 0,
+- tristate = 1,
+- pushpull = 2,
+- /* reserved = 3, */
+-};
+-
+-union tc6393xb_scr_mcr {
+- u16 raw;
+-struct {
+- enum pincontrol rdyst:2; /* D1-D0 HRDY control */
+- unsigned x00:1;
+- unsigned aren:1; /* D3 HRDY pull up resistance cut off */
+- enum pincontrol intst:2; /* D5-D4 #HINT control */
+- unsigned x01:1;
+- unsigned aien:1; /* D7 #HINT pull up resitance cut off */
+- unsigned x02:8;
+-} __attribute__ ((packed)) bits;
+-} __attribute__ ((packed));
++#define TC6393XB_CCR_CK32K BIT(0)
++#define TC6393XB_CCR_USBCK BIT(1)
++#define TC6393XB_CCR_UNK1 BIT(4)
++#define TC6393XB_CCR_MCLK_MASK (7 << 8)
++#define TC6393XB_CCR_MCLK_OFF (0 << 8)
++#define TC6393XB_CCR_MCLK_12 (1 << 8)
++#define TC6393XB_CCR_MCLK_24 (2 << 8)
++#define TC6393XB_CCR_MCLK_48 (3 << 8)
++#define TC6393XB_CCR_HCLK_MASK (3 << 12)
++#define TC6393XB_CCR_HCLK_24 (0 << 12)
++#define TC6393XB_CCR_HCLK_48 (1 << 12)
+
+ struct tc6393xb_platform_data {
+ u16 scr_pll2cr; /* PLL2 Control */
+- union tc6393xb_scr_ccr scr_ccr; /* Clock Control */
+- union tc6393xb_scr_mcr scr_mcr; /* Mode Control */
++ u16 scr_ccr; /* Clock Control */
+ u16 scr_gper; /* GP Enable */
+ u32 scr_gpo_doecr; /* GPO Data OE Control */
+ u32 scr_gpo_dsr; /* GPO Data Set */
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0048-tc6393xb-GPIO-support.patch b/packages/linux/linux-rp-2.6.24/tosa/0048-tc6393xb-GPIO-support.patch
new file mode 100644
index 0000000000..ef47d6cc21
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0048-tc6393xb-GPIO-support.patch
@@ -0,0 +1,225 @@
+From 4fb4d83c7090ea21619bb652f2ea9b5c8c0c453e Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 01:42:58 +0300
+Subject: [PATCH 48/64] tc6393xb GPIO support
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/mfd/tc6393xb.c | 124 ++++++++++++++++++++++++++++++++++++++++--
+ include/linux/mfd/tc6393xb.h | 2 +-
+ 2 files changed, 119 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index 1a394e4..9001687 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -49,6 +49,8 @@ enum pincontrol {
+ #define TC6393XB_MCR_INT_EN BIT(7)
+ /* bits 8 - 16 are unknown */
+
++#include <asm/gpio.h>
++
+ struct tc6393xb_scr {
+ u8 x00[8];
+ u8 revid; /* 0x08 Revision ID */
+@@ -96,6 +98,8 @@ struct tc6393xb_scr {
+ struct tc6393xb {
+ struct tc6393xb_scr __iomem *scr;
+
++ struct gpio_chip gpio;
++
+ spinlock_t lock; /* protects RMW cycles */
+
+ struct {
+@@ -513,6 +517,96 @@ static struct mfd_cell tc6393xb_cells[] = {
+
+ /*--------------------------------------------------------------------------*/
+
++static int tc6393xb_gpio_get(struct gpio_chip *chip,
++ unsigned offset)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ u32 mask = 1 << offset;
++
++ return tmio_ioread32(scr->gpo_dsr) & mask;
++}
++
++static void __tc6393xb_gpio_set(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ u32 dsr;
++
++ dsr = tmio_ioread32(scr->gpo_dsr);
++ if (value)
++ dsr |= (1L << offset);
++ else
++ dsr &= ~(1L << offset);
++
++ tmio_iowrite32(dsr, scr->gpo_dsr);
++}
++
++static void tc6393xb_gpio_set(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ unsigned long flags;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ __tc6393xb_gpio_set(chip, offset, value);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++}
++
++static int tc6393xb_gpio_direction_input(struct gpio_chip *chip,
++ unsigned offset)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++ u32 doecr;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ doecr = tmio_ioread32(scr->gpo_doecr);
++
++ doecr &= ~(1 << offset);
++
++ tmio_iowrite32(doecr, scr->gpo_doecr);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++static int tc6393xb_gpio_direction_output(struct gpio_chip *chip,
++ unsigned offset, int value)
++{
++ struct tc6393xb *tc6393xb = container_of(chip,
++ struct tc6393xb, gpio);
++ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
++ unsigned long flags;
++ u32 doecr;
++
++ spin_lock_irqsave(&tc6393xb->lock, flags);
++
++ doecr = tmio_ioread32(scr->gpo_doecr);
++
++ doecr |= (1 << offset);
++
++ tmio_iowrite32(doecr, scr->gpo_doecr);
++
++ __tc6393xb_gpio_set(chip, offset, value);
++
++ spin_unlock_irqrestore(&tc6393xb->lock, flags);
++
++ return 0;
++}
++
++/*--------------------------------------------------------------------------*/
++
+ static void
+ tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
+ {
+@@ -631,10 +725,8 @@ static int tc6393xb_hw_init(struct platform_device *dev, int resume)
+ iowrite16(tcpd->scr_gper, &scr->gper);
+ iowrite8(0, &scr->irr);
+ iowrite8(0xbf, &scr->imr);
+- iowrite16(tcpd->scr_gpo_dsr, scr->gpo_dsr + 0);
+- iowrite16(tcpd->scr_gpo_dsr >> 16, scr->gpo_dsr + 1);
+- iowrite16(tcpd->scr_gpo_doecr, scr->gpo_doecr + 0);
+- iowrite16(tcpd->scr_gpo_doecr >> 16, scr->gpo_doecr + 1);
++ tmio_iowrite32(tcpd->scr_gpo_dsr, &scr->gpo_dsr);
++ tmio_iowrite32(tcpd->scr_gpo_doecr, &scr->gpo_doecr);
+
+ if (resume)
+ for (i = 0; i < 4; i++)
+@@ -650,7 +742,7 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ struct tc6393xb *tc6393xb;
+ struct resource *iomem;
+ struct resource *rscr;
+- int retval;
++ int retval, temp;
+
+ iomem = platform_get_resource(dev, IORESOURCE_MEM, 0);
+ if (!iomem)
+@@ -696,6 +788,18 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ ioread8(&tc6393xb->scr->revid),
+ (unsigned long) iomem->start, tc6393xb->irq);
+
++ tc6393xb->gpio.label = "tc6393xb";
++ tc6393xb->gpio.base = tcpd->gpio_base;
++ tc6393xb->gpio.ngpio = 16; /* FIXME: actually 32, but I'm not sure */
++ tc6393xb->gpio.set = tc6393xb_gpio_set;
++ tc6393xb->gpio.get = tc6393xb_gpio_get;
++ tc6393xb->gpio.direction_input = tc6393xb_gpio_direction_input;
++ tc6393xb->gpio.direction_output = tc6393xb_gpio_direction_output;
++
++ retval = gpiochip_add(&tc6393xb->gpio);
++ if (retval)
++ goto err_gpio_add;
++
+ if (tc6393xb->irq)
+ tc6393xb_attach_irq(dev);
+
+@@ -713,6 +817,8 @@ static int __devinit tc6393xb_probe(struct platform_device *dev)
+ if (tc6393xb->irq)
+ tc6393xb_detach_irq(dev);
+
++err_gpio_add:
++ temp = gpiochip_remove(&tc6393xb->gpio);
+ err_hw_init:
+ tcpd->disable(dev);
+ err_enable:
+@@ -734,6 +840,12 @@ static int __devexit tc6393xb_remove(struct platform_device *dev) {
+ if (tc6393xb->irq)
+ tc6393xb_detach_irq(dev);
+
++ ret = gpiochip_remove(&tc6393xb->gpio);
++ if (ret) {
++ dev_err(&dev->dev, "Can't remove gpio chip: %d\n", ret);
++ return ret;
++ }
++
+ ret = tcpd->disable(dev);
+
+ iounmap(tc6393xb->scr);
+@@ -804,7 +916,7 @@ static void __exit tc6393xb_exit(void)
+ platform_driver_unregister(&tc6393xb_driver);
+ }
+
+-module_init(tc6393xb_init);
++subsys_initcall(tc6393xb_init);
+ module_exit(tc6393xb_exit);
+
+ MODULE_LICENSE("GPL");
+diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
+index 2c69f63..97c4c7c 100644
+--- a/include/linux/mfd/tc6393xb.h
++++ b/include/linux/mfd/tc6393xb.h
+@@ -45,6 +45,7 @@ struct tc6393xb_platform_data {
+ int (*resume)(struct platform_device *dev);
+
+ int irq_base; /* a base for cascaded irq */
++ int gpio_base;
+
+ struct tmio_nand_data *nand_data;
+ struct tmio_fb_data *fb_data;
+@@ -54,7 +55,6 @@ extern int tc6393xb_lcd_set_power(struct platform_device *fb_dev, bool on);
+ extern int tc6393xb_lcd_mode(struct platform_device *fb_dev,
+ struct fb_videomode *mode);
+
+-
+ /*
+ * Relative to irq_base
+ */
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0049-platform-support-for-TMIO-on-tosa.patch b/packages/linux/linux-rp-2.6.24/tosa/0049-platform-support-for-TMIO-on-tosa.patch
new file mode 100644
index 0000000000..ff1186cb71
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0049-platform-support-for-TMIO-on-tosa.patch
@@ -0,0 +1,373 @@
+From 30588bdd5c5cdd9fbe269643f582862a76f09efb Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Tue, 12 Feb 2008 04:52:48 +0300
+Subject: [PATCH 49/64] platform support for TMIO on tosa
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 179 ++++++++++++++++++++++++++++++++++++++-
+ include/asm-arm/arch-pxa/irqs.h | 1 +
+ include/asm-arm/arch-pxa/tosa.h | 45 ++++++++--
+ sound/soc/pxa/tosa.c | 3 +-
+ 4 files changed, 216 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 5268e94..e2eec0f 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -18,7 +18,13 @@
+ #include <linux/major.h>
+ #include <linux/fs.h>
+ #include <linux/interrupt.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
+ #include <linux/mmc/host.h>
++#include <linux/mfd/tc6393xb.h>
++#include <linux/mfd/tmio.h>
++#include <linux/mtd/nand.h>
++#include <linux/mtd/partitions.h>
+ #include <linux/pm.h>
+ #include <linux/delay.h>
+ #include <linux/gpio_keys.h>
+@@ -298,12 +304,183 @@ static struct platform_device tosaled_device = {
+ .id = -1,
+ };
+
++/*
++ * Toshiba Mobile IO Controller
++ */
++static struct resource tc6393xb_resources[] = {
++ [0] = {
++ .start = TOSA_LCDC_PHYS,
++ .end = TOSA_LCDC_PHYS + 0x3ffffff,
++ .flags = IORESOURCE_MEM,
++ },
++
++ [1] = {
++ .start = TOSA_IRQ_GPIO_TC6393XB_INT,
++ .end = TOSA_IRQ_GPIO_TC6393XB_INT,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++
++static int tosa_tc6393xb_enable(struct platform_device *dev)
++{
++
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ reset_scoop_gpio(&tosascoop_device.dev, TOSA_SCOOP_TC6393XB_REST_IN); /* #PCLR */
++ pxa_gpio_mode(GPIO11_3_6MHz_MD);
++ pxa_gpio_mode(GPIO18_RDY_MD);
++ mdelay(1);
++ set_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ mdelay(10);
++ set_scoop_gpio(&tosascoop_device.dev, TOSA_SCOOP_TC6393XB_REST_IN); /* #PCLR */
++ set_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++
++ return 0;
++}
++
++static int tosa_tc6393xb_disable(struct platform_device *dev)
++{
++
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ reset_scoop_gpio(&tosascoop_device.dev, TOSA_SCOOP_TC6393XB_REST_IN); /* #PCLR */
++ pxa_gpio_mode(GPIO11_3_6MHz_MD|GPIO_OUT);
++ GPSR0 = GPIO_bit(GPIO11_3_6MHz);
++
++ return 0;
++}
++
++static int tosa_tc6393xb_resume(struct platform_device *dev)
++{
++
++ pxa_gpio_mode(GPIO11_3_6MHz_MD);
++ pxa_gpio_mode(GPIO18_RDY_MD);
++ mdelay(1);
++ set_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ mdelay(10);
++ set_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ mdelay(10);
++
++ return 0;
++}
++
++static int tosa_tc6393xb_suspend(struct platform_device *dev)
++{
++
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ reset_scoop_gpio(&tosascoop_jc_device.dev, TOSA_SCOOP_JC_TC6393XB_SUSPEND);
++ pxa_gpio_mode(GPIO11_3_6MHz_MD|GPIO_OUT);
++ GPSR0 = GPIO_bit(GPIO11_3_6MHz);
++
++ return 0;
++}
++
++static struct mtd_partition tosa_nand_partition[] = {
++ {
++ .name = "smf",
++ .offset = 0,
++ .size = 7 * 1024 * 1024,
++ },
++ {
++ .name = "root",
++ .offset = MTDPART_OFS_APPEND,
++ .size = 28 * 1024 * 1024,
++ },
++ {
++ .name = "home",
++ .offset = MTDPART_OFS_APPEND,
++ .size = MTDPART_SIZ_FULL,
++ },
++};
++
++static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
++
++static struct nand_bbt_descr tosa_tc6393xb_nand_bbt = {
++ .options = 0,
++ .offs = 4,
++ .len = 2,
++ .pattern = scan_ff_pattern
++};
++
++static struct tmio_nand_data tosa_tc6393xb_nand_config = {
++ .num_partitions = ARRAY_SIZE(tosa_nand_partition),
++ .partition = tosa_nand_partition,
++ .badblock_pattern = &tosa_tc6393xb_nand_bbt,
++};
++
++static struct fb_videomode tosa_tc6393xb_lcd_mode[] = {
++ {
++ .xres = 480,
++ .yres = 640,
++ .pixclock = 0x002cdf00,/* PLL divisor */
++ .left_margin = 0x004c,
++ .right_margin = 0x005b,
++ .upper_margin = 0x0001,
++ .lower_margin = 0x000d,
++ .hsync_len = 0x0002,
++ .vsync_len = 0x0001,
++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++ .vmode = FB_VMODE_NONINTERLACED,
++ },{
++ .xres = 240,
++ .yres = 320,
++ .pixclock = 0x00e7f203,/* PLL divisor */
++ .left_margin = 0x0024,
++ .right_margin = 0x002f,
++ .upper_margin = 0x0001,
++ .lower_margin = 0x000d,
++ .hsync_len = 0x0002,
++ .vsync_len = 0x0001,
++ .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
++ .vmode = FB_VMODE_NONINTERLACED,
++ }
++};
++
++static struct tmio_fb_data tosa_tc6393xb_fb_config = {
++ .lcd_set_power = tc6393xb_lcd_set_power,
++ .lcd_mode = tc6393xb_lcd_mode,
++ .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
++ .modes = &tosa_tc6393xb_lcd_mode[0],
++};
++
++static struct tc6393xb_platform_data tosa_tc6393xb_setup = {
++ .scr_pll2cr = 0x0cc1,
++ .scr_ccr = TC6393XB_CCR_UNK1 | TC6393XB_CCR_HCLK_48,
++ .scr_gper = 0x3300,
++ .scr_gpo_dsr = TOSA_TC6393XB_CARD_VCC_ON | TOSA_TC6393XB_CHARGE_OFF_JC,
++ .scr_gpo_doecr = TOSA_TC6393XB_GPO_OE,
++
++ .irq_base = IRQ_BOARD_START,
++
++ .enable = tosa_tc6393xb_enable,
++ .disable = tosa_tc6393xb_disable,
++ .suspend = tosa_tc6393xb_suspend,
++ .resume = tosa_tc6393xb_resume,
++
++ .nand_data = &tosa_tc6393xb_nand_config,
++ .fb_data = &tosa_tc6393xb_fb_config,
++};
++
++
++struct platform_device tc6393xb_device = {
++ .name = "tc6393xb",
++ .id = -1,
++ .dev = {
++ .platform_data = &tosa_tc6393xb_setup,
++ },
++ .num_resources = ARRAY_SIZE(tc6393xb_resources),
++ .resource = tc6393xb_resources,
++};
++EXPORT_SYMBOL(tc6393xb_device);
++
+ static struct platform_device *devices[] __initdata = {
+ &tosascoop_device,
+ &tosascoop_jc_device,
+ &tosakbd_device,
+ &tosa_gpio_keys_device,
+ &tosaled_device,
++ &tc6393xb_device,
+ };
+
+ static void tosa_poweroff(void)
+@@ -332,7 +509,7 @@ static void __init tosa_init(void)
+ arm_pm_restart = tosa_restart;
+
+ pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
+- pxa_gpio_mode(TOSA_GPIO_TC6393_INT | GPIO_IN);
++ pxa_gpio_mode(TOSA_GPIO_TC6393XB_INT | GPIO_IN);
+ pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
+
+ /* setup sleep mode values */
+diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
+index b76ee6d..bf622d8 100644
+--- a/include/asm-arm/arch-pxa/irqs.h
++++ b/include/asm-arm/arch-pxa/irqs.h
+@@ -180,6 +180,7 @@
+ #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1)
+ #elif defined(CONFIG_ARCH_LUBBOCK) || \
+ defined(CONFIG_MACH_LOGICPD_PXA270) || \
++ defined(CONFIG_MACH_TOSA) || \
+ defined(CONFIG_MACH_MAINSTONE)
+ #define NR_IRQS (IRQ_BOARD_END)
+ #else
+diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h
+index c05e4fa..1b202b2 100644
+--- a/include/asm-arm/arch-pxa/tosa.h
++++ b/include/asm-arm/arch-pxa/tosa.h
+@@ -20,11 +20,35 @@
+ /* Jacket Scoop */
+ #define TOSA_SCOOP_PHYS (PXA_CS5_PHYS + 0x00800000)
+
++#define TC6393XB_GPIO(i) (1 << (i))
++/*
++ * TC6393 GPIOs
++ */
++#define TOSA_TC6393XB_TG_ON TC6393XB_GPIO(0)
++#define TOSA_TC6393XB_L_MUTE TC6393XB_GPIO(1)
++#define TOSA_TC6393XB_BL_C20MA TC6393XB_GPIO(3)
++#define TOSA_TC6393XB_CARD_VCC_ON TC6393XB_GPIO(4)
++#define TOSA_TC6393XB_CHARGE_OFF TC6393XB_GPIO(6)
++#define TOSA_TC6393XB_CHARGE_OFF_JC TC6393XB_GPIO(7)
++#define TOSA_TC6393XB_BAT0_V_ON TC6393XB_GPIO(9)
++#define TOSA_TC6393XB_BAT1_V_ON TC6393XB_GPIO(10)
++#define TOSA_TC6393XB_BU_CHRG_ON TC6393XB_GPIO(11)
++#define TOSA_TC6393XB_BAT_SW_ON TC6393XB_GPIO(12)
++#define TOSA_TC6393XB_BAT0_TH_ON TC6393XB_GPIO(14)
++#define TOSA_TC6393XB_BAT1_TH_ON TC6393XB_GPIO(15)
++
++#define TOSA_TC6393XB_GPO_OE (TOSA_TC6393XB_TG_ON | TOSA_TC6393XB_L_MUTE | TOSA_TC6393XB_BL_C20MA | \
++ TOSA_TC6393XB_CARD_VCC_ON | TOSA_TC6393XB_CHARGE_OFF | \
++ TOSA_TC6393XB_CHARGE_OFF_JC | TOSA_TC6393XB_BAT0_V_ON | \
++ TOSA_TC6393XB_BAT1_V_ON | TOSA_TC6393XB_BU_CHRG_ON | \
++ TOSA_TC6393XB_BAT_SW_ON | TOSA_TC6393XB_BAT0_TH_ON | \
++ TOSA_TC6393XB_BAT1_TH_ON)
++
+ /*
+ * SCOOP2 internal GPIOs
+ */
+ #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11
+-#define TOSA_SCOOP_TC6393_REST_IN SCOOP_GPCR_PA12
++#define TOSA_SCOOP_TC6393XB_REST_IN SCOOP_GPCR_PA12
+ #define TOSA_SCOOP_IR_POWERDWN SCOOP_GPCR_PA13
+ #define TOSA_SCOOP_SD_WP SCOOP_GPCR_PA14
+ #define TOSA_SCOOP_PWR_ON SCOOP_GPCR_PA15
+@@ -34,11 +58,11 @@
+ #define TOSA_SCOOP_AC_IN_OL SCOOP_GPCR_PA19
+
+ /* GPIO Direction 1 : output mode / 0:input mode */
+-#define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393_REST_IN | \
++#define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393XB_REST_IN | \
+ TOSA_SCOOP_IR_POWERDWN | TOSA_SCOOP_PWR_ON | TOSA_SCOOP_AUD_PWR_ON |\
+ TOSA_SCOOP_BT_RESET | TOSA_SCOOP_BT_PWR_EN )
+ /* GPIO out put level when init 1: Hi */
+-#define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393_REST_IN )
++#define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393XB_REST_IN )
+
+ /*
+ * SCOOP2 jacket GPIOs
+@@ -47,8 +71,8 @@
+ #define TOSA_SCOOP_JC_NOTE_LED SCOOP_GPCR_PA12
+ #define TOSA_SCOOP_JC_CHRG_ERR_LED SCOOP_GPCR_PA13
+ #define TOSA_SCOOP_JC_USB_PULLUP SCOOP_GPCR_PA14
+-#define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15
+-#define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16
++#define TOSA_SCOOP_JC_TC6393XB_SUSPEND SCOOP_GPCR_PA15
++#define TOSA_SCOOP_JC_TC6393XB_L3V_ON SCOOP_GPCR_PA16
+ #define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17
+ #define TOSA_SCOOP_JC_WLAN_LED SCOOP_GPCR_PA18
+ #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19
+@@ -56,7 +80,7 @@
+ /* GPIO Direction 1 : output mode / 0:input mode */
+ #define TOSA_SCOOP_JC_IO_DIR ( TOSA_SCOOP_JC_BT_LED | TOSA_SCOOP_JC_NOTE_LED | \
+ TOSA_SCOOP_JC_CHRG_ERR_LED | TOSA_SCOOP_JC_USB_PULLUP | \
+- TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \
++ TOSA_SCOOP_JC_TC6393XB_SUSPEND | TOSA_SCOOP_JC_TC6393XB_L3V_ON | \
+ TOSA_SCOOP_JC_WLAN_LED | TOSA_SCOOP_JC_CARD_LIMIT_SEL )
+ /* GPIO out put level when init 1: Hi */
+ #define TOSA_SCOOP_JC_IO_OUT ( 0 )
+@@ -94,13 +118,13 @@
+ #define TOSA_GPIO_JACKET_DETECT (7)
+ #define TOSA_GPIO_nSD_DETECT (9)
+ #define TOSA_GPIO_nSD_INT (10)
+-#define TOSA_GPIO_TC6393_CLK (11)
++#define TOSA_GPIO_TC6393XB_CLK (11)
+ #define TOSA_GPIO_BAT1_CRG (12)
+ #define TOSA_GPIO_CF_CD (13)
+ #define TOSA_GPIO_BAT0_CRG (14)
+-#define TOSA_GPIO_TC6393_INT (15)
++#define TOSA_GPIO_TC6393XB_INT (15)
+ #define TOSA_GPIO_BAT0_LOW (17)
+-#define TOSA_GPIO_TC6393_RDY (18)
++#define TOSA_GPIO_TC6393XB_RDY (18)
+ #define TOSA_GPIO_ON_RESET (19)
+ #define TOSA_GPIO_EAR_IN (20)
+ #define TOSA_GPIO_CF_IRQ (21) /* CF slot0 Ready */
+@@ -147,7 +171,7 @@
+ #define TOSA_IRQ_GPIO_BAT1_CRG IRQ_GPIO(TOSA_GPIO_BAT1_CRG)
+ #define TOSA_IRQ_GPIO_CF_CD IRQ_GPIO(TOSA_GPIO_CF_CD)
+ #define TOSA_IRQ_GPIO_BAT0_CRG IRQ_GPIO(TOSA_GPIO_BAT0_CRG)
+-#define TOSA_IRQ_GPIO_TC6393_INT IRQ_GPIO(TOSA_GPIO_TC6393_INT)
++#define TOSA_IRQ_GPIO_TC6393XB_INT IRQ_GPIO(TOSA_GPIO_TC6393XB_INT)
+ #define TOSA_IRQ_GPIO_BAT0_LOW IRQ_GPIO(TOSA_GPIO_BAT0_LOW)
+ #define TOSA_IRQ_GPIO_EAR_IN IRQ_GPIO(TOSA_GPIO_EAR_IN)
+ #define TOSA_IRQ_GPIO_CF_IRQ IRQ_GPIO(TOSA_GPIO_CF_IRQ)
+@@ -161,6 +185,7 @@
+
+ #define TOSA_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(TOSA_GPIO_MAIN_BAT_LOW)
+
++extern struct platform_device tc6393xb_device;
+ extern struct platform_device tosascoop_jc_device;
+ extern struct platform_device tosascoop_device;
+
+diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
+index 5504e30..21c51b5 100644
+--- a/sound/soc/pxa/tosa.c
++++ b/sound/soc/pxa/tosa.c
+@@ -32,7 +32,6 @@
+ #include <sound/soc-dapm.h>
+
+ #include <asm/mach-types.h>
+-#include <asm/hardware/tmio.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/hardware.h>
+ #include <asm/arch/audio.h>
+@@ -138,10 +137,12 @@ static int tosa_set_spk(struct snd_kcontrol *kcontrol,
+ /* tosa dapm event handlers */
+ static int tosa_hp_event(struct snd_soc_dapm_widget *w, int event)
+ {
++#if 0
+ if (SND_SOC_DAPM_EVENT_ON(event))
+ set_tc6393_gpio(&tc6393_device.dev,TOSA_TC6393_L_MUTE);
+ else
+ reset_tc6393_gpio(&tc6393_device.dev,TOSA_TC6393_L_MUTE);
++#endif
+ return 0;
+ }
+
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0050-tosa-update-for-tc6393xb-gpio.patch b/packages/linux/linux-rp-2.6.24/tosa/0050-tosa-update-for-tc6393xb-gpio.patch
new file mode 100644
index 0000000000..c9b5ac29d4
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0050-tosa-update-for-tc6393xb-gpio.patch
@@ -0,0 +1,99 @@
+From f24c23ba56cdd072b332e8de3e0cff8a31e7e36a Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:03:19 +0300
+Subject: [PATCH 50/64] tosa update for tc6393xb gpio
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 6 +++++-
+ include/asm-arm/arch-pxa/tosa.h | 36 ++++++++++++++++++++++++------------
+ 2 files changed, 29 insertions(+), 13 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index e2eec0f..3e832dc 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -35,6 +35,7 @@
+ #include <asm/mach-types.h>
+ #include <asm/hardware.h>
+ #include <asm/irq.h>
++#include <asm/gpio.h>
+ #include <asm/system.h>
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/irda.h>
+@@ -448,10 +449,13 @@ static struct tc6393xb_platform_data tosa_tc6393xb_setup = {
+ .scr_pll2cr = 0x0cc1,
+ .scr_ccr = TC6393XB_CCR_UNK1 | TC6393XB_CCR_HCLK_48,
+ .scr_gper = 0x3300,
+- .scr_gpo_dsr = TOSA_TC6393XB_CARD_VCC_ON | TOSA_TC6393XB_CHARGE_OFF_JC,
++ .scr_gpo_dsr =
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CARD_VCC_ON) |
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CHARGE_OFF_JC),
+ .scr_gpo_doecr = TOSA_TC6393XB_GPO_OE,
+
+ .irq_base = IRQ_BOARD_START,
++ .gpio_base = TOSA_TC6393XB_GPIO_BASE,
+
+ .enable = tosa_tc6393xb_enable,
+ .disable = tosa_tc6393xb_disable,
+diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h
+index 1b202b2..410fa9a 100644
+--- a/include/asm-arm/arch-pxa/tosa.h
++++ b/include/asm-arm/arch-pxa/tosa.h
+@@ -20,16 +20,21 @@
+ /* Jacket Scoop */
+ #define TOSA_SCOOP_PHYS (PXA_CS5_PHYS + 0x00800000)
+
+-#define TC6393XB_GPIO(i) (1 << (i))
+ /*
+ * TC6393 GPIOs
+ */
+-#define TOSA_TC6393XB_TG_ON TC6393XB_GPIO(0)
+-#define TOSA_TC6393XB_L_MUTE TC6393XB_GPIO(1)
+-#define TOSA_TC6393XB_BL_C20MA TC6393XB_GPIO(3)
+-#define TOSA_TC6393XB_CARD_VCC_ON TC6393XB_GPIO(4)
++
++#define TOSA_TC6393XB_GPIO_BASE NR_BUILTIN_GPIO
++
++#define TC6393XB_GPIO(i) (TOSA_TC6393XB_GPIO_BASE + (i))
++#define TC6393XB_GPIO_BIT(gpio) (1 << (gpio - TOSA_TC6393XB_GPIO_BASE))
++
++#define TOSA_TC6393XB_TG_ON TC6393XB_GPIO(0)
++#define TOSA_TC6393XB_L_MUTE TC6393XB_GPIO(1)
++#define TOSA_TC6393XB_BL_C20MA TC6393XB_GPIO(3)
++#define TOSA_TC6393XB_CARD_VCC_ON TC6393XB_GPIO(4)
+ #define TOSA_TC6393XB_CHARGE_OFF TC6393XB_GPIO(6)
+-#define TOSA_TC6393XB_CHARGE_OFF_JC TC6393XB_GPIO(7)
++#define TOSA_TC6393XB_CHARGE_OFF_JC TC6393XB_GPIO(7)
+ #define TOSA_TC6393XB_BAT0_V_ON TC6393XB_GPIO(9)
+ #define TOSA_TC6393XB_BAT1_V_ON TC6393XB_GPIO(10)
+ #define TOSA_TC6393XB_BU_CHRG_ON TC6393XB_GPIO(11)
+@@ -37,12 +42,19 @@
+ #define TOSA_TC6393XB_BAT0_TH_ON TC6393XB_GPIO(14)
+ #define TOSA_TC6393XB_BAT1_TH_ON TC6393XB_GPIO(15)
+
+-#define TOSA_TC6393XB_GPO_OE (TOSA_TC6393XB_TG_ON | TOSA_TC6393XB_L_MUTE | TOSA_TC6393XB_BL_C20MA | \
+- TOSA_TC6393XB_CARD_VCC_ON | TOSA_TC6393XB_CHARGE_OFF | \
+- TOSA_TC6393XB_CHARGE_OFF_JC | TOSA_TC6393XB_BAT0_V_ON | \
+- TOSA_TC6393XB_BAT1_V_ON | TOSA_TC6393XB_BU_CHRG_ON | \
+- TOSA_TC6393XB_BAT_SW_ON | TOSA_TC6393XB_BAT0_TH_ON | \
+- TOSA_TC6393XB_BAT1_TH_ON)
++#define TOSA_TC6393XB_GPO_OE ( \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_TG_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_L_MUTE) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BL_C20MA) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CARD_VCC_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CHARGE_OFF) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_CHARGE_OFF_JC) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT0_V_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT1_V_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BU_CHRG_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT_SW_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT0_TH_ON) | \
++ TC6393XB_GPIO_BIT(TOSA_TC6393XB_BAT1_TH_ON))
+
+ /*
+ * SCOOP2 internal GPIOs
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch b/packages/linux/linux-rp-2.6.24/tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch
new file mode 100644
index 0000000000..585f1af288
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch
@@ -0,0 +1,86 @@
+From 38ef1b452cc3138157b92d02b31cad439d12d0ca Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:03:34 +0300
+Subject: [PATCH 51/64] fix sound/soc/pxa/tosa.c to new gpio api
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ sound/soc/pxa/tosa.c | 33 ++++++++++++++++++++++++++-------
+ 1 files changed, 26 insertions(+), 7 deletions(-)
+
+diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
+index 21c51b5..b758de8 100644
+--- a/sound/soc/pxa/tosa.c
++++ b/sound/soc/pxa/tosa.c
+@@ -36,6 +36,7 @@
+ #include <asm/arch/hardware.h>
+ #include <asm/arch/audio.h>
+ #include <asm/arch/tosa.h>
++#include <asm/gpio.h>
+
+ #include "../codecs/wm9712.h"
+ #include "pxa2xx-pcm.h"
+@@ -137,11 +138,11 @@ static int tosa_set_spk(struct snd_kcontrol *kcontrol,
+ /* tosa dapm event handlers */
+ static int tosa_hp_event(struct snd_soc_dapm_widget *w, int event)
+ {
+-#if 0
++#ifdef CONFIG_MFD_TC6393XB
+ if (SND_SOC_DAPM_EVENT_ON(event))
+- set_tc6393_gpio(&tc6393_device.dev,TOSA_TC6393_L_MUTE);
++ gpio_set_value(TOSA_TC6393XB_L_MUTE, 1);
+ else
+- reset_tc6393_gpio(&tc6393_device.dev,TOSA_TC6393_L_MUTE);
++ gpio_set_value(TOSA_TC6393XB_L_MUTE, 0);
+ #endif
+ return 0;
+ }
+@@ -262,16 +263,31 @@ static int __init tosa_init(void)
+ if (!machine_is_tosa())
+ return -ENODEV;
+
++#ifdef CONFIG_MFD_TC6393XB
++ ret = gpio_request(TOSA_TC6393XB_L_MUTE, "Headphone Jack");
++ if (ret)
++ return ret;
++ gpio_direction_output(TOSA_TC6393XB_L_MUTE, 0);
++#endif
+ tosa_snd_device = platform_device_alloc("soc-audio", -1);
+- if (!tosa_snd_device)
+- return -ENOMEM;
++ if (!tosa_snd_device) {
++ ret = -ENOMEM;
++ goto err_alloc;
++ }
+
+ platform_set_drvdata(tosa_snd_device, &tosa_snd_devdata);
+ tosa_snd_devdata.dev = &tosa_snd_device->dev;
+ ret = platform_device_add(tosa_snd_device);
+
+- if (ret)
+- platform_device_put(tosa_snd_device);
++ if (!ret)
++ return 0;
++
++ platform_device_put(tosa_snd_device);
++
++err_alloc:
++#ifdef CONFIG_MFD_TC6393XB
++ gpio_free(TOSA_TC6393XB_L_MUTE);
++#endif
+
+ return ret;
+ }
+@@ -279,6 +295,9 @@ static int __init tosa_init(void)
+ static void __exit tosa_exit(void)
+ {
+ platform_device_unregister(tosa_snd_device);
++#ifdef CONFIG_MFD_TC6393XB
++ gpio_free(TOSA_TC6393XB_L_MUTE);
++#endif
+ }
+
+ module_init(tosa_init);
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0052-tosa-platform-backlight-support.patch b/packages/linux/linux-rp-2.6.24/tosa/0052-tosa-platform-backlight-support.patch
new file mode 100644
index 0000000000..ef5263c18e
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0052-tosa-platform-backlight-support.patch
@@ -0,0 +1,400 @@
+From c7537657bc33d4ee1616accd0259e160d57c5c1b Mon Sep 17 00:00:00 2001
+From: Ian Molton <spyro@f2s.com>
+Date: Wed, 9 Jan 2008 02:05:40 +0300
+Subject: [PATCH 52/64] tosa platform backlight support
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/video/backlight/Kconfig | 10 +
+ drivers/video/backlight/Makefile | 1 +
+ drivers/video/backlight/tosa_bl.c | 345 +++++++++++++++++++++++++++++++++++++
+ 3 files changed, 356 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/video/backlight/tosa_bl.c
+
+diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
+index 9609a6c..f47a601 100644
+--- a/drivers/video/backlight/Kconfig
++++ b/drivers/video/backlight/Kconfig
+@@ -59,6 +59,16 @@ config BACKLIGHT_CORGI
+ known as the Corgi backlight driver. If you have a Sharp Zaurus
+ SL-C7xx, SL-Cxx00 or SL-6000x say y. Most users can say n.
+
++config BACKLIGHT_TOSA
++ tristate "Sharp Tosa LCD/Backlight Driver (SL-6000)"
++ depends on BACKLIGHT_CLASS_DEVICE && MACH_TOSA
++ default y
++ select I2C
++ select I2C_PXA
++ select PXA_SSP
++ help
++ If you have a Sharp Zaurus SL-6000y enable this driver.
++
+ config BACKLIGHT_LOCOMO
+ tristate "Sharp LOCOMO LCD/Backlight Driver"
+ depends on BACKLIGHT_CLASS_DEVICE && SHARP_LOCOMO
+diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
+index 965a78b..e8a6a7c 100644
+--- a/drivers/video/backlight/Makefile
++++ b/drivers/video/backlight/Makefile
+@@ -5,6 +5,7 @@ obj-$(CONFIG_LCD_LTV350QV) += ltv350qv.o
+
+ obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
+ obj-$(CONFIG_BACKLIGHT_CORGI) += corgi_bl.o
++obj-$(CONFIG_BACKLIGHT_TOSA) += tosa_bl.o
+ obj-$(CONFIG_BACKLIGHT_HP680) += hp680_bl.o
+ obj-$(CONFIG_BACKLIGHT_LOCOMO) += locomolcd.o
+ obj-$(CONFIG_BACKLIGHT_PROGEAR) += progear_bl.o
+diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c
+new file mode 100644
+index 0000000..11a89c6
+--- /dev/null
++++ b/drivers/video/backlight/tosa_bl.c
+@@ -0,0 +1,345 @@
++/*
++ * LCD / Backlight control code for Sharp SL-6000x (tosa)
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ * Copyright (c) 2007 Dmitry Baryshkov
++ *
++ * 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.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/i2c.h>
++#include <linux/backlight.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/fb.h>
++#include <linux/mfd/tc6393xb.h>
++
++#include <asm/hardware/scoop.h>
++#include <asm/mach/sharpsl_param.h>
++#include <asm/arch/ssp.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/tosa.h>
++#include <asm/gpio.h>
++
++#define DAC_BASE 0x4e
++#define DAC_CH1 0
++#define DAC_CH2 1
++
++#define TG_REG0_VQV 0x0001
++#define TG_REG0_COLOR 0x0002
++#define TG_REG0_UD 0x0004
++#define TG_REG0_LR 0x0008
++#define COMADJ_DEFAULT 97
++
++static unsigned short normal_i2c[] = { DAC_BASE, I2C_CLIENT_END };
++I2C_CLIENT_INSMOD;
++
++struct tosa_bl_data {
++ struct i2c_client client;
++
++ int comadj;
++ spinlock_t nssp_lock;
++ struct ssp_dev nssp_dev;
++ struct ssp_state nssp_state;
++
++ struct backlight_device *bl_dev;
++};
++
++static struct i2c_driver tosa_bl_driver;
++
++static void pxa_nssp_output(struct tosa_bl_data *data, unsigned char reg, unsigned char value)
++{
++ unsigned long flag;
++ u32 dummy;
++ u32 dat = ( ((reg << 5) & 0xe0) | (value & 0x1f) );
++ spin_lock_irqsave(&data->nssp_lock, flag);
++
++ ssp_config(&data->nssp_dev, (SSCR0_Motorola | (SSCR0_DSS & 0x07 )), 0, 0, SSCR0_SerClkDiv(128));
++ ssp_enable(&data->nssp_dev);
++
++ ssp_write_word(&data->nssp_dev,dat);
++
++ /* Read null data back from device to prevent SSP overflow */
++ ssp_read_word(&data->nssp_dev, &dummy);
++ ssp_disable(&data->nssp_dev);
++ spin_unlock_irqrestore(&data->nssp_lock, flag);
++
++}
++
++static void tosa_set_backlight(struct tosa_bl_data *data, int brightness)
++{
++ /* SetBacklightDuty */
++ i2c_smbus_write_byte_data(&data->client, DAC_CH2, (unsigned char)brightness);
++
++ /* SetBacklightVR */
++ if (brightness)
++ gpio_set_value(TOSA_TC6393XB_BL_C20MA, 1);
++ else
++ gpio_set_value(TOSA_TC6393XB_BL_C20MA, 0);
++
++ /* bl_enable GP04=1 otherwise GP04=0*/
++ pxa_nssp_output(data, TG_GPODR2, brightness ? 0x01 : 0x00);
++}
++
++static void tosa_lcd_tg_init(struct tosa_bl_data *data)
++{
++ dev_dbg(&data->bl_dev->dev, "tosa_lcd_init\n");
++
++ /* L3V On */
++ set_scoop_gpio( &tosascoop_jc_device.dev,TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++ mdelay(60);
++
++ /* TG On */
++ gpio_set_value(TOSA_TC6393XB_TG_ON, 0);
++ mdelay(60);
++
++ pxa_nssp_output(data, TG_TPOSCTL,0x00); /* delayed 0clk TCTL signal for VGA */
++ pxa_nssp_output(data, TG_GPOSR,0x02); /* GPOS0=powercontrol, GPOS1=GPIO, GPOS2=TCTL */
++}
++
++static void tosa_lcd_tg_on(struct tosa_bl_data *data/*, const struct fb_videomode *mode*/)
++{
++ const int value = TG_REG0_COLOR | TG_REG0_UD | TG_REG0_LR;
++
++ tosa_lcd_tg_init(data);
++
++ dev_dbg(&data->bl_dev->dev, "tosa_lcd_on\n");
++ pxa_nssp_output(data, TG_PNLCTL, value | (/*mode->yres == 320 ? 0 : */ TG_REG0_VQV));
++
++ /* TG LCD pannel power up */
++ pxa_nssp_output(data, TG_PINICTL,0x4);
++ mdelay(50);
++
++ /* TG LCD GVSS */
++ pxa_nssp_output(data, TG_PINICTL,0x0);
++ mdelay(50);
++
++ /* set common voltage */
++ i2c_smbus_write_byte_data(&data->client, DAC_CH1, data->comadj);
++}
++
++static void tosa_lcd_tg_off(struct tosa_bl_data *data)
++{
++ tosa_set_backlight(data, 0);
++ dev_dbg(&data->bl_dev->dev, "tosa_lcd_off\n");
++ /* TG LCD VHSA off */
++ pxa_nssp_output(data, TG_PINICTL,0x4);
++ mdelay(50);
++
++ /* TG LCD signal off */
++ pxa_nssp_output(data, TG_PINICTL,0x6);
++ mdelay(50);
++
++ /* TG Off */
++ gpio_set_value(TOSA_TC6393XB_TG_ON, 1);
++ mdelay(100);
++
++ /* L3V Off */
++ reset_scoop_gpio( &tosascoop_jc_device.dev,TOSA_SCOOP_JC_TC6393XB_L3V_ON);
++}
++
++
++static int tosa_bl_update_status(struct backlight_device *dev)
++{
++ struct backlight_properties *props = &dev->props;
++ struct tosa_bl_data *data = dev_get_drvdata(&dev->dev);
++ int new_power = max(props->power, props->fb_blank);
++
++ tosa_set_backlight(data, props->brightness);
++
++ if (new_power)
++ tosa_lcd_tg_off(data);
++ else
++ tosa_lcd_tg_on(data);
++
++ return 0;
++}
++
++static int tosa_bl_get_brightness(struct backlight_device *dev)
++{
++ struct backlight_properties *props = &dev->props;
++
++ return props->brightness;
++}
++
++static struct backlight_ops tosa_bl_ops = {
++ .get_brightness = tosa_bl_get_brightness,
++ .update_status = tosa_bl_update_status,
++};
++
++static int tosa_bl_detect_client(struct i2c_adapter *adapter, int address,
++ int kind)
++{
++ int err = 0;
++ struct i2c_client *client;
++ struct tosa_bl_data *data;
++
++ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA ))
++ goto out;
++
++ if (!(data = kzalloc(sizeof(struct tosa_bl_data), GFP_KERNEL))) {
++ err = -ENOMEM;
++ goto out;
++ }
++
++ client = &data->client;
++ i2c_set_clientdata(client, data);
++
++ client->addr = address;
++ client->adapter = adapter;
++ client->driver = &tosa_bl_driver;
++
++ strlcpy(client->name, "tosa_bl", I2C_NAME_SIZE);
++
++ spin_lock_init(&data->nssp_lock);
++ data->comadj = sharpsl_param.comadj == -1 ? COMADJ_DEFAULT : sharpsl_param.comadj;
++
++ err = gpio_request(TOSA_TC6393XB_BL_C20MA, "backlight");
++ if (err) {
++ dev_dbg(&data->bl_dev->dev, "Unable to request gpio!\n");
++ goto err_gpio_bl;
++ }
++
++ err = gpio_request(TOSA_TC6393XB_TG_ON, "tg");
++ if (err) {
++ dev_dbg(&data->bl_dev->dev, "Unable to request gpio!\n");
++ goto err_gpio_tg;
++ }
++
++ err = ssp_init(&data->nssp_dev,2,0);
++ if (err) {
++ dev_err(&data->bl_dev->dev, "Unable to register NSSP handler!\n");
++ goto err_ssp_init;
++ }
++
++ /* Tell the i2c layer a new client has arrived */
++ err = i2c_attach_client(client);
++ if (err)
++ goto err_i2c_attach;
++
++ gpio_direction_output(TOSA_TC6393XB_BL_C20MA, 0);
++ gpio_direction_output(TOSA_TC6393XB_TG_ON, 1);
++
++ tosa_lcd_tg_init(data);
++
++ data->bl_dev = backlight_device_register("tosa_bl",
++ &client->dev, data, &tosa_bl_ops);
++ if (err)
++ goto err_bl_register;
++
++ data->bl_dev->props.brightness = 69;
++ data->bl_dev->props.max_brightness = 255;
++ data->bl_dev->props.power = FB_BLANK_UNBLANK;
++ backlight_update_status(data->bl_dev);
++
++
++ return 0;
++
++err_bl_register:
++ tosa_set_backlight(data, 0);
++ tosa_lcd_tg_off(data);
++
++ err = i2c_detach_client(client);
++ if (err)
++ return err;
++err_i2c_attach:
++ ssp_exit(&data->nssp_dev);
++err_ssp_init:
++ gpio_free(TOSA_TC6393XB_TG_ON);
++err_gpio_tg:
++ gpio_free(TOSA_TC6393XB_BL_C20MA);
++err_gpio_bl:
++ kfree(data);
++out:
++ return err;
++}
++
++static int tosa_bl_detach_client(struct i2c_client *client)
++{
++ int err = 0;
++ struct tosa_bl_data *data = i2c_get_clientdata(client);
++
++ backlight_device_unregister(data->bl_dev);
++
++ tosa_set_backlight(data, 0);
++ tosa_lcd_tg_off(data);
++
++ /* Try to detach the client from i2c space */
++ if ((err = i2c_detach_client(client)))
++ return err;
++
++ ssp_exit(&data->nssp_dev);
++
++ gpio_free(TOSA_TC6393XB_TG_ON);
++ gpio_free(TOSA_TC6393XB_BL_C20MA);
++
++ kfree(data);
++
++ return err;
++}
++
++#ifdef CONFIG_PM
++static int tosa_bl_suspend(struct i2c_client *client, pm_message_t mesg)
++{
++ struct tosa_bl_data *data = i2c_get_clientdata(client);
++
++ tosa_lcd_tg_off(data);
++ ssp_flush(&data->nssp_dev);
++ ssp_save_state(&data->nssp_dev,&data->nssp_state);
++
++ return 0;
++}
++
++static int tosa_bl_resume(struct i2c_client *client)
++{
++ struct tosa_bl_data *data = i2c_get_clientdata(client);
++
++ ssp_restore_state(&data->nssp_dev,&data->nssp_state);
++ ssp_enable(&data->nssp_dev);
++ tosa_bl_update_status(data->bl_dev);
++
++ return 0;
++}
++#else
++#define tosa_bl_suspend NULL
++#define tosa_bl_resume NULL
++#endif
++
++static int tosa_bl_attach_adapter(struct i2c_adapter *adapter)
++{
++ return i2c_probe(adapter, &addr_data, &tosa_bl_detect_client);
++}
++
++static struct i2c_driver tosa_bl_driver = {
++ .driver = {
++ .name = "tosa_bl",
++ },
++
++ .attach_adapter = tosa_bl_attach_adapter,
++ .detach_client = tosa_bl_detach_client,
++
++ .suspend = tosa_bl_suspend,
++ .resume = tosa_bl_resume,
++};
++
++static int __init tosa_bl_init(void)
++{
++ return i2c_add_driver(&tosa_bl_driver);
++}
++
++static void __exit tosa_bl_cleanup (void)
++{
++ i2c_del_driver(&tosa_bl_driver);
++}
++
++module_init(tosa_bl_init);
++module_exit(tosa_bl_cleanup);
++
++MODULE_DESCRIPTION("Tosa LCD device");
++MODULE_AUTHOR("Dirk Opfer, Dmitry Baryshkov");
++MODULE_LICENSE("GPL v2");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0053-sound-soc-codecs-wm9712.c-28.patch b/packages/linux/linux-rp-2.6.24/tosa/0053-sound-soc-codecs-wm9712.c-28.patch
new file mode 100644
index 0000000000..0675342508
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0053-sound-soc-codecs-wm9712.c-28.patch
@@ -0,0 +1,56 @@
+From 47616d22f8f303dfd66cf3b9125af212194a0f3c Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 9 Jan 2008 02:08:17 +0300
+Subject: [PATCH 53/64] sound/soc/codecs/wm9712.c | 28 ++++++++++++++++++----------
+ 1 file changed, 18 insertions(+), 10 deletions(-)
+
+Index: git/sound/soc/codecs/wm9712.c
+===================================================================
+---
+ sound/soc/codecs/wm9712.c | 28 ++++++++++++++++++----------
+ 1 files changed, 18 insertions(+), 10 deletions(-)
+
+diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
+index 986b5d5..dfb31e1 100644
+--- a/sound/soc/codecs/wm9712.c
++++ b/sound/soc/codecs/wm9712.c
+@@ -606,18 +606,26 @@ static int wm9712_dapm_event(struct snd_soc_codec *codec, int event)
+
+ static int wm9712_reset(struct snd_soc_codec *codec, int try_warm)
+ {
+- if (try_warm && soc_ac97_ops.warm_reset) {
+- soc_ac97_ops.warm_reset(codec->ac97);
+- if (!(ac97_read(codec, 0) & 0x8000))
+- return 1;
+- }
++ int retry = 3;
+
+- soc_ac97_ops.reset(codec->ac97);
+- if (ac97_read(codec, 0) & 0x8000)
+- goto err;
+- return 0;
++ while (retry--)
++ {
++ if(try_warm && soc_ac97_ops.warm_reset) {
++ soc_ac97_ops.warm_reset(codec->ac97);
++ if(ac97_read(codec, 0) & 0x8000)
++ continue;
++ else
++ return 1;
++ }
++
++ soc_ac97_ops.reset(codec->ac97);
++ if(ac97_read(codec, 0) & 0x8000)
++ continue;
++ else
++ return 0;
++
++ }
+
+-err:
+ printk(KERN_ERR "WM9712 AC97 reset failed\n");
+ return -EIO;
+ }
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0054-sound-soc-codecs-wm9712.c-2.patch b/packages/linux/linux-rp-2.6.24/tosa/0054-sound-soc-codecs-wm9712.c-2.patch
new file mode 100644
index 0000000000..be7300ab24
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0054-sound-soc-codecs-wm9712.c-2.patch
@@ -0,0 +1,28 @@
+From 08fbae2307163b3f0c3b704c4b00a9447752a45e Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Thu, 10 Jan 2008 17:56:58 +0300
+Subject: [PATCH 54/64] sound/soc/codecs/wm9712.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: git/sound/soc/codecs/wm9712.c
+===================================================================
+---
+ sound/soc/codecs/wm9712.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
+index dfb31e1..a3d9f96 100644
+--- a/sound/soc/codecs/wm9712.c
++++ b/sound/soc/codecs/wm9712.c
+@@ -647,7 +647,7 @@ static int wm9712_soc_resume(struct platform_device *pdev)
+ int i, ret;
+ u16 *cache = codec->reg_cache;
+
+- ret = wm9712_reset(codec, 1);
++ ret = wm9712_reset(codec, 0);
+ if (ret < 0){
+ printk(KERN_ERR "could not reset AC97 codec\n");
+ return ret;
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch b/packages/linux/linux-rp-2.6.24/tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch
new file mode 100644
index 0000000000..5bf691cbda
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch
@@ -0,0 +1,30 @@
+From bee8b808445a53a7dbb6c15a27064f14dec410c5 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 20 Jan 2008 03:01:41 +0300
+Subject: [PATCH 55/64] Add GPIO_POWERON to the list of devices that we support resume on.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 3e832dc..d1cf3dc 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -517,9 +517,9 @@ static void __init tosa_init(void)
+ pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
+
+ /* setup sleep mode values */
+- PWER = 0x00000002;
+- PFER = 0x00000000;
+- PRER = 0x00000002;
++ PWER = BIT(TOSA_GPIO_POWERON) | BIT(TOSA_GPIO_RESET);
++ PFER = 0;
++ PRER = BIT(TOSA_GPIO_POWERON) | BIT(TOSA_GPIO_RESET);
+ PGSR0 = 0x00000000;
+ PGSR1 = 0x00FF0002;
+ PGSR2 = 0x00014000;
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch b/packages/linux/linux-rp-2.6.24/tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch
new file mode 100644
index 0000000000..99220f9200
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch
@@ -0,0 +1,126 @@
+From e039614a0ce6df645f8fa4cbe32e4b21fe46a288 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 20 Jan 2008 02:44:03 +0300
+Subject: [PATCH 56/64] Support resetting by asserting GPIO pin
+
+This adds support for resetting via assertion of GPIO pin.
+This e.g. is used on Sharp Zaurus SL-6000.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/gpio.c | 43 +++++++++++++++++++++++++++++++++++++
+ arch/arm/mach-pxa/pm.c | 4 +-
+ include/asm-arm/arch-pxa/system.h | 10 ++++++++
+ 3 files changed, 55 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/gpio.c b/arch/arm/mach-pxa/gpio.c
+index 8638dd7..589da3b 100644
+--- a/arch/arm/mach-pxa/gpio.c
++++ b/arch/arm/mach-pxa/gpio.c
+@@ -19,6 +19,7 @@
+ #include <asm/hardware.h>
+ #include <asm/io.h>
+ #include <asm/arch/pxa-regs.h>
++#include <asm/arch/system.h>
+
+ #include "generic.h"
+
+@@ -194,4 +195,46 @@ void __init pxa_init_gpio(int gpio_nr)
+ pxa_gpio_chip[i/32].chip.ngpio = gpio_nr - i;
+ gpiochip_add(&pxa_gpio_chip[i/32].chip);
+ }
++
++ if (reset_gpio < gpio_nr)
++ init_reset_gpio();
++}
++
++int reset_gpio = -1;
++static int __init reset_gpio_setup(char *str)
++{
++ if (get_option(&str, &reset_gpio) != 1) {
++ printk(KERN_ERR "reset_gpio: bad value secified");
++ return 0;
++ }
++
++ return 1;
++}
++
++__setup("reset_gpio=", reset_gpio_setup);
++
++int init_reset_gpio(void)
++{
++ int rc = 0;
++ if (reset_gpio == -1)
++ goto out;
++
++ rc = gpio_request(reset_gpio, "reset generator");
++ if (rc) {
++ printk(KERN_ERR "Can't request reset_gpio\n");
++ goto out;
++ }
++
++ rc = gpio_direction_input(reset_gpio);
++ if (rc) {
++ printk(KERN_ERR "Can't configure reset_gpio for input\n");
++ gpio_free(reset_gpio);
++ goto out;
++ }
++
++out:
++ if (rc)
++ reset_gpio = -1;
++
++ return rc;
+ }
+diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
+index a941c71..64f37e5 100644
+--- a/arch/arm/mach-pxa/pm.c
++++ b/arch/arm/mach-pxa/pm.c
+@@ -40,8 +40,8 @@ int pxa_pm_enter(suspend_state_t state)
+
+ pxa_cpu_pm_fns->save(sleep_save);
+
+- /* Clear sleep reset status */
+- RCSR = RCSR_SMR;
++ /* Clear reset status */
++ RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
+
+ /* before sleeping, calculate and save a checksum */
+ for (i = 0; i < pxa_cpu_pm_fns->save_size - 1; i++)
+diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h
+index 1d56a3e..c075018 100644
+--- a/include/asm-arm/arch-pxa/system.h
++++ b/include/asm-arm/arch-pxa/system.h
+@@ -11,6 +11,7 @@
+ */
+
+ #include <asm/proc-fns.h>
++#include <asm/gpio.h>
+ #include "hardware.h"
+ #include "pxa-regs.h"
+
+@@ -19,12 +20,21 @@ static inline void arch_idle(void)
+ cpu_do_idle();
+ }
+
++extern int reset_gpio;
++
++int init_reset_gpio(void);
+
+ static inline void arch_reset(char mode)
+ {
++ RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
++
+ if (mode == 's') {
+ /* Jump into ROM at address 0 */
+ cpu_reset(0);
++ } else if (mode == 'g' && reset_gpio != -1) {
++ /* Use GPIO reset */
++ gpio_direction_output(reset_gpio, 0);
++ gpio_set_value(reset_gpio, 1);
+ } else {
+ /* Initialize the watchdog and let it fire */
+ OWER = OWER_WME;
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0057-Clean-up-tosa-resetting.patch b/packages/linux/linux-rp-2.6.24/tosa/0057-Clean-up-tosa-resetting.patch
new file mode 100644
index 0000000000..441e1bba75
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0057-Clean-up-tosa-resetting.patch
@@ -0,0 +1,70 @@
+From a6f03929fa4d20cef339dbed7ef5cd1e040d0548 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 20 Jan 2008 02:48:07 +0300
+Subject: [PATCH 57/64] Clean up tosa resetting
+
+Use new gpio-assertion reset.
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 16 +++++++---------
+ 1 files changed, 7 insertions(+), 9 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index d1cf3dc..2b4aef7 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -41,6 +41,8 @@
+ #include <asm/arch/irda.h>
+ #include <asm/arch/mmc.h>
+ #include <asm/arch/udc.h>
++#include <asm/arch/pm.h>
++#include <asm/arch/system.h>
+
+ #include <asm/mach/arch.h>
+ #include <asm/mach/map.h>
+@@ -489,13 +491,7 @@ static struct platform_device *devices[] __initdata = {
+
+ static void tosa_poweroff(void)
+ {
+- RCSR = RCSR_HWR | RCSR_WDR | RCSR_SMR | RCSR_GPR;
+-
+- pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_OUT);
+- GPSR(TOSA_GPIO_ON_RESET) = GPIO_bit(TOSA_GPIO_ON_RESET);
+-
+- mdelay(1000);
+- arm_machine_restart('h');
++ arm_machine_restart('g');
+ }
+
+ static void tosa_restart(char mode)
+@@ -504,7 +500,7 @@ static void tosa_restart(char mode)
+ if((MSC0 & 0xffff0000) == 0x7ff00000)
+ MSC0 = (MSC0 & 0xffff) | 0x7ee00000;
+
+- tosa_poweroff();
++ arm_machine_restart('g');
+ }
+
+ static void __init tosa_init(void)
+@@ -512,7 +508,6 @@ static void __init tosa_init(void)
+ pm_power_off = tosa_poweroff;
+ arm_pm_restart = tosa_restart;
+
+- pxa_gpio_mode(TOSA_GPIO_ON_RESET | GPIO_IN);
+ pxa_gpio_mode(TOSA_GPIO_TC6393XB_INT | GPIO_IN);
+ pxa_gpio_mode(TOSA_GPIO_USB_IN | GPIO_IN);
+
+@@ -544,6 +539,9 @@ static void __init fixup_tosa(struct machine_desc *desc,
+ mi->bank[0].start = 0xa0000000;
+ mi->bank[0].node = 0;
+ mi->bank[0].size = (64*1024*1024);
++
++ if (reset_gpio == -1)
++ reset_gpio = TOSA_GPIO_ON_RESET;
+ }
+
+ MACHINE_START(TOSA, "SHARP Tosa")
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0058-Fix-tosakbd-suspend.patch b/packages/linux/linux-rp-2.6.24/tosa/0058-Fix-tosakbd-suspend.patch
new file mode 100644
index 0000000000..e965857dff
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0058-Fix-tosakbd-suspend.patch
@@ -0,0 +1,27 @@
+From 8b57c409802e5feef64c4bb7659570e06558c0f2 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Sun, 20 Jan 2008 02:24:43 +0300
+Subject: [PATCH 58/64] Fix tosakbd suspend
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/input/keyboard/tosakbd.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/input/keyboard/tosakbd.c b/drivers/input/keyboard/tosakbd.c
+index 3884d1e..306cbe8 100644
+--- a/drivers/input/keyboard/tosakbd.c
++++ b/drivers/input/keyboard/tosakbd.c
+@@ -210,6 +210,9 @@ static int tosakbd_suspend(struct platform_device *dev, pm_message_t state)
+
+ del_timer_sync(&tosakbd->timer);
+
++ PGSR1 = (PGSR1 & ~TOSA_GPIO_LOW_STROBE_BIT);
++ PGSR2 = (PGSR2 & ~TOSA_GPIO_HIGH_STROBE_BIT);
++
+ return 0;
+ }
+
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0059-patch-tosa-wakeup-test.patch b/packages/linux/linux-rp-2.6.24/tosa/0059-patch-tosa-wakeup-test.patch
new file mode 100644
index 0000000000..812b5bad41
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0059-patch-tosa-wakeup-test.patch
@@ -0,0 +1,46 @@
+From 00f6e9b946d1f653fc776d71c86a1f6a7534cd1d Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 25 Jan 2008 19:16:20 +0300
+Subject: [PATCH 59/64] patch tosa-wakeup-test
+
+---
+ arch/arm/mach-pxa/tosa.c | 18 +++++++++++++++++-
+ 1 files changed, 17 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 2b4aef7..7008919 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -260,12 +260,28 @@ static struct platform_device tosakbd_device = {
+ };
+
+ static struct gpio_keys_button tosa_gpio_keys[] = {
++ /*
++ * Two following keys are directly tied to "ON" button of tosa. Why?
++ * The first one can be used as a wakeup source, the second can't:
++ * it's outside of permitted area.
++ */
++ {
++ .type = EV_PWR,
++ .code = KEY_RESERVED,
++ .gpio = TOSA_GPIO_POWERON,
++ .desc = "Poweron",
++ .wakeup = 1,
++ .active_low = 1,
++ },
+ {
+ .type = EV_PWR,
+ .code = KEY_SUSPEND,
+ .gpio = TOSA_GPIO_ON_KEY,
+ .desc = "On key",
+- .wakeup = 1,
++ /*
++ * can't be used as wakeup
++ * .wakeup = 1,
++ */
+ .active_low = 1,
+ },
+ {
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0060-Add-support-for-power_supply-on-tosa.patch b/packages/linux/linux-rp-2.6.24/tosa/0060-Add-support-for-power_supply-on-tosa.patch
new file mode 100644
index 0000000000..f7420de040
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0060-Add-support-for-power_supply-on-tosa.patch
@@ -0,0 +1,623 @@
+From f6ec15733eb55e851c8ad19c2143d425558f6044 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Mon, 4 Feb 2008 20:11:58 +0300
+Subject: [PATCH 60/64] Add support for power_supply on tosa
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/Makefile | 2 +-
+ arch/arm/mach-pxa/tosa_power.c | 82 +++++++
+ drivers/leds/leds-tosa.c | 2 +-
+ drivers/power/Kconfig | 7 +
+ drivers/power/Makefile | 1 +
+ drivers/power/tosa_battery.c | 458 ++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 550 insertions(+), 2 deletions(-)
+ create mode 100644 arch/arm/mach-pxa/tosa_power.c
+ create mode 100644 drivers/power/tosa_battery.c
+
+diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
+index f276d24..2b68254 100644
+--- a/arch/arm/mach-pxa/Makefile
++++ b/arch/arm/mach-pxa/Makefile
+@@ -21,7 +21,7 @@ obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o cor
+ obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o
+ obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
+ obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o sharpsl_pm.o poodle_pm.o
+-obj-$(CONFIG_MACH_TOSA) += tosa.o
++obj-$(CONFIG_MACH_TOSA) += tosa.o tosa_power.o
+ obj-$(CONFIG_MACH_EM_X270) += em-x270.o
+
+ ifeq ($(CONFIG_MACH_ZYLONITE),y)
+diff --git a/arch/arm/mach-pxa/tosa_power.c b/arch/arm/mach-pxa/tosa_power.c
+new file mode 100644
+index 0000000..61ca7dc
+--- /dev/null
++++ b/arch/arm/mach-pxa/tosa_power.c
+@@ -0,0 +1,82 @@
++/*
++ * Battery and Power Management code for the Sharp SL-6000x
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ * Copyright (c) 2008 Dmitry Baryshkov
++ *
++ * 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.
++ *
++ */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/power_supply.h>
++#include <linux/pda_power.h>
++#include <linux/platform_device.h>
++#include <linux/interrupt.h>
++
++#include <asm/arch/tosa.h>
++#include <asm/gpio.h>
++
++static int tosa_power_ac_online(void)
++{
++ return gpio_get_value(TOSA_GPIO_AC_IN) == 0;
++}
++
++static char *tosa_ac_supplied_to[] = {
++ "main-battery",
++ "backup-battery",
++ "jacket-battery",
++};
++
++static struct pda_power_pdata tosa_power_data = {
++ .is_ac_online = tosa_power_ac_online,
++ .supplied_to = tosa_ac_supplied_to,
++ .num_supplicants = ARRAY_SIZE(tosa_ac_supplied_to),
++};
++
++static struct resource tosa_power_resource[] = {
++ {
++ .name = "ac",
++ .start = gpio_to_irq(TOSA_GPIO_AC_IN),
++ .end = gpio_to_irq(TOSA_GPIO_AC_IN),
++ .flags = IORESOURCE_IRQ |
++ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ },
++};
++
++static struct platform_device tosa_power_device = {
++ .name = "pda-power",
++ .id = -1,
++ .dev.platform_data = &tosa_power_data,
++ .resource = tosa_power_resource,
++ .num_resources = ARRAY_SIZE(tosa_power_resource),
++};
++
++static int __init tosa_power_init(void)
++{
++ int ret = gpio_request(TOSA_GPIO_AC_IN, "ac");
++ if (ret)
++ goto err_gpio_req;
++
++ ret = gpio_direction_input(TOSA_GPIO_AC_IN);
++ if (ret)
++ goto err_gpio_in;
++
++ return platform_device_register(&tosa_power_device);
++
++err_gpio_in:
++ gpio_free(TOSA_GPIO_AC_IN);
++err_gpio_req:
++ return ret;
++}
++
++static void __exit tosa_power_exit(void)
++{
++ platform_device_unregister(&tosa_power_device);
++ gpio_free(TOSA_GPIO_AC_IN);
++}
++
++module_init(tosa_power_init);
++module_exit(tosa_power_exit);
+diff --git a/drivers/leds/leds-tosa.c b/drivers/leds/leds-tosa.c
+index fb2416a..b4498b5 100644
+--- a/drivers/leds/leds-tosa.c
++++ b/drivers/leds/leds-tosa.c
+@@ -46,7 +46,7 @@ static void tosaled_green_set(struct led_classdev *led_cdev,
+
+ static struct led_classdev tosa_amber_led = {
+ .name = "tosa:amber",
+- .default_trigger = "sharpsl-charge",
++ .default_trigger = "main-battery-charging",
+ .brightness_set = tosaled_amber_set,
+ };
+
+diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
+index 58c806e..e3a9c37 100644
+--- a/drivers/power/Kconfig
++++ b/drivers/power/Kconfig
+@@ -49,4 +49,11 @@ config BATTERY_OLPC
+ help
+ Say Y to enable support for the battery on the OLPC laptop.
+
++config BATTERY_TOSA
++ tristate "Sharp SL-6000 (tosa) battery"
++ depends on MACH_TOSA && MFD_TC6393XB
++ help
++ Say Y to enable support for the battery on the Sharp Zaurus
++ SL-6000 (tosa) models.
++
+ endif # POWER_SUPPLY
+diff --git a/drivers/power/Makefile b/drivers/power/Makefile
+index 6413ded..1e408fa 100644
+--- a/drivers/power/Makefile
++++ b/drivers/power/Makefile
+@@ -20,3 +20,4 @@ obj-$(CONFIG_APM_POWER) += apm_power.o
+ obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o
+ obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o
+ obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o
++obj-$(CONFIG_BATTERY_TOSA) += tosa_battery.o
+diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
+new file mode 100644
+index 0000000..b0fd2f2
+--- /dev/null
++++ b/drivers/power/tosa_battery.c
+@@ -0,0 +1,458 @@
++/*
++ * Battery and Power Management code for the Sharp SL-6000x
++ *
++ * Copyright (c) 2005 Dirk Opfer
++ * Copyright (c) 2008 Dmitry Baryshkov
++ *
++ * 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.
++ *
++ */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/power_supply.h>
++#include <linux/wm97xx.h>
++#include <linux/delay.h>
++#include <linux/spinlock.h>
++#include <linux/interrupt.h>
++
++#include <asm/mach-types.h>
++#include <asm/gpio.h>
++#include <asm/arch/tosa.h>
++
++#define BAT_TO_VOLTS(v) ((v) * 1000000 / 414)
++#define BU_TO_VOLTS(v) ((v) * 1000000 / 1266)
++/*
++ * It's pretty strange value, but that's roughly what I get from
++ * zaurus maintainer menu
++ */
++//#define BAT_TO_TEMP(t) ((t) * 10000/2000)
++#define BAT_TO_TEMP(t) (t)
++
++static DEFINE_MUTEX(bat_lock); /* protects gpio pins */
++static struct work_struct bat_work;
++
++struct tosa_bat {
++ int status;
++ struct power_supply psy;
++ int full_chrg;
++
++ struct mutex work_lock; /* protects data */
++ bool (*is_present)(struct tosa_bat *bat);
++ int gpio_full;
++ int gpio_charge_off;
++ int gpio_bat;
++ int adc_bat;
++ int gpio_temp;
++ int adc_temp;
++};
++
++static struct tosa_bat tosa_bat_main;
++static struct tosa_bat tosa_bat_jacket;
++
++static enum power_supply_property tosa_bat_main_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_TEMP,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
++static enum power_supply_property tosa_bat_bu_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
++static unsigned long tosa_read_bat(struct tosa_bat *bat)
++{
++ unsigned long value = 0;
++
++ if (bat->gpio_bat < 0 || bat->adc_bat < 0)
++ return 0;
++
++ mutex_lock(&bat_lock);
++ gpio_set_value(bat->gpio_bat, 1);
++ mdelay(5);
++ value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, bat->adc_bat);
++ gpio_set_value(bat->gpio_bat, 0);
++ mutex_unlock(&bat_lock);
++ return value;
++}
++
++static unsigned long tosa_read_temp(struct tosa_bat *bat)
++{
++ unsigned long value = 0;
++
++ if (bat->gpio_temp < 0 || bat->adc_temp < 0)
++ return 0;
++
++ mutex_lock(&bat_lock);
++ gpio_set_value(bat->gpio_temp, 1);
++ mdelay(5);
++ value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, bat->adc_temp);
++ gpio_set_value(bat->gpio_temp, 0);
++ mutex_unlock(&bat_lock);
++ return value;
++}
++
++static int tosa_bat_get_property(struct power_supply *psy,
++ enum power_supply_property psp,
++ union power_supply_propval *val)
++{
++ int ret = 0;
++ struct tosa_bat *bat = container_of(psy, struct tosa_bat, psy);
++
++ if (bat->is_present && !bat->is_present(bat)
++ && psp != POWER_SUPPLY_PROP_PRESENT) {
++ return -ENODEV;
++ }
++
++ switch (psp) {
++ case POWER_SUPPLY_PROP_STATUS:
++ val->intval = bat->status;
++ break;
++ case POWER_SUPPLY_PROP_TECHNOLOGY:
++ val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
++ val->intval = BAT_TO_VOLTS(tosa_read_bat(bat));
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX:
++ if (bat->full_chrg == -1)
++ val->intval = -1;
++ else
++ val->intval = BAT_TO_VOLTS(bat->full_chrg);
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
++ val->intval = BAT_TO_VOLTS(1551);
++ break;
++ case POWER_SUPPLY_PROP_TEMP:
++ val->intval = BAT_TO_TEMP(tosa_read_temp(bat));
++ break;
++ case POWER_SUPPLY_PROP_PRESENT:
++ val->intval = bat->is_present ? bat->is_present(bat) : 1;
++ break;
++ default:
++ ret = -EINVAL;
++ break;
++ }
++ return ret;
++}
++
++static int tosa_bu_get_property(struct power_supply *psy,
++ enum power_supply_property psp,
++ union power_supply_propval *val)
++{
++ int ret = 0;
++ struct tosa_bat *bat = container_of(psy, struct tosa_bat, psy);
++
++ switch (psp) {
++ case POWER_SUPPLY_PROP_STATUS:
++ val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
++ break;
++ case POWER_SUPPLY_PROP_TECHNOLOGY:
++ val->intval = POWER_SUPPLY_TECHNOLOGY_LiMn;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
++ val->intval = 0;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
++ val->intval = 3 * 1000000; /* 3 V */
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
++ /* I think so */
++ val->intval = BU_TO_VOLTS(tosa_read_bat(bat));
++ break;
++ case POWER_SUPPLY_PROP_PRESENT:
++ val->intval = 1;
++ break;
++ default:
++ ret = -EINVAL;
++ break;
++ }
++ return ret;
++}
++
++static bool tosa_jacket_bat_is_present(struct tosa_bat *bat) {
++ // FIXME
++ return 1;
++}
++
++static void tosa_bat_external_power_changed(struct power_supply *psy)
++{
++ schedule_work(&bat_work);
++}
++
++static irqreturn_t tosa_bat_full_isr(int irq, void *data)
++{
++ printk(KERN_ERR "bat_full irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
++ schedule_work(&bat_work);
++ return IRQ_HANDLED;
++}
++
++static void tosa_bat_update(struct tosa_bat *bat)
++{
++ int old = bat->status;
++ struct power_supply *psy = &bat->psy;
++
++ mutex_lock(&bat->work_lock);
++
++ if (bat->is_present && !bat->is_present(bat)) {
++ printk(KERN_DEBUG "%s not present\n", psy->name);
++ bat->status = POWER_SUPPLY_STATUS_NOT_CHARGING;
++ bat->full_chrg = -1;
++ } else if (power_supply_am_i_supplied(psy)) {
++ if (gpio_get_value(bat->gpio_full)) {
++ printk(KERN_DEBUG "%s full\n", psy->name);
++
++ if (old == POWER_SUPPLY_STATUS_CHARGING || bat->full_chrg == -1)
++ bat->full_chrg = tosa_read_bat(bat);
++
++ gpio_set_value(bat->gpio_charge_off, 1);
++ bat->status = POWER_SUPPLY_STATUS_FULL;
++ } else {
++ printk(KERN_ERR "%s charge\n", psy->name);
++ gpio_set_value(bat->gpio_charge_off, 0);
++ bat->status = POWER_SUPPLY_STATUS_CHARGING;
++ }
++ } else {
++ printk(KERN_ERR "%s discharge\n", psy->name);
++ gpio_set_value(bat->gpio_charge_off, 1);
++ bat->status = POWER_SUPPLY_STATUS_DISCHARGING;
++ }
++
++ if (old != bat->status)
++ power_supply_changed(psy);
++
++ mutex_unlock(&bat->work_lock);
++}
++
++static void tosa_bat_work(struct work_struct *work)
++{
++ tosa_bat_update(&tosa_bat_main);
++ tosa_bat_update(&tosa_bat_jacket);
++}
++
++
++static struct tosa_bat tosa_bat_main = {
++ .status = POWER_SUPPLY_STATUS_UNKNOWN,
++ .full_chrg = -1,
++ .psy = {
++ .name = "main-battery",
++ .type = POWER_SUPPLY_TYPE_BATTERY,
++ .properties = tosa_bat_main_props,
++ .num_properties = ARRAY_SIZE(tosa_bat_main_props),
++ .get_property = tosa_bat_get_property,
++ .external_power_changed = tosa_bat_external_power_changed,
++ .use_for_apm = 1,
++ },
++
++ .gpio_full = TOSA_GPIO_BAT0_CRG,
++ .gpio_charge_off = TOSA_TC6393XB_CHARGE_OFF,
++ .gpio_bat = TOSA_TC6393XB_BAT0_V_ON,
++ .adc_bat = WM97XX_AUX_ID3,
++ .gpio_temp = TOSA_TC6393XB_BAT1_TH_ON,
++ .adc_temp = WM97XX_AUX_ID2,
++};
++
++static struct tosa_bat tosa_bat_jacket = {
++ .status = POWER_SUPPLY_STATUS_UNKNOWN,
++ .full_chrg = -1,
++ .psy = {
++ .name = "jacket-battery",
++ .type = POWER_SUPPLY_TYPE_BATTERY,
++ .properties = tosa_bat_main_props,
++ .num_properties = ARRAY_SIZE(tosa_bat_main_props),
++ .get_property = tosa_bat_get_property,
++ .external_power_changed = tosa_bat_external_power_changed,
++// .use_for_apm = 1,
++ },
++
++ .is_present = tosa_jacket_bat_is_present,
++ .gpio_full = TOSA_GPIO_BAT1_CRG,
++ .gpio_charge_off = TOSA_TC6393XB_CHARGE_OFF_JC,
++ .gpio_bat = TOSA_TC6393XB_BAT1_V_ON,
++ .adc_bat = WM97XX_AUX_ID3,
++ .gpio_temp = TOSA_TC6393XB_BAT0_TH_ON,
++ .adc_temp = WM97XX_AUX_ID2,
++};
++
++static struct tosa_bat tosa_bat_bu = {
++ .status = POWER_SUPPLY_STATUS_UNKNOWN,
++ .full_chrg = -1,
++
++ .psy = {
++ .name = "backup-battery",
++ .type = POWER_SUPPLY_TYPE_BATTERY,
++ .properties = tosa_bat_bu_props,
++ .num_properties = ARRAY_SIZE(tosa_bat_bu_props),
++ .get_property = tosa_bu_get_property,
++ .external_power_changed = tosa_bat_external_power_changed,
++ },
++
++ .gpio_full = -1,
++ .gpio_charge_off = -1,
++ .gpio_bat = TOSA_TC6393XB_BU_CHRG_ON,
++ .adc_bat = WM97XX_AUX_ID4,
++ .gpio_temp = -1,
++ .adc_temp = -1,
++};
++
++static struct {
++ int gpio;
++ char *name;
++ bool output;
++ int value;
++} gpios[] = {
++ { TOSA_TC6393XB_CHARGE_OFF, "main charge off", 1, 1 },
++ { TOSA_TC6393XB_CHARGE_OFF_JC, "jacket charge off", 1, 1 },
++ { TOSA_TC6393XB_BAT_SW_ON, "battery switch", 1, 0 },
++ { TOSA_TC6393XB_BAT0_V_ON, "main battery", 1, 0 },
++ { TOSA_TC6393XB_BAT1_V_ON, "jacket battery", 1, 0 },
++ { TOSA_TC6393XB_BAT1_TH_ON, "main battery temp", 1, 0 },
++ { TOSA_TC6393XB_BAT0_TH_ON, "jacket battery temp", 1, 0 },
++ { TOSA_TC6393XB_BU_CHRG_ON, "backup battery", 1, 0 },
++ { TOSA_GPIO_BAT0_CRG, "main battery full", 0, 0 },
++ { TOSA_GPIO_BAT1_CRG, "jacket battery full", 0, 0 },
++ { TOSA_GPIO_BAT0_LOW, "main battery low", 0, 0 },
++ { TOSA_GPIO_BAT1_LOW, "jacket battery low", 0, 0 },
++};
++
++#ifdef CONFIG_PM
++static int tosa_bat_suspend(struct device *dev, pm_message_t state)
++{
++ /* do nothing */
++ return 0;
++}
++
++static int tosa_bat_resume(struct device *dev)
++{
++ schedule_work(&bat_work);
++ return 0;
++}
++#else
++#define tosa_bat_suspend NULL
++#define tosa_bat_resume NULL
++#endif
++
++static int __devinit tosa_bat_probe(struct device *dev)
++{
++ int ret;
++ int i;
++
++ if (!machine_is_tosa())
++ return -ENODEV;
++
++ for (i = 0; i < ARRAY_SIZE(gpios); i++) {
++ ret = gpio_request(gpios[i].gpio, gpios[i].name);
++ if (ret) {
++ i --;
++ goto err_gpio;
++ }
++
++ if (gpios[i].output)
++ ret = gpio_direction_output(gpios[i].gpio,
++ gpios[i].value);
++ else
++ ret = gpio_direction_input(gpios[i].gpio);
++
++ if (ret)
++ goto err_gpio;
++ }
++
++ mutex_init(&tosa_bat_main.work_lock);
++ mutex_init(&tosa_bat_jacket.work_lock);
++
++ INIT_WORK(&bat_work, tosa_bat_work);
++
++ ret = power_supply_register(dev, &tosa_bat_main.psy);
++ if (ret)
++ goto err_psy_reg_main;
++ ret = power_supply_register(dev, &tosa_bat_jacket.psy);
++ if (ret)
++ goto err_psy_reg_jacket;
++ ret = power_supply_register(dev, &tosa_bat_bu.psy);
++ if (ret)
++ goto err_psy_reg_bu;
++
++ ret = request_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG),
++ tosa_bat_full_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ "main full", &tosa_bat_main);
++ if (ret)
++ goto err_req_main;
++
++ ret = request_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG),
++ tosa_bat_full_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ "jacket full", &tosa_bat_jacket);
++ if (!ret) {
++ schedule_work(&bat_work);
++ return 0;
++ }
++
++ free_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG), &tosa_bat_main);
++err_req_main:
++ power_supply_unregister(&tosa_bat_bu.psy);
++err_psy_reg_bu:
++ power_supply_unregister(&tosa_bat_jacket.psy);
++err_psy_reg_jacket:
++ power_supply_unregister(&tosa_bat_main.psy);
++err_psy_reg_main:
++
++ i --;
++err_gpio:
++ for (; i >= 0; i --)
++ gpio_free(gpios[i].gpio);
++
++ return ret;
++}
++
++static int __devexit tosa_bat_remove(struct device *dev)
++{
++ int i;
++
++ free_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG), &tosa_bat_jacket);
++ free_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG), &tosa_bat_main);
++
++ power_supply_unregister(&tosa_bat_bu.psy);
++ power_supply_unregister(&tosa_bat_jacket.psy);
++ power_supply_unregister(&tosa_bat_main.psy);
++
++ for (i = ARRAY_SIZE(gpios) - 1; i >= 0; i --)
++ gpio_free(gpios[i].gpio);
++
++ return 0;
++}
++
++static struct device_driver tosa_bat_driver = {
++ .name = "wm97xx-battery",
++ .bus = &wm97xx_bus_type,
++ .owner = THIS_MODULE,
++ .probe = tosa_bat_probe,
++ .remove = __devexit_p(tosa_bat_remove),
++ .suspend = tosa_bat_suspend,
++ .resume = tosa_bat_resume,
++};
++
++static int __init tosa_bat_init(void)
++{
++ return driver_register(&tosa_bat_driver);
++}
++
++static void __exit tosa_bat_exit(void)
++{
++ driver_unregister(&tosa_bat_driver);
++}
++
++module_init(tosa_bat_init);
++module_exit(tosa_bat_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Dmitry Baryshkov");
++MODULE_DESCRIPTION("Tosa battery driver");
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0061-tosa-bat-unify.patch b/packages/linux/linux-rp-2.6.24/tosa/0061-tosa-bat-unify.patch
new file mode 100644
index 0000000000..2bcede36a9
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0061-tosa-bat-unify.patch
@@ -0,0 +1,342 @@
+From f05aa38af5bd5962ae04c4b128644e7f55451527 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 8 Feb 2008 01:14:48 +0300
+Subject: [PATCH 61/64] tosa-bat-unify
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/power/tosa_battery.c | 161 ++++++++++++++++++++---------------------
+ 1 files changed, 79 insertions(+), 82 deletions(-)
+
+diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
+index b0fd2f2..008e791 100644
+--- a/drivers/power/tosa_battery.c
++++ b/drivers/power/tosa_battery.c
+@@ -21,15 +21,6 @@
+ #include <asm/gpio.h>
+ #include <asm/arch/tosa.h>
+
+-#define BAT_TO_VOLTS(v) ((v) * 1000000 / 414)
+-#define BU_TO_VOLTS(v) ((v) * 1000000 / 1266)
+-/*
+- * It's pretty strange value, but that's roughly what I get from
+- * zaurus maintainer menu
+- */
+-//#define BAT_TO_TEMP(t) ((t) * 10000/2000)
+-#define BAT_TO_TEMP(t) (t)
+-
+ static DEFINE_MUTEX(bat_lock); /* protects gpio pins */
+ static struct work_struct bat_work;
+
+@@ -39,37 +30,27 @@ struct tosa_bat {
+ int full_chrg;
+
+ struct mutex work_lock; /* protects data */
++
+ bool (*is_present)(struct tosa_bat *bat);
+ int gpio_full;
+ int gpio_charge_off;
++
++ int technology;
++
+ int gpio_bat;
+ int adc_bat;
++ int adc_bat_divider;
++ int bat_max;
++ int bat_min;
++
+ int gpio_temp;
+ int adc_temp;
++ int adc_temp_divider;
+ };
+
+ static struct tosa_bat tosa_bat_main;
+ static struct tosa_bat tosa_bat_jacket;
+
+-static enum power_supply_property tosa_bat_main_props[] = {
+- POWER_SUPPLY_PROP_STATUS,
+- POWER_SUPPLY_PROP_TECHNOLOGY,
+- POWER_SUPPLY_PROP_VOLTAGE_NOW,
+- POWER_SUPPLY_PROP_VOLTAGE_MAX,
+- POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+- POWER_SUPPLY_PROP_TEMP,
+- POWER_SUPPLY_PROP_PRESENT,
+-};
+-
+-static enum power_supply_property tosa_bat_bu_props[] = {
+- POWER_SUPPLY_PROP_STATUS,
+- POWER_SUPPLY_PROP_TECHNOLOGY,
+- POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
+- POWER_SUPPLY_PROP_VOLTAGE_NOW,
+- POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
+- POWER_SUPPLY_PROP_PRESENT,
+-};
+-
+ static unsigned long tosa_read_bat(struct tosa_bat *bat)
+ {
+ unsigned long value = 0;
+@@ -83,6 +64,9 @@ static unsigned long tosa_read_bat(struct tosa_bat *bat)
+ value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, bat->adc_bat);
+ gpio_set_value(bat->gpio_bat, 0);
+ mutex_unlock(&bat_lock);
++
++ value = value * 1000000 / bat->adc_bat_divider;
++
+ return value;
+ }
+
+@@ -99,6 +83,9 @@ static unsigned long tosa_read_temp(struct tosa_bat *bat)
+ value = wm97xx_read_aux_adc(bat->psy.dev->parent->driver_data, bat->adc_temp);
+ gpio_set_value(bat->gpio_temp, 0);
+ mutex_unlock(&bat_lock);
++
++ value = value * 10000 / bat->adc_temp_divider;
++
+ return value;
+ }
+
+@@ -119,22 +106,25 @@ static int tosa_bat_get_property(struct power_supply *psy,
+ val->intval = bat->status;
+ break;
+ case POWER_SUPPLY_PROP_TECHNOLOGY:
+- val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO;
++ val->intval = bat->technology;
+ break;
+ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+- val->intval = BAT_TO_VOLTS(tosa_read_bat(bat));
++ val->intval = tosa_read_bat(bat);
+ break;
+ case POWER_SUPPLY_PROP_VOLTAGE_MAX:
+ if (bat->full_chrg == -1)
+- val->intval = -1;
++ val->intval = bat->bat_max;
+ else
+- val->intval = BAT_TO_VOLTS(bat->full_chrg);
++ val->intval = bat->full_chrg;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
++ val->intval = bat->bat_max;
+ break;
+ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
+- val->intval = BAT_TO_VOLTS(1551);
++ val->intval = bat->bat_min;
+ break;
+ case POWER_SUPPLY_PROP_TEMP:
+- val->intval = BAT_TO_TEMP(tosa_read_temp(bat));
++ val->intval = tosa_read_temp(bat);
+ break;
+ case POWER_SUPPLY_PROP_PRESENT:
+ val->intval = bat->is_present ? bat->is_present(bat) : 1;
+@@ -146,40 +136,6 @@ static int tosa_bat_get_property(struct power_supply *psy,
+ return ret;
+ }
+
+-static int tosa_bu_get_property(struct power_supply *psy,
+- enum power_supply_property psp,
+- union power_supply_propval *val)
+-{
+- int ret = 0;
+- struct tosa_bat *bat = container_of(psy, struct tosa_bat, psy);
+-
+- switch (psp) {
+- case POWER_SUPPLY_PROP_STATUS:
+- val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
+- break;
+- case POWER_SUPPLY_PROP_TECHNOLOGY:
+- val->intval = POWER_SUPPLY_TECHNOLOGY_LiMn;
+- break;
+- case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
+- val->intval = 0;
+- break;
+- case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
+- val->intval = 3 * 1000000; /* 3 V */
+- break;
+- case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+- /* I think so */
+- val->intval = BU_TO_VOLTS(tosa_read_bat(bat));
+- break;
+- case POWER_SUPPLY_PROP_PRESENT:
+- val->intval = 1;
+- break;
+- default:
+- ret = -EINVAL;
+- break;
+- }
+- return ret;
+-}
+-
+ static bool tosa_jacket_bat_is_present(struct tosa_bat *bat) {
+ // FIXME
+ return 1;
+@@ -241,6 +197,25 @@ static void tosa_bat_work(struct work_struct *work)
+ }
+
+
++static enum power_supply_property tosa_bat_main_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_TEMP,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
++static enum power_supply_property tosa_bat_bu_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
+ static struct tosa_bat tosa_bat_main = {
+ .status = POWER_SUPPLY_STATUS_UNKNOWN,
+ .full_chrg = -1,
+@@ -256,10 +231,18 @@ static struct tosa_bat tosa_bat_main = {
+
+ .gpio_full = TOSA_GPIO_BAT0_CRG,
+ .gpio_charge_off = TOSA_TC6393XB_CHARGE_OFF,
++
++ .technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
++
+ .gpio_bat = TOSA_TC6393XB_BAT0_V_ON,
+ .adc_bat = WM97XX_AUX_ID3,
++ .adc_bat_divider = 414,
++ .bat_max = 4310000,
++ .bat_min = 1551 * 100000 / 414,
++
+ .gpio_temp = TOSA_TC6393XB_BAT1_TH_ON,
+ .adc_temp = WM97XX_AUX_ID2,
++ .adc_temp_divider = 10000,
+ };
+
+ static struct tosa_bat tosa_bat_jacket = {
+@@ -278,10 +261,18 @@ static struct tosa_bat tosa_bat_jacket = {
+ .is_present = tosa_jacket_bat_is_present,
+ .gpio_full = TOSA_GPIO_BAT1_CRG,
+ .gpio_charge_off = TOSA_TC6393XB_CHARGE_OFF_JC,
++
++ .technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
++
+ .gpio_bat = TOSA_TC6393XB_BAT1_V_ON,
+ .adc_bat = WM97XX_AUX_ID3,
++ .adc_bat_divider = 414,
++ .bat_max = 4310000,
++ .bat_min = 1551 * 100000 / 414,
++
+ .gpio_temp = TOSA_TC6393XB_BAT0_TH_ON,
+ .adc_temp = WM97XX_AUX_ID2,
++ .adc_temp_divider = 10000,
+ };
+
+ static struct tosa_bat tosa_bat_bu = {
+@@ -293,16 +284,22 @@ static struct tosa_bat tosa_bat_bu = {
+ .type = POWER_SUPPLY_TYPE_BATTERY,
+ .properties = tosa_bat_bu_props,
+ .num_properties = ARRAY_SIZE(tosa_bat_bu_props),
+- .get_property = tosa_bu_get_property,
++ .get_property = tosa_bat_get_property,
+ .external_power_changed = tosa_bat_external_power_changed,
+ },
+
+ .gpio_full = -1,
+ .gpio_charge_off = -1,
++
++ .technology = POWER_SUPPLY_TECHNOLOGY_LiMn,
++
+ .gpio_bat = TOSA_TC6393XB_BU_CHRG_ON,
+ .adc_bat = WM97XX_AUX_ID4,
++ .adc_bat_divider = 1266,
++
+ .gpio_temp = -1,
+ .adc_temp = -1,
++ .adc_temp_divider = -1,
+ };
+
+ static struct {
+@@ -326,13 +323,14 @@ static struct {
+ };
+
+ #ifdef CONFIG_PM
+-static int tosa_bat_suspend(struct device *dev, pm_message_t state)
++static int tosa_bat_suspend(struct platform_device *dev, pm_message_t state)
+ {
+ /* do nothing */
++ flush_scheduled_work();
+ return 0;
+ }
+
+-static int tosa_bat_resume(struct device *dev)
++static int tosa_bat_resume(struct platform_device *dev)
+ {
+ schedule_work(&bat_work);
+ return 0;
+@@ -342,7 +340,7 @@ static int tosa_bat_resume(struct device *dev)
+ #define tosa_bat_resume NULL
+ #endif
+
+-static int __devinit tosa_bat_probe(struct device *dev)
++static int __devinit tosa_bat_probe(struct platform_device *dev)
+ {
+ int ret;
+ int i;
+@@ -372,13 +370,13 @@ static int __devinit tosa_bat_probe(struct device *dev)
+
+ INIT_WORK(&bat_work, tosa_bat_work);
+
+- ret = power_supply_register(dev, &tosa_bat_main.psy);
++ ret = power_supply_register(&dev->dev, &tosa_bat_main.psy);
+ if (ret)
+ goto err_psy_reg_main;
+- ret = power_supply_register(dev, &tosa_bat_jacket.psy);
++ ret = power_supply_register(&dev->dev, &tosa_bat_jacket.psy);
+ if (ret)
+ goto err_psy_reg_jacket;
+- ret = power_supply_register(dev, &tosa_bat_bu.psy);
++ ret = power_supply_register(&dev->dev, &tosa_bat_bu.psy);
+ if (ret)
+ goto err_psy_reg_bu;
+
+@@ -413,7 +411,7 @@ err_gpio:
+ return ret;
+ }
+
+-static int __devexit tosa_bat_remove(struct device *dev)
++static int __devexit tosa_bat_remove(struct platform_device *dev)
+ {
+ int i;
+
+@@ -430,10 +428,9 @@ static int __devexit tosa_bat_remove(struct device *dev)
+ return 0;
+ }
+
+-static struct device_driver tosa_bat_driver = {
+- .name = "wm97xx-battery",
+- .bus = &wm97xx_bus_type,
+- .owner = THIS_MODULE,
++static struct platform_driver tosa_bat_driver = {
++ .driver.name = "wm97xx-battery",
++ .driver.owner = THIS_MODULE,
+ .probe = tosa_bat_probe,
+ .remove = __devexit_p(tosa_bat_remove),
+ .suspend = tosa_bat_suspend,
+@@ -442,12 +439,12 @@ static struct device_driver tosa_bat_driver = {
+
+ static int __init tosa_bat_init(void)
+ {
+- return driver_register(&tosa_bat_driver);
++ return platform_driver_register(&tosa_bat_driver);
+ }
+
+ static void __exit tosa_bat_exit(void)
+ {
+- driver_unregister(&tosa_bat_driver);
++ platform_driver_unregister(&tosa_bat_driver);
+ }
+
+ module_init(tosa_bat_init);
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0062-tosa-bat-fix-charging.patch b/packages/linux/linux-rp-2.6.24/tosa/0062-tosa-bat-fix-charging.patch
new file mode 100644
index 0000000000..e3a6b74772
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0062-tosa-bat-fix-charging.patch
@@ -0,0 +1,78 @@
+From 0b9f80ab540b2e51f6e86f6a1adec67761f9368d Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 8 Feb 2008 00:50:03 +0300
+Subject: [PATCH 62/64] tosa-bat-fix-charging
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/power/tosa_battery.c | 28 +++++++++++++++++++++-------
+ 1 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
+index 008e791..2db9116 100644
+--- a/drivers/power/tosa_battery.c
++++ b/drivers/power/tosa_battery.c
+@@ -153,39 +153,53 @@ static irqreturn_t tosa_bat_full_isr(int irq, void *data)
+ return IRQ_HANDLED;
+ }
+
++static char *status_text[] = {
++ [POWER_SUPPLY_STATUS_UNKNOWN] = "Unknown",
++ [POWER_SUPPLY_STATUS_CHARGING] = "Charging",
++ [POWER_SUPPLY_STATUS_DISCHARGING] = "Discharging",
++ [POWER_SUPPLY_STATUS_NOT_CHARGING] = "Not charging",
++ [POWER_SUPPLY_STATUS_FULL] = "Full",
++};
++
+ static void tosa_bat_update(struct tosa_bat *bat)
+ {
+- int old = bat->status;
++ int old;
+ struct power_supply *psy = &bat->psy;
+
+ mutex_lock(&bat->work_lock);
+
++ old = bat->status;
++
+ if (bat->is_present && !bat->is_present(bat)) {
+- printk(KERN_DEBUG "%s not present\n", psy->name);
++ printk(KERN_NOTICE "%s not present\n", psy->name);
+ bat->status = POWER_SUPPLY_STATUS_NOT_CHARGING;
+ bat->full_chrg = -1;
+ } else if (power_supply_am_i_supplied(psy)) {
++ if (bat->status == POWER_SUPPLY_STATUS_DISCHARGING) {
++ gpio_set_value(bat->gpio_charge_off, 0);
++ mdelay(15);
++ }
+ if (gpio_get_value(bat->gpio_full)) {
+- printk(KERN_DEBUG "%s full\n", psy->name);
+-
+ if (old == POWER_SUPPLY_STATUS_CHARGING || bat->full_chrg == -1)
+ bat->full_chrg = tosa_read_bat(bat);
+
+ gpio_set_value(bat->gpio_charge_off, 1);
+ bat->status = POWER_SUPPLY_STATUS_FULL;
+ } else {
+- printk(KERN_ERR "%s charge\n", psy->name);
+ gpio_set_value(bat->gpio_charge_off, 0);
+ bat->status = POWER_SUPPLY_STATUS_CHARGING;
+ }
+ } else {
+- printk(KERN_ERR "%s discharge\n", psy->name);
+ gpio_set_value(bat->gpio_charge_off, 1);
+ bat->status = POWER_SUPPLY_STATUS_DISCHARGING;
+ }
+
+- if (old != bat->status)
++ if (old != bat->status) {
++ printk(KERN_NOTICE "%s %s -> %s\n", psy->name,
++ status_text[old],
++ status_text[bat->status]);
+ power_supply_changed(psy);
++ }
+
+ mutex_unlock(&bat->work_lock);
+ }
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0063-patch-tosa-bat-jacket-detect.patch b/packages/linux/linux-rp-2.6.24/tosa/0063-patch-tosa-bat-jacket-detect.patch
new file mode 100644
index 0000000000..416cae44ec
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0063-patch-tosa-bat-jacket-detect.patch
@@ -0,0 +1,84 @@
+From 4ef7289137132959e3db5a1e77580ff9db185d90 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 8 Feb 2008 01:13:54 +0300
+Subject: [PATCH 63/64] patch tosa-bat-jacket-detect
+
+---
+ drivers/power/tosa_battery.c | 21 +++++++++++++++------
+ 1 files changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/drivers/power/tosa_battery.c b/drivers/power/tosa_battery.c
+index 2db9116..70beed2 100644
+--- a/drivers/power/tosa_battery.c
++++ b/drivers/power/tosa_battery.c
+@@ -137,8 +137,7 @@ static int tosa_bat_get_property(struct power_supply *psy,
+ }
+
+ static bool tosa_jacket_bat_is_present(struct tosa_bat *bat) {
+- // FIXME
+- return 1;
++ return gpio_get_value(TOSA_GPIO_JACKET_DETECT) == 0;
+ }
+
+ static void tosa_bat_external_power_changed(struct power_supply *psy)
+@@ -146,9 +145,9 @@ static void tosa_bat_external_power_changed(struct power_supply *psy)
+ schedule_work(&bat_work);
+ }
+
+-static irqreturn_t tosa_bat_full_isr(int irq, void *data)
++static irqreturn_t tosa_bat_gpio_isr(int irq, void *data)
+ {
+- printk(KERN_ERR "bat_full irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
++ printk(KERN_ERR "bat_gpio irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
+ schedule_work(&bat_work);
+ return IRQ_HANDLED;
+ }
+@@ -334,6 +333,7 @@ static struct {
+ { TOSA_GPIO_BAT1_CRG, "jacket battery full", 0, 0 },
+ { TOSA_GPIO_BAT0_LOW, "main battery low", 0, 0 },
+ { TOSA_GPIO_BAT1_LOW, "jacket battery low", 0, 0 },
++ { TOSA_GPIO_JACKET_DETECT, "jacket detect", 0, 0 },
+ };
+
+ #ifdef CONFIG_PM
+@@ -395,19 +395,27 @@ static int __devinit tosa_bat_probe(struct platform_device *dev)
+ goto err_psy_reg_bu;
+
+ ret = request_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG),
+- tosa_bat_full_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ tosa_bat_gpio_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "main full", &tosa_bat_main);
+ if (ret)
+ goto err_req_main;
+
+ ret = request_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG),
+- tosa_bat_full_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ tosa_bat_gpio_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "jacket full", &tosa_bat_jacket);
++ if (ret)
++ goto err_req_jacket;
++
++ ret = request_irq(gpio_to_irq(TOSA_GPIO_JACKET_DETECT),
++ tosa_bat_gpio_isr, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ "jacket detect", &tosa_bat_jacket);
+ if (!ret) {
+ schedule_work(&bat_work);
+ return 0;
+ }
+
++ free_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG), &tosa_bat_jacket);
++err_req_jacket:
+ free_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG), &tosa_bat_main);
+ err_req_main:
+ power_supply_unregister(&tosa_bat_bu.psy);
+@@ -429,6 +437,7 @@ static int __devexit tosa_bat_remove(struct platform_device *dev)
+ {
+ int i;
+
++ free_irq(gpio_to_irq(TOSA_GPIO_JACKET_DETECT), &tosa_bat_jacket);
+ free_irq(gpio_to_irq(TOSA_GPIO_BAT1_CRG), &tosa_bat_jacket);
+ free_irq(gpio_to_irq(TOSA_GPIO_BAT0_CRG), &tosa_bat_main);
+
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0064-Export-modes-via-sysfs.patch b/packages/linux/linux-rp-2.6.24/tosa/0064-Export-modes-via-sysfs.patch
new file mode 100644
index 0000000000..eeb92cfdd5
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0064-Export-modes-via-sysfs.patch
@@ -0,0 +1,27 @@
+From feeee5d22c00d9d1e2e06eb5610740be238749b9 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Thu, 7 Feb 2008 22:27:38 +0300
+Subject: [PATCH 64/64] Export modes via sysfs
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/video/tmiofb.c | 3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
+index 6b963a1..9389a77 100644
+--- a/drivers/video/tmiofb.c
++++ b/drivers/video/tmiofb.c
+@@ -800,6 +800,9 @@ static int tmiofb_probe(struct platform_device *dev)
+ if (retval)
+ goto err_set_par;*/
+
++ fb_videomode_to_modelist(data->modes, data->num_modes,
++ &info->modelist);
++
+ retval = register_framebuffer(info);
+ if (retval < 0)
+ goto err_register_framebuffer;
+--
+1.5.3.8
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0065-wm97xx-core-fixes.patch b/packages/linux/linux-rp-2.6.24/tosa/0065-wm97xx-core-fixes.patch
new file mode 100644
index 0000000000..5db0cc6ba0
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0065-wm97xx-core-fixes.patch
@@ -0,0 +1,49 @@
+From 2544412fc47dc13f4f3935cb4c2fd500d217e905 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 13 Feb 2008 02:00:15 +0300
+Subject: [PATCH] wm97xx-core fixes
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/input/touchscreen/wm97xx-core.c | 8 ++++----
+ include/linux/wm97xx.h | 1 -
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
+index 840d9ff..4cbb9e5 100644
+--- a/drivers/input/touchscreen/wm97xx-core.c
++++ b/drivers/input/touchscreen/wm97xx-core.c
+@@ -596,7 +596,7 @@ static int wm97xx_probe(struct device *dev)
+ }
+ platform_set_drvdata(wm->battery_dev, wm);
+ wm->battery_dev->dev.parent = dev;
+- ret = platform_device_register(wm->battery_dev);
++ ret = platform_device_add(wm->battery_dev);
+ if (ret < 0)
+ goto batt_reg_err;
+
+@@ -609,7 +609,7 @@ static int wm97xx_probe(struct device *dev)
+ }
+ platform_set_drvdata(wm->touch_dev, wm);
+ wm->touch_dev->dev.parent = dev;
+- ret = platform_device_register(wm->touch_dev);
++ ret = platform_device_add(wm->touch_dev);
+ if (ret < 0)
+ goto touch_reg_err;
+
+@@ -619,10 +619,12 @@ static int wm97xx_probe(struct device *dev)
+ platform_device_put(wm->touch_dev);
+ touch_err:
+ platform_device_unregister(wm->battery_dev);
++ wm->battery_dev = NULL;
+ batt_reg_err:
+ platform_device_put(wm->battery_dev);
+ batt_err:
+ input_unregister_device(wm->input_dev);
++ wm->input_dev = NULL;
+ kfree(wm);
+ return ret;
+ }
+--
+1.5.4.1
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0066-tmiofb_probe-should-be-__devinit.patch b/packages/linux/linux-rp-2.6.24/tosa/0066-tmiofb_probe-should-be-__devinit.patch
new file mode 100644
index 0000000000..42320be50b
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0066-tmiofb_probe-should-be-__devinit.patch
@@ -0,0 +1,26 @@
+From b6a63ad546cc26519a342f3fdd7b1def49ca33ee Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 13 Feb 2008 02:00:14 +0300
+Subject: [PATCH] tmiofb_probe should be __devinit
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/video/tmiofb.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
+index 9389a77..958ee8a 100644
+--- a/drivers/video/tmiofb.c
++++ b/drivers/video/tmiofb.c
+@@ -704,7 +704,7 @@ static irqreturn_t tmiofb_irq(int irq, void *__info)
+ return IRQ_HANDLED;
+ }
+
+-static int tmiofb_probe(struct platform_device *dev)
++static int __devinit tmiofb_probe(struct platform_device *dev)
+ {
+ struct mfd_cell *cell = mfd_get_cell(dev);
+ struct tmio_fb_data *data = cell->driver_data;
+--
+1.5.4.1
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0067-modeswitching.patch b/packages/linux/linux-rp-2.6.24/tosa/0067-modeswitching.patch
new file mode 100644
index 0000000000..42b69d9377
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0067-modeswitching.patch
@@ -0,0 +1,225 @@
+From aded2e51a7a2113dae6431c858df1d95fb312851 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Wed, 13 Feb 2008 19:34:08 +0300
+Subject: [PATCH] modeswitching
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ arch/arm/mach-pxa/tosa.c | 33 +++++++++++++++++++++++++++++++-
+ drivers/mfd/tc6393xb.c | 2 +-
+ drivers/video/backlight/tosa_bl.c | 38 +++++++++++++++++++++++++++++++++---
+ drivers/video/tmiofb.c | 8 +++---
+ include/asm-arm/arch-pxa/tosa.h | 2 +
+ include/linux/mfd/tc6393xb.h | 2 +-
+ include/linux/mfd/tmio.h | 2 +-
+ 7 files changed, 75 insertions(+), 12 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
+index 94c9915..6631de2 100644
+--- a/arch/arm/mach-pxa/tosa.c
++++ b/arch/arm/mach-pxa/tosa.c
+@@ -455,9 +455,40 @@ static struct fb_videomode tosa_tc6393xb_lcd_mode[] = {
+ }
+ };
+
++static DEFINE_SPINLOCK(tosa_lcd_mode_lock);
++
++static const struct fb_videomode *tosa_lcd_mode = &tosa_tc6393xb_lcd_mode[0];
++
++static int tosa_lcd_set_mode(struct platform_device *fb_dev,
++ const struct fb_videomode *mode)
++{
++ int rc;
++ unsigned long flags;
++
++ spin_lock_irqsave(&tosa_lcd_mode_lock, flags);
++ rc = tc6393xb_lcd_mode(fb_dev, mode);
++ if (!rc)
++ tosa_lcd_mode = mode;
++ spin_unlock_irqrestore(&tosa_lcd_mode_lock, flags);
++
++ return rc;
++}
++
++const struct fb_videomode *tosa_lcd_get_mode(void)
++{
++ unsigned long flags;
++ const struct fb_videomode *mode;
++
++ spin_lock_irqsave(&tosa_lcd_mode_lock, flags);
++ mode = tosa_lcd_mode;
++ spin_unlock_irqrestore(&tosa_lcd_mode_lock, flags);
++
++ return mode;
++}
++
+ static struct tmio_fb_data tosa_tc6393xb_fb_config = {
+ .lcd_set_power = tc6393xb_lcd_set_power,
+- .lcd_mode = tc6393xb_lcd_mode,
++ .lcd_mode = tosa_lcd_set_mode,
+ .num_modes = ARRAY_SIZE(tosa_tc6393xb_lcd_mode),
+ .modes = &tosa_tc6393xb_lcd_mode[0],
+ };
+diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
+index 9001687..21190f3 100644
+--- a/drivers/mfd/tc6393xb.c
++++ b/drivers/mfd/tc6393xb.c
+@@ -196,7 +196,7 @@ int tc6393xb_lcd_set_power(struct platform_device *fb, bool on)
+ EXPORT_SYMBOL(tc6393xb_lcd_set_power);
+
+ int tc6393xb_lcd_mode(struct platform_device *fb_dev,
+- struct fb_videomode *mode) {
++ const struct fb_videomode *mode) {
+ struct tc6393xb *tc6393xb =
+ platform_get_drvdata(to_platform_device(fb_dev->dev.parent));
+ struct tc6393xb_scr __iomem *scr = tc6393xb->scr;
+diff --git a/drivers/video/backlight/tosa_bl.c b/drivers/video/backlight/tosa_bl.c
+index 9ef0bfb..45fc6ae 100644
+--- a/drivers/video/backlight/tosa_bl.c
++++ b/drivers/video/backlight/tosa_bl.c
+@@ -48,6 +48,9 @@ struct tosa_bl_data {
+ struct ssp_dev nssp_dev;
+ struct ssp_state nssp_state;
+
++ /* listen for mode changes */
++ struct notifier_block fb_notif;
++
+ struct backlight_device *bl_dev;
+ };
+
+@@ -103,14 +106,19 @@ static void tosa_lcd_tg_init(struct tosa_bl_data *data)
+ pxa_nssp_output(data, TG_GPOSR,0x02); /* GPOS0=powercontrol, GPOS1=GPIO, GPOS2=TCTL */
+ }
+
+-static void tosa_lcd_tg_on(struct tosa_bl_data *data/*, const struct fb_videomode *mode*/)
++static void tosa_lcd_tg_on(struct tosa_bl_data *data)
+ {
+- const int value = TG_REG0_COLOR | TG_REG0_UD | TG_REG0_LR;
++ const struct fb_videomode *mode = tosa_lcd_get_mode();
++
++ int value = TG_REG0_COLOR | TG_REG0_UD | TG_REG0_LR;
++
++ if (mode->yres == 640)
++ value |= TG_REG0_VQV;
+
+ tosa_lcd_tg_init(data);
+
+- dev_dbg(&data->bl_dev->dev, "tosa_lcd_on\n");
+- pxa_nssp_output(data, TG_PNLCTL, value | (/*mode->yres == 320 ? 0 : */ TG_REG0_VQV));
++ dev_dbg(&data->bl_dev->dev, "tosa_lcd_on: %04x (%d)\n", value, mode->yres);
++ pxa_nssp_output(data, TG_PNLCTL, value);
+
+ /* TG LCD pannel power up */
+ pxa_nssp_output(data, TG_PINICTL,0x4);
+@@ -173,6 +181,20 @@ static struct backlight_ops tosa_bl_ops = {
+ .update_status = tosa_bl_update_status,
+ };
+
++static int fb_notifier_callback(struct notifier_block *self,
++ unsigned long event, void *_data)
++{
++ struct tosa_bl_data *bl_data =
++ container_of(self, struct tosa_bl_data, fb_notif);
++
++ if (event != FB_EVENT_MODE_CHANGE && event != FB_EVENT_MODE_CHANGE_ALL)
++ return 0;
++
++ tosa_bl_update_status(bl_data->bl_dev);
++
++ return 0;
++}
++
+ static int tosa_bl_detect_client(struct i2c_adapter *adapter, int address,
+ int kind)
+ {
+@@ -238,9 +260,15 @@ static int tosa_bl_detect_client(struct i2c_adapter *adapter, int address,
+ data->bl_dev->props.power = FB_BLANK_UNBLANK;
+ backlight_update_status(data->bl_dev);
+
++ data->fb_notif.notifier_call = fb_notifier_callback;
++ err = fb_register_client(&data->fb_notif);
++ if (err)
++ goto err_fb_register;
+
+ return 0;
+
++err_fb_register:
++ backlight_device_unregister(data->bl_dev);
+ err_bl_register:
+ tosa_set_backlight(data, 0);
+ tosa_lcd_tg_off(data);
+@@ -265,6 +293,8 @@ static int tosa_bl_detach_client(struct i2c_client *client)
+ int err = 0;
+ struct tosa_bl_data *data = i2c_get_clientdata(client);
+
++ fb_unregister_client(&data->fb_notif);
++
+ backlight_device_unregister(data->bl_dev);
+
+ tosa_set_backlight(data, 0);
+diff --git a/drivers/video/tmiofb.c b/drivers/video/tmiofb.c
+index 958ee8a..cc75df9 100644
+--- a/drivers/video/tmiofb.c
++++ b/drivers/video/tmiofb.c
+@@ -618,17 +618,17 @@ static int tmiofb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
+
+ static int tmiofb_set_par(struct fb_info *info)
+ {
+-/* struct fb_var_screeninfo *var = &info->var;
++ struct fb_var_screeninfo *var = &info->var;
+ struct fb_videomode *mode;
+
+ mode = tmiofb_find_mode(info, var);
+ if (!mode)
+ return -EINVAL;
+
+- if (info->mode == mode)
+- return 0;
++/* if (info->mode == mode)
++ return 0;*/
+
+- info->mode = mode; */
++ info->mode = mode;
+ info->fix.line_length = info->mode->xres * 2;
+
+ tmiofb_hw_mode(to_platform_device(info->device));
+diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h
+index 410fa9a..624c636 100644
+--- a/include/asm-arm/arch-pxa/tosa.h
++++ b/include/asm-arm/arch-pxa/tosa.h
+@@ -230,4 +230,6 @@ extern struct platform_device tosascoop_device;
+ #define TOSA_KEY_MAIL KEY_MAIL
+ #endif
+
++const struct fb_videomode *tosa_lcd_get_mode(void);
++
+ #endif /* _ASM_ARCH_TOSA_H_ */
+diff --git a/include/linux/mfd/tc6393xb.h b/include/linux/mfd/tc6393xb.h
+index 97c4c7c..8ab9e91 100644
+--- a/include/linux/mfd/tc6393xb.h
++++ b/include/linux/mfd/tc6393xb.h
+@@ -53,7 +53,7 @@ struct tc6393xb_platform_data {
+
+ extern int tc6393xb_lcd_set_power(struct platform_device *fb_dev, bool on);
+ extern int tc6393xb_lcd_mode(struct platform_device *fb_dev,
+- struct fb_videomode *mode);
++ const struct fb_videomode *mode);
+
+ /*
+ * Relative to irq_base
+diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h
+index b6d4aac..fe7ff2d 100644
+--- a/include/linux/mfd/tmio.h
++++ b/include/linux/mfd/tmio.h
+@@ -19,7 +19,7 @@ struct tmio_fb_data {
+ int (*lcd_set_power)(struct platform_device *fb_dev,
+ bool on);
+ int (*lcd_mode)(struct platform_device *fb_dev,
+- struct fb_videomode *mode);
++ const struct fb_videomode *mode);
+ int num_modes;
+ struct fb_videomode *modes;
+ };
+--
+1.5.4.1
+
diff --git a/packages/linux/linux-rp-2.6.24/tosa/0068-Preliminary-tosa-denoiser.patch b/packages/linux/linux-rp-2.6.24/tosa/0068-Preliminary-tosa-denoiser.patch
new file mode 100644
index 0000000000..e90e3751c0
--- /dev/null
+++ b/packages/linux/linux-rp-2.6.24/tosa/0068-Preliminary-tosa-denoiser.patch
@@ -0,0 +1,239 @@
+From f7dad1cd9c1bd3fce5d228e0b644a51baea50cd9 Mon Sep 17 00:00:00 2001
+From: Dmitry Baryshkov <dbaryshkov@gmail.com>
+Date: Fri, 15 Feb 2008 15:35:07 +0300
+Subject: [PATCH] Preliminary tosa denoiser
+
+Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
+---
+ drivers/input/touchscreen/Kconfig | 12 ++
+ drivers/input/touchscreen/Makefile | 1 +
+ drivers/input/touchscreen/tosa-wm97xx.c | 182 +++++++++++++++++++++++++++++++
+ 3 files changed, 195 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/input/touchscreen/tosa-wm97xx.c
+
+diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
+index 0be05a2..938aed2 100644
+--- a/drivers/input/touchscreen/Kconfig
++++ b/drivers/input/touchscreen/Kconfig
+@@ -210,6 +210,18 @@ config TOUCHSCREEN_WM97XX_MAINSTONE
+ To compile this driver as a module, choose M here: the
+ module will be called mainstone-wm97xx
+
++config TOUCHSCREEN_WM97XX_TOSA
++ tristate "WM97xx Tosa denoiser"
++ depends on TOUCHSCREEN_WM97XX && MACH_TOSA
++ help
++ Say Y here for support for touchscreen denoising on
++ Sharl Zaurus SL-6000 (tosa) system.
++
++ If unsure, say N
++
++ To compile this driver as a module, choose M here: the
++ module will be called tosa-wm97xx
++
+ config TOUCHSCREEN_TOUCHWIN
+ tristate "Touchwin serial touchscreen"
+ select SERIO
+diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
+index d38156e..d86278b 100644
+--- a/drivers/input/touchscreen/Makefile
++++ b/drivers/input/touchscreen/Makefile
+@@ -23,6 +23,7 @@ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o
+ obj-$(CONFIG_TOUCHSCREEN_WM97XX_MAINSTONE) += mainstone-wm97xx.o
++obj-$(CONFIG_TOUCHSCREEN_WM97XX_TOSA) += tosa-wm97xx.o
+ wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9705) += wm9705.o
+ wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9712) += wm9712.o
+ wm97xx-ts-$(CONFIG_TOUCHSCREEN_WM9713) += wm9713.o
+diff --git a/drivers/input/touchscreen/tosa-wm97xx.c b/drivers/input/touchscreen/tosa-wm97xx.c
+new file mode 100644
+index 0000000..8fd542b
+--- /dev/null
++++ b/drivers/input/touchscreen/tosa-wm97xx.c
+@@ -0,0 +1,182 @@
++/*
++ * tosa_ts.c -- Touchscreen driver for Sharp SL-6000 (Tosa).
++ *
++ * Copyright 2008 Dmitry Baryshkov
++ * Copyright 2006 Wolfson Microelectronics PLC.
++ * Author: Mike Arthur
++ * linux@wolfsonmicro.com
++ *
++ * 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.
++ *
++ * Revision history
++ * 1st Sep 2006 Initial version.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/wm97xx.h>
++#include <linux/fb.h>
++
++#include <asm/arch/tosa.h>
++#include <asm/gpio.h>
++
++static unsigned long hsync_time = 0;
++
++static void calc_hsync_time(const struct fb_videomode *mode)
++{
++ /* The 25 and 44 'magic numbers' are from Sharp's 2.4 patches */
++ if (mode->yres == 640) {
++ hsync_time = 25;
++ } else if (mode->yres == 320) {
++ hsync_time = 44;
++ } else {
++ printk(KERN_ERR "unknown video mode res specified: %dx%d!", mode->xres, mode->yres);
++ WARN_ON(1);
++ }
++
++ printk(KERN_ERR "tosa-wm97xx: using %lu hsync time\n", hsync_time);
++}
++
++static int fb_notifier_callback(struct notifier_block *self,
++ unsigned long event, void *_data)
++{
++ if (event != FB_EVENT_MODE_CHANGE && event != FB_EVENT_MODE_CHANGE_ALL)
++ return 0;
++
++ calc_hsync_time(tosa_lcd_get_mode());
++
++ return 0;
++}
++
++static void tosa_lcd_wait_hsync(void)
++{
++ /* Waits for a rising edge on the VGA line */
++ while (gpio_get_value(TOSA_GPIO_VGA_LINE) == 0);
++ while (gpio_get_value(TOSA_GPIO_VGA_LINE) != 0);
++}
++
++/* Taken from the Sharp 2.4 kernel code */
++#define CCNT(a) asm volatile ("mrc p14, 0, %0, C1, C1, 0" : "=r"(a))
++#define CCNT_ON() asm("mcr p14, 0, %0, C0, C0, 0" : : "r"(1))
++#define CCNT_OFF() asm("mcr p14, 0, %0, C0, C0, 0" : : "r"(0))
++
++/* On the Sharp SL-6000 (Tosa), due to a noisy LCD, we need to perform a wait
++ * before sampling the Y axis of the touchscreen */
++static void tosa_lcd_sync_on(int adcsel)
++{
++ unsigned long timer1 = 0, timer2 = 0, wait_time = 0;
++ if (adcsel & WM97XX_ADCSEL_Y) {
++ CCNT_ON();
++ wait_time = hsync_time;
++
++ if (wait_time) {
++
++ /* wait for LCD rising edge */
++ tosa_lcd_wait_hsync();
++ /* get clock */
++ CCNT(timer1);
++ CCNT(timer2);
++
++ while ((timer2 - timer1) < wait_time) {
++ CCNT(timer2);
++ }
++ }
++ }
++}
++
++static void tosa_lcd_sync_off(int adcsel)
++{
++ if (adcsel & WM97XX_ADCSEL_Y)
++ CCNT_OFF();
++}
++
++static struct wm97xx_mach_ops tosa_mach_ops = {
++ .pre_sample = tosa_lcd_sync_on,
++ .post_sample = tosa_lcd_sync_off,
++};
++
++static int __devinit tosa_ts_probe(struct platform_device *dev) {
++ struct wm97xx *wm = platform_get_drvdata(dev);
++ struct notifier_block *notif;
++ int err = -ENOMEM;
++
++ notif = kzalloc(sizeof(struct notifier_block), GFP_KERNEL);
++ if (!notif)
++ goto err_alloc;
++
++ notif->notifier_call = fb_notifier_callback;
++
++ err = gpio_request(TOSA_GPIO_VGA_LINE, "hsync");
++ if (err)
++ goto err_gpio;
++
++ err = gpio_direction_input(TOSA_GPIO_VGA_LINE);
++ if (err)
++ goto err_gpio;
++
++ platform_set_drvdata(dev, notif);
++
++ err = fb_register_client(notif);
++ if (err)
++ goto err_register;
++
++ err = wm97xx_register_mach_ops(wm, &tosa_mach_ops);
++ if (err)
++ goto err_wm97xx;
++
++ calc_hsync_time(tosa_lcd_get_mode());
++
++ return 0;
++
++err_wm97xx:
++ fb_unregister_client(notif);
++err_register:
++ gpio_free(TOSA_GPIO_VGA_LINE);
++err_gpio:
++ kfree(notif);
++err_alloc:
++ return err;
++}
++
++
++static int __devexit tosa_ts_remove(struct platform_device *dev) {
++ struct wm97xx *wm = platform_get_drvdata(dev);
++
++ wm97xx_unregister_mach_ops(wm);
++
++ fb_unregister_client(platform_get_drvdata(dev));
++ gpio_free(TOSA_GPIO_VGA_LINE);
++ kfree(platform_get_drvdata(dev));
++
++ return 0;
++}
++
++static struct platform_driver tosa_ts_driver = {
++ .driver.name = "wm97xx-touch",
++ .driver.owner = THIS_MODULE,
++ .probe = tosa_ts_probe,
++ .remove = __devexit_p(tosa_ts_remove),
++};
++
++static int __init tosa_ts_init(void)
++{
++ return platform_driver_register(&tosa_ts_driver);
++}
++
++static void __exit tosa_ts_exit(void)
++{
++ platform_driver_unregister(&tosa_ts_driver);
++}
++
++module_init(tosa_ts_init);
++module_exit(tosa_ts_exit);
++
++/* Module information */
++MODULE_AUTHOR("Dmitry Baryshkov, Mike Arthur, mike@mikearthur.co.uk, www.wolfsonmicro.com");
++MODULE_DESCRIPTION("Sharp SL6000 Tosa Touch Screen Denoiser");
++MODULE_LICENSE("GPL");
+--
+1.5.4.1
+
diff --git a/packages/linux/linux-rp_2.6.24.bb b/packages/linux/linux-rp_2.6.24.bb
index b3e04980de..48f964d7e7 100644
--- a/packages/linux/linux-rp_2.6.24.bb
+++ b/packages/linux/linux-rp_2.6.24.bb
@@ -5,6 +5,7 @@ PR = "r5"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_collie = "1"
DEFAULT_PREFERENCE_qemux86 = "1"
+DEFAULT_PREFERENCE_tosa = "1"
# Handy URLs
# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
@@ -68,9 +69,8 @@ SRC_URI = "${KERNELORG_MIRROR}pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
file://defconfig-qemux86 \
file://defconfig-bootcdx86 \
file://defconfig-htcuniversal \
+ file://defconfig-tosa \
file://defconfig-zylonite"
-# Tosa disabled until the patchset is updated
-# file://defconfig-tosa
# FIXMEs before made default
# ${RPSRC}/mmcsd_no_scr_check-r1.patch;patch=1;status=hack
@@ -109,34 +109,75 @@ SRC_URI_append_poodle = "\
"
SRC_URI_append_tosa = "\
- ${CHSRC}/tmio-core-r4.patch;patch=1 \
- file://tmio-tc6393-r8.patch;patch=1 \
- file://tmio-nand-r8.patch;patch=1 \
- ${CHSRC}/tmio-fb-r6.patch;patch=1 \
- file://tmio-fb-r6-fix-r0.patch;patch=1 \
- file://tosa-keyboard-r19.patch;patch=1 \
- ${DOSRC}/tosa-pxaac97-r6.patch;patch=1 \
- file://tosa-pxaac97-r6-fix-r0.patch;patch=1 \
- ${DOSRC}/tosa-tmio-r6.patch;patch=1 \
- file://tosa-power-r18.patch;patch=1 \
- file://tosa-power-r18-fix-r0.patch;patch=1 \
- file://tosa-tmio-lcd-r10.patch;patch=1 \
- file://tosa-tmio-lcd-r10-fix-r0.patch;patch=1 \
- file://tosa-bluetooth-r8.patch;patch=1 \
- file://wm97xx-lg13-r0.patch;patch=1 \
- file://wm97xx-lg13-r0-fix-r0.patch;patch=1 \
- file://wm9712-suspend-cold-res-r2.patch;patch=1 \
- file://sharpsl-pm-postresume-r1.patch;patch=1 \
- file://wm9712-reset-loop-r2.patch;patch=1 \
- file://tosa-lcdnoise-r1.patch;patch=1 \
- file://tosa-lcdnoise-r1-fix-r0.patch;patch=1 \
- file://arm-dma-coherent.patch;patch=1 \
- file://usb-ohci-hooks-r3.patch;patch=1 \
- file://tmio-ohci-r9.patch;patch=1 \
- file://pxa2xx_udc_support_inverse_vbus.patch;patch=1 \
- file://tosa_udc_use_gpio_vbus.patch;patch=1 \
+ file://tosa/0001-Allow-runtime-registration-of-regions-of-memory-that.patch;patch=1 \
+ file://tosa/0002-Modify-dma_alloc_coherent-on-ARM-so-that-it-supports.patch;patch=1 \
+ file://tosa/0003-Core-MFD-support.patch;patch=1 \
+ file://tosa/0004-Add-support-for-tc6393xb-MFD-core.patch;patch=1 \
+ file://tosa/0005-Add-support-for-tc6387xb-MFD-core.patch;patch=1 \
+ file://tosa/0006-Add-support-for-t7l66xb-MFD-core.patch;patch=1 \
+ file://tosa/0007-Common-headers-for-TMIO-MFD-subdevices.patch;patch=1 \
+ file://tosa/0008-Nand-driver-for-TMIO-devices.patch;patch=1 \
+ file://tosa/0009-FB-driver-for-TMIO-devices.patch;patch=1 \
+ file://tosa/0010-OHCI-driver-for-TMIO-devices.patch;patch=1 \
+ file://tosa/0011-MMC-driver-for-TMIO-devices.patch;patch=1 \
+ file://tosa/0012-Tosa-keyboard-support.patch;patch=1 \
+ file://tosa/0013-USB-gadget-pxa2xx_udc-supports-inverted-vbus.patch;patch=1 \
+ file://tosa/0014-tosa_udc_use_gpio_vbus.patch.patch;patch=1 \
+ file://tosa/0015-sharpsl-export-params.patch;patch=1 \
+ file://tosa/0016-This-patch-fixes-the-pxa25x-clocks-definitions-to-ad.patch;patch=1 \
+ file://tosa/0017-Convert-pxa2xx-UDC-to-use-debugfs.patch;patch=1 \
+ file://tosa/0018-Fix-the-pxa2xx_udc-to-balance-calls-to-clk_enable-cl.patch;patch=1 \
+ file://tosa/0026-I-don-t-think-we-should-check-for-IRQs-when-determin.patch;patch=1 \
+ file://tosa/0027-Add-LiMn-one-of-the-most-common-for-small-non-recha.patch;patch=1 \
+ file://tosa/0028-Add-suspend-resume-wakeup-support-for-pda_power.patch;patch=1 \
+ file://tosa/0029-Support-using-VOLTAGE_-properties-for-apm-calculati.patch;patch=1 \
+ file://tosa/0030-Core-driver-for-WM97xx-touchscreens.patch;patch=1 \
+ file://tosa/0031-Add-chip-driver-for-WM9705-touchscreen.patch;patch=1 \
+ file://tosa/0032-Add-chip-driver-for-WM9712-touchscreen.patch;patch=1 \
+ file://tosa/0033-Add-chip-driver-for-WM9713-touchscreen.patch;patch=1 \
+ file://tosa/0034-Driver-for-WM97xx-touchscreens-in-streaming-mode-on.patch;patch=1 \
+ file://tosa/0035-Build-system-and-MAINTAINERS-entry-for-WM97xx-touchs.patch;patch=1 \
+ file://tosa/0036-Set-id-to-1-for-wm97xx-subdevices.patch;patch=1 \
+ file://tosa/0037-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch;patch=1 \
+ file://tosa/0038-Don-t-lock-the-codec-list-in-snd_soc_dapm_new_widget.patch;patch=1 \
+ file://tosa/0044-fix-tmio_mmc-debug-compilation.patch;patch=1 \
+ file://tosa/0045-Update-tmio_ohci.patch;patch=1 \
+ file://tosa/0046-patch-tc6393xb-cleanup.patch;patch=1 \
+ file://tosa/0047-tc6393xb-use-bitmasks-instead-of-bit-field-structs.patch;patch=1 \
+ file://tosa/0048-tc6393xb-GPIO-support.patch;patch=1 \
+ file://tosa/0049-platform-support-for-TMIO-on-tosa.patch;patch=1 \
+ file://tosa/0050-tosa-update-for-tc6393xb-gpio.patch;patch=1 \
+ file://tosa/0051-fix-sound-soc-pxa-tosa.c-to-new-gpio-api.patch;patch=1 \
+ file://tosa/0052-tosa-platform-backlight-support.patch;patch=1 \
+ file://tosa/0053-sound-soc-codecs-wm9712.c-28.patch;patch=1 \
+ file://tosa/0054-sound-soc-codecs-wm9712.c-2.patch;patch=1 \
+ file://tosa/0055-Add-GPIO_POWERON-to-the-list-of-devices-that-we-supp.patch;patch=1 \
+ file://tosa/0058-Fix-tosakbd-suspend.patch;patch=1 \
+ file://tosa/0059-patch-tosa-wakeup-test.patch;patch=1 \
+ file://tosa/0060-Add-support-for-power_supply-on-tosa.patch;patch=1 \
+ file://tosa/0061-tosa-bat-unify.patch;patch=1 \
+ file://tosa/0062-tosa-bat-fix-charging.patch;patch=1 \
+ file://tosa/0063-patch-tosa-bat-jacket-detect.patch;patch=1 \
+ file://tosa/0064-Export-modes-via-sysfs.patch;patch=1 \
+ file://tosa/0065-wm97xx-core-fixes.patch;patch=1 \
+ file://tosa/0066-tmiofb_probe-should-be-__devinit.patch;patch=1 \
+ file://tosa/0067-modeswitching.patch;patch=1 \
+ file://tosa/0068-Preliminary-tosa-denoiser.patch;patch=1 \
+ file://tosa/0019-pxa-remove-periodic-mode-emulation-support.patch;patch=1 \
+ file://tosa/0020-Provide-dew-device-clock-backports-from-2.6.24-git.patch;patch=1 \
+ file://tosa/0021-Add-an-empty-drivers-gpio-directory-for-gpiolib-infr.patch;patch=1 \
+ file://tosa/0022-Provide-new-implementation-infrastructure-that-platf.patch;patch=1 \
+ file://tosa/0023-This-adds-gpiolib-support-for-the-PXA-architecture.patch;patch=1 \
+ file://tosa/0024-Update-Documentation-gpio.txt-primarily-to-include.patch;patch=1 \
+ file://tosa/0025-Signed-off-by-Dmitry-Baryshkov-dbaryshkov-gmail.co.patch;patch=1 \
+ file://tosa/0039-Add-generic-framework-for-managing-clocks.patch;patch=1 \
+ file://tosa/0040-Clocklib-debugfs-support.patch;patch=1 \
+ file://tosa/0041-From-80a359e60c2aec59ccf4fca0a7fd20495f82b1d2-Mon-Se.patch;patch=1 \
+ file://tosa/0042-Use-correct-clock-for-IrDA-on-pxa.patch;patch=1 \
+ file://tosa/0043-Use-clocklib-for-sa1100-sub-arch.patch;patch=1 \
+ file://tosa/0056-Support-resetting-by-asserting-GPIO-pin.patch;patch=1 \
+ file://tosa/0057-Clean-up-tosa-resetting.patch;patch=1 \
"
-# ${DOSRC}/tosa-asoc-r1.patch;patch=1 "
SRC_URI_append_akita = "\
file://mtd-module.patch;patch=1;status=external \
diff --git a/packages/linux/linux.inc b/packages/linux/linux.inc
index 835437415f..e0303c272f 100644
--- a/packages/linux/linux.inc
+++ b/packages/linux/linux.inc
@@ -144,6 +144,5 @@ do_deploy() {
do_deploy[dirs] = "${S}"
-addtask sizecheck before do_install after do_compile
addtask deploy before do_package after do_install
diff --git a/packages/linux/linux_2.6.24.bb b/packages/linux/linux_2.6.24.bb
index 40ffef7d0b..7fc1aa38ca 100644
--- a/packages/linux/linux_2.6.24.bb
+++ b/packages/linux/linux_2.6.24.bb
@@ -6,20 +6,21 @@ DEFAULT_PREFERENCE_gesbc-9302 = "1"
DEFAULT_PREFERENCE_cm-x270 = "1"
DEFAULT_PREFERENCE_mpc8313e-rdb = "1"
DEFAULT_PREFERENCE_simpad = "1"
+DEFAULT_PREFERENCE_atngw100 = "1"
+DEFAULT_PREFERENCE_at32stk1000 = "1"
DEPENDS_append_mpc8313e-rdb = " dtc-native"
-PR = "r7"
+PR = "r9"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2 \
http://kamikaze.waninkoko.info/patches/2.6.24/kamikaze1/broken-out/squashfs-lzma-2.6.24.patch;patch=1 \
- file://powerpc-clockres.patch;patch=1 \
- file://leds-cpu-activity.patch;patch=1 \
- file://leds-cpu-activity-powerpc.patch;patch=1 \
file://defconfig"
-# Real-time preemption. This is experimental and requires a different defconfig.
-#SRC_URI += " http://www.kernel.org/pub/linux/kernel/projects/rt/patch-2.6.24-rt1.bz2;patch=1"
+# Moved away temporarely until committed properly (work in progress).
+# file://powerpc-clockres.patch;patch=1 \
+# file://leds-cpu-activity.patch;patch=1 \
+# file://leds-cpu-activity-powerpc.patch;patch=1 \
SRC_URI_append_simpad = "\
file://linux-2.6.24-SIMpad-GPIO-MMC-mod.patch;patch=1 \
@@ -32,6 +33,7 @@ SRC_URI_append_simpad = "\
file://linux-2.6.24-SIMpad-ucb1x00-ts-supend-and-accuracy.patch;patch=1 \
file://linux-2.6.24-SIMpad-hostap_cs-shared-irq.patch;patch=1 \
file://linux-2.6.24-SIMpad-orinoco_cs-shared-irq.patch;patch=1 \
+ file://linux-2.6.24-SIMpad-rtc-sa1100.patch;patch=1 \
file://collie-kexec.patch;patch=1 \
file://export_atags-r2.patch;patch=1 \
"
@@ -57,6 +59,11 @@ SRC_URI_append_cm-x270 = " \
file://0005-add-display-set-default-16bpp.patch;patch=1 \
"
+SRC_URI_avr32 = "http://avr32linux.org/twiki/pub/Main/LinuxPatches/linux-2.6.24.3.atmel.3.tar.bz2 \
+ file://defconfig"
+S_avr32 = "${WORKDIR}/linux-2.6.24.3.atmel.3"
+
+
CMDLINE_cm-x270 = "console=${CMX270_CONSOLE_SERIAL_PORT},38400 monitor=1 mem=64M mtdparts=physmap-flash.0:256k(boot)ro,0x180000(kernel),-(root);cm-x270-nand:64m(app),-(data) rdinit=/sbin/init root=mtd3 rootfstype=jffs2"
FILES_kernel-image_gesbc-9302 = ""
diff --git a/packages/man-pages/man-pages_2.41.bb b/packages/man-pages/man-pages_2.41.bb
index d12d9ff4f5..18cfc1737e 100644
--- a/packages/man-pages/man-pages_2.41.bb
+++ b/packages/man-pages/man-pages_2.41.bb
@@ -1,7 +1,7 @@
SECTION = "base"
DESCRIPTION = "base set of man pages."
LICENSE = "GPL"
-SRC_URI = "${KERNELORG_MIRROR}/pub/linux/docs/manpages/man-pages-${PV}.tar.bz2"
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/docs/man-pages/Archive/man-pages-${PV}.tar.bz2"
EXTRA_OEMAKE = ""
do_compile () {
diff --git a/packages/man-pages/man-pages_2.79.bb b/packages/man-pages/man-pages_2.79.bb
new file mode 100644
index 0000000000..18cfc1737e
--- /dev/null
+++ b/packages/man-pages/man-pages_2.79.bb
@@ -0,0 +1,15 @@
+SECTION = "base"
+DESCRIPTION = "base set of man pages."
+LICENSE = "GPL"
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/docs/man-pages/Archive/man-pages-${PV}.tar.bz2"
+
+EXTRA_OEMAKE = ""
+do_compile () {
+ :
+}
+
+do_install () {
+ oe_runmake 'prefix=${D}' install
+}
+
+FILES_${PN} = "*"
diff --git a/packages/maradns/maradns_1.0.41.bb b/packages/maradns/maradns_1.0.41.bb
new file mode 100644
index 0000000000..a8bed6f05e
--- /dev/null
+++ b/packages/maradns/maradns_1.0.41.bb
@@ -0,0 +1,43 @@
+DESCRIPTION = "A security-aware DNS server"
+SECTION = "console/network"
+HOMEPAGE = "http://www.maradns.org"
+LICENSE = "PD"
+
+SRC_URI = "http://www.maradns.org/download/1.0/maradns-${PV}.tar.bz2 \
+ file://init \
+ file://rng-makefile-build-cc.patch;patch=1;pnum=0"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -d ${D}${sbindir}
+ install -d ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}/mararc
+ install -d ${D}${sysconfdir}/init.d
+ install -d ${D}${mandir}/man1
+ install -d ${D}${mandir}/man5
+ install -d ${D}${mandir}/man8
+
+ sed -i -e "s:PREFIX/man:PREFIX/share/man:" \
+ -e "s:PREFIX/doc/maradns-\$VERSION:PREFIX/share/doc/${PF}:" \
+ build/install.locations
+
+ oe_runmake \
+ TOPLEVEL=${S} \
+ BUILDDIR=${S}/build \
+ RPM_BUILD_ROOT=${D} \
+ PREFIX=${D}/usr \
+ MAN1=${D}${mandir}/man1 \
+ MAN5=${D}${mandir}/man5 \
+ MAN8=${D}${mandir}/man8 \
+ install
+
+ mv ${D}${sysconfdir}/mararc/example_mararc ${D}${sysconfdir}/maradns/mararc
+ rm -r ${D}${sysconfdir}/mararc/
+ install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/maradns
+}
+
+PACKAGES =+ "maradns-zone maradns-ask"
+FILES_maradns-zone = "${sbindir}/zoneserver ${bindir}/getzone"
+FILES_maradns-ask = "${bindir}/askmara"
+
+CONFFILES_${PN}_nylon = "/etc/maradns/mararc"
diff --git a/packages/meta/cross-linkage_1.0.bb b/packages/meta/cross-linkage_1.0.bb
index 2a9caca5da..9be09aa6f8 100644
--- a/packages/meta/cross-linkage_1.0.bb
+++ b/packages/meta/cross-linkage_1.0.bb
@@ -3,6 +3,7 @@ SECTION = "devel"
PACKAGES = ""
INHIBIT_DEFAULT_DEPS = "1"
+EXCLUDE_FROM_WORLD = "1"
PR = "r0"
SRC_URI = ""
@@ -21,8 +22,14 @@ do_install() {
do_stage () {
install -d ${CROSS_DIR}/${TARGET_SYS}/
- rm -rf ${CROSS_DIR}/${TARGET_SYS}/include
+ if [ -e ${CROSS_DIR}/${TARGET_SYS}/include ]; then
+ cp -pPRr ${CROSS_DIR}/${TARGET_SYS}/include/* ${STAGING_INCDIR}
+ mv ${CROSS_DIR}/${TARGET_SYS}/include/ ${CROSS_DIR}/${TARGET_SYS}/include-oldbackup
+ fi
ln -s ${STAGING_INCDIR}/ ${CROSS_DIR}/${TARGET_SYS}/include
- rm -rf ${CROSS_DIR}/${TARGET_SYS}/lib
+ if [ -e ${CROSS_DIR}/${TARGET_SYS}/lib ]; then
+ cp -pPRr ${CROSS_DIR}/${TARGET_SYS}/lib/* ${STAGING_LIBDIR}
+ mv ${CROSS_DIR}/${TARGET_SYS}/lib/ ${CROSS_DIR}/${TARGET_SYS}/lib-oldbackup
+ fi
ln -s ${STAGING_LIBDIR} ${CROSS_DIR}/${TARGET_SYS}/lib
}
diff --git a/packages/meta/external-toolchain.bb b/packages/meta/external-toolchain.bb
index 03e4403dbe..c7e1d5d3c4 100644
--- a/packages/meta/external-toolchain.bb
+++ b/packages/meta/external-toolchain.bb
@@ -11,7 +11,6 @@ PROVIDES = "\
virtual/libc \
virtual/libintl \
virtual/libiconv \
- glibc-thread-db \
"
RPROVIDES = "glibc-utils libsegfault glibc-thread-db libgcc-dev libstdc++-dev libstdc++"
diff --git a/packages/meta/meta-toolchain.bb b/packages/meta/meta-toolchain.bb
index 3c92712dff..2bce56492c 100644
--- a/packages/meta/meta-toolchain.bb
+++ b/packages/meta/meta-toolchain.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Meta package for building a installable toolchain"
LICENSE = "MIT"
-DEPENDS = "ipkg-native ipkg-utils-native fakeroot-native sed-native"
+DEPENDS = "opkg-native ipkg-utils-native fakeroot-native sed-native"
inherit sdk meta
@@ -9,8 +9,8 @@ SDK_OUTPUT = "${SDK_DIR}/image"
SDK_OUTPUT2 = "${SDK_DIR}/image-extras"
SDK_DEPLOY = "${TMPDIR}/deploy/sdk"
-IPKG_HOST = "ipkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
-IPKG_TARGET = "ipkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/temp-target"
+IPKG_HOST = "opkg-cl -f ${IPKGCONF_SDK} -o ${SDK_OUTPUT}"
+IPKG_TARGET = "opkg-cl -f ${IPKGCONF_TARGET} -o ${SDK_OUTPUT}/temp-target"
TOOLCHAIN_HOST_TASK ?= "task-sdk-host"
TOOLCHAIN_TARGET_TASK ?= "task-sdk-bare"
@@ -40,8 +40,8 @@ do_populate_sdk() {
mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include
mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/
mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/share
- mv ${SDK_OUTPUT}/temp-target/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status
- rm -rf ${SDK_OUTPUT}/temp-target/usr/lib/ipkg/
+ mv ${SDK_OUTPUT}/temp-target/usr/lib/opkg/status ${SDK_OUTPUT}/${prefix}/package-status
+ rm -rf ${SDK_OUTPUT}/temp-target/usr/lib/opkg/
cp -pPR ${SDK_OUTPUT}/temp-target/usr/include/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
cp -pPR ${SDK_OUTPUT}/temp-target/usr/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/
if [ -d ${SDK_OUTPUT}/temp-target/usr/lib/.debug ]; then
@@ -69,7 +69,7 @@ do_populate_sdk() {
echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libc.so
# remove unwanted housekeeping files
- mv ${SDK_OUTPUT}/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status-host
+ mv ${SDK_OUTPUT}/usr/lib/opkg/status ${SDK_OUTPUT}/${prefix}/package-status-host
rm -Rf ${SDK_OUTPUT}/usr/lib
# extract and store ipks, pkgdata and shlibs data
diff --git a/packages/meta/staging-linkage_1.0.bb b/packages/meta/staging-linkage_1.0.bb
index b718868138..95d82d3273 100644
--- a/packages/meta/staging-linkage_1.0.bb
+++ b/packages/meta/staging-linkage_1.0.bb
@@ -3,6 +3,7 @@ SECTION = "devel"
PACKAGES = ""
INHIBIT_DEFAULT_DEPS = "1"
+EXCLUDE_FROM_WORLD = "1"
PR = "r0"
SRC_URI = ""
@@ -22,7 +23,7 @@ do_install() {
do_stage () {
if [ -e ${STAGING_DIR_HOST}${layout_base_libdir} ]; then
cp -pPRr ${STAGING_DIR_HOST}${layout_base_libdir}/* ${STAGING_LIBDIR}
- mv ${STAGING_DIR_HOST}${layout_base_libdir}/ ${STAGING_DIR_HOST}${layout_libdir}-oldbackup/
+ mv ${STAGING_DIR_HOST}${layout_base_libdir}/ ${STAGING_DIR_HOST}${layout_libdir}-oldbackup
fi
ln -s ${STAGING_LIBDIR}/ ${STAGING_DIR_HOST}${layout_base_libdir}
}
diff --git a/packages/mono/mono-mcs-intermediate.inc b/packages/mono/mono-mcs-intermediate.inc
index f6631c1eb1..f54ce46045 100644
--- a/packages/mono/mono-mcs-intermediate.inc
+++ b/packages/mono/mono-mcs-intermediate.inc
@@ -43,7 +43,7 @@ do_package() {
true
}
-do_populate_staging() {
+do_stage() {
cd ${D}
rm -f ${WORKDIR}/mono-mcs-${PV}.tar.gz
tar -cvzf ${WORKDIR}/mono-mcs-${PV}.tar.gz .
diff --git a/packages/mpeg2dec/mpeg2dec_0.4.0b.bb b/packages/mpeg2dec/mpeg2dec_0.4.0b.bb
index 571ddc4b12..3f1ef9e877 100644
--- a/packages/mpeg2dec/mpeg2dec_0.4.0b.bb
+++ b/packages/mpeg2dec/mpeg2dec_0.4.0b.bb
@@ -25,7 +25,7 @@ do_stage () {
done
}
-PACKAGES += "mpeg2dec libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev"
+PACKAGES += "libmpeg2 libmpeg2-dev libmpeg2convert libmpeg2convert-dev"
FILES_${PN} = "${bindir}/*"
FILES_libmpeg2 = "${libdir}/libmpeg2.so.*"
diff --git a/packages/mplayer/mplayer_0.0+1.0rc1.bb b/packages/mplayer/mplayer_0.0+1.0rc1.bb
index c0062bddd9..f89364335c 100644
--- a/packages/mplayer/mplayer_0.0+1.0rc1.bb
+++ b/packages/mplayer/mplayer_0.0+1.0rc1.bb
@@ -38,7 +38,7 @@ PACKAGE_ARCH_mencoder_collie = "collie"
RCONFLICTS_${PN} = "mplayer-atty"
RREPLACES_${PN} = "mplayer-atty"
-PR = "r15"
+PR = "r16"
PARALLEL_MAKE = ""
@@ -54,6 +54,9 @@ FILES_mencoder = "${bindir}/mencoder"
inherit autotools pkgconfig
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math"
+BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
+
EXTRA_OECONF = " \
--prefix=/usr \
--mandir=${mandir} \
diff --git a/packages/mplayer/mplayer_0.0+1.0rc2.bb b/packages/mplayer/mplayer_0.0+1.0rc2.bb
index d963ac03cf..db2671891c 100644
--- a/packages/mplayer/mplayer_0.0+1.0rc2.bb
+++ b/packages/mplayer/mplayer_0.0+1.0rc2.bb
@@ -6,6 +6,8 @@ DEPENDS = "virtual/libsdl xsp libmad zlib libpng jpeg liba52 freetype fontconfig
DEPENDS_append_c7x0 = " libw100 "
DEPENDS_append_hx4700 = " libw100 "
+DEFAULT_PREFERENCE_avr32 = "-1"
+
RDEPENDS = "mplayer-common"
LICENSE = "GPL"
SRC_URI = "http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2 \
@@ -40,7 +42,7 @@ PACKAGE_ARCH_hx4700 = "hx4700"
RCONFLICTS_${PN} = "mplayer-atty"
RREPLACES_${PN} = "mplayer-atty"
-PR = "r6"
+PR = "r7"
PARALLEL_MAKE = ""
@@ -187,6 +189,10 @@ TARGET_CC_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', '-march=iwmmxt
EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', '--enable-pxa --enable-iwmmxt', '',d)} "
EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'x86', '--enable-runtime-cpudetection', '',d)} "
+FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math"
+BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
+
+
do_configure() {
cp ${WORKDIR}/vo_w100.c ${S}/libvo
cp ${WORKDIR}/vo_w100_api.h ${S}/libvo
diff --git a/packages/nano/files/.mtn2git_empty b/packages/nano/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/nano/files/.mtn2git_empty
diff --git a/packages/nano/nano-1.2.1/glib.m4 b/packages/nano/files/glib.m4
index b8094bbfe0..b8094bbfe0 100644
--- a/packages/nano/nano-1.2.1/glib.m4
+++ b/packages/nano/files/glib.m4
diff --git a/packages/nano/nano-1.2.1/configure.patch b/packages/nano/nano-1.2.1/configure.patch
deleted file mode 100644
index c8008221a0..0000000000
--- a/packages/nano/nano-1.2.1/configure.patch
+++ /dev/null
@@ -1,1116 +0,0 @@
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
---- nano-1.2.1/configure.ac~configure
-+++ nano-1.2.1/configure.ac
-@@ -19,12 +19,12 @@
- #
- # $Id: configure.ac,v 1.44 2003/03/11 03:50:39 astyanax Exp $
-
--AC_INIT([GNU Nano], [1.2.1], [nano-devel@gnu.org], [nano])
-+AC_INIT([GNU Nano],[1.2.1],[nano-devel@gnu.org],[nano])
- AC_CONFIG_SRCDIR([nano.c])
- AM_INIT_AUTOMAKE
- AM_CONFIG_HEADER([config.h:config.h.in])
-
--AC_PREREQ(2.52)
-+AC_PREREQ(2.57)
-
- dnl Checks for programs.
- AC_PROG_CC
-@@ -38,14 +38,15 @@
- dnl Checks for header files.
- AC_HEADER_STDC
- AC_CHECK_HEADERS(fcntl.h getopt.h libintl.h limits.h regex.h termio.h termios.h unistd.h)
-+
- AC_CHECK_HEADER(regex.h,
-- AC_MSG_CHECKING([for broken regexec])
-- AC_TRY_RUN([
-+ AC_CACHE_CHECK([for broken regexec],
-+ ac_cv_regexec_segfault_emptystr,
-+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <sys/types.h>
- #include <regex.h>
--int main() { regex_t reg; size_t n; regmatch_t r; regcomp(&reg, ".", 0); regexec(&reg, "", n, &r, 0); return 0; }],
-- AC_MSG_RESULT(no),
-- AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, [Define this if your regexec() function segfaults when passed an empty string.])
-+int main() { regex_t reg; size_t n; regmatch_t r; regcomp(&reg, ".", 0); regexec(&reg, "", n, &r, 0); return 0; }]])],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(yes); AC_DEFINE(BROKEN_REGEXEC, 1, Define this if your regexec() function segfaults when passed an empty string.)
-+ ],[])
- )
- )
-
-@@ -198,11 +199,10 @@
- AC_MSG_CHECKING([for SLtt_initialize in -lslang])
- _libs=$LIBS
- LIBS="$LIBS -lslang"
-- AC_TRY_RUN([
-+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <stdio.h>
- #include <slcurses.h>
--int main () { SLtt_initialize (NULL); return 0; }],
-- [AC_MSG_RESULT(yes)
-+int main () { SLtt_initialize (NULL); return 0; }]])],[AC_MSG_RESULT(yes)
- AC_DEFINE(USE_SLANG, 1, [Define to use the slang wrappers for curses instead of native curses.])
- slang_support=yes
- if test "$with_slang" != "yes"; then
-@@ -210,7 +210,7 @@
- else
- CURSES_LIB="-lslang"
- fi
-- CURSES_LIB_NAME=slang], [
-+ CURSES_LIB_NAME=slang],[
- AC_MSG_RESULT(no)
- # We might need the term library
- for termlib in ncurses curses termcap terminfo termlib; do
-@@ -220,7 +220,7 @@
-
- AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap])
- LIBS="$LIBS $tcap"
-- AC_TRY_RUN([
-+AC_TRY_RUN([
- #include <stdio.h>
- #include <slcurses.h>
- int main () { SLtt_initialize (NULL); return 0; }],
-@@ -237,7 +237,7 @@
- # We might need the math library
- AC_MSG_CHECKING([for SLtt_initialize in -lslang $tcap -lm])
- LIBS="$LIBS -lm"
-- AC_TRY_RUN([
-+AC_TRY_RUN([
- #include <stdio.h>
- #include <slcurses.h>
- int main () { SLtt_initialize (NULL); return 0; }],
-@@ -252,8 +252,7 @@
- CURSES_LIB_NAME=slang],
- [AC_MSG_RESULT(no)],
- AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
--AC_MSG_WARN([*** Can not use slang when cross-compiling]))],
--AC_MSG_WARN([*** Can not use slang when cross-compiling])),
-+AC_MSG_WARN([*** Can not use slang when cross-compiling]))],[AC_MSG_WARN(*** Can not use slang when cross-compiling)]),
- AC_MSG_ERROR([
- *** The header file slcurses.h was not found. If you wish to use
- *** slang support this header file is required. Please either
-@@ -334,12 +333,11 @@
- # Taken from aumix (can't tell from the variable name?)
- AC_CACHE_CHECK([for private member _use_keypad in WINDOW],
- aumix_cv_struct_window_usekeypad,
-- [AC_TRY_COMPILE([#ifdef HAVE_NCURSES_H
-+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NCURSES_H
- #include <ncurses.h>
- #else
- #include <curses.h>
--#endif], [WINDOW w; w._use_keypad;],
-- aumix_cv_struct_window_usekeypad=yes, aumix_cv_struct_window_usekeypad=no)])
-+#endif]], [[WINDOW w; w._use_keypad;]])],[aumix_cv_struct_window_usekeypad=yes],[aumix_cv_struct_window_usekeypad=no])])
-
- if test $aumix_cv_struct_window_usekeypad = yes; then
- AC_DEFINE(HAVE_USEKEYPAD, 1, [Define this if your curses lib has the _use_keypad flag.])
---- nano-1.2.1/configure~configure
-+++ nano-1.2.1/configure
-@@ -310,7 +310,7 @@
- # include <unistd.h>
- #endif"
-
--ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os USE_NLS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB CPP EGREP GLIB_CONFIG GLIB_CFLAGS GLIB_LIBS CURSES_LIB LIBOBJS LTLIBOBJS'
-+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os USE_NLS LIBICONV LTLIBICONV INTLLIBS LIBINTL LTLIBINTL POSUB CPP EGREP GLIB_CONFIG GLIB_CFLAGS GLIB_LIBS CURSES_LIB LIBOBJS LTLIBOBJS'
- ac_subst_files=''
-
- # Initialize some variables set by options.
-@@ -1314,7 +1314,7 @@
-
-
-
--am__api_version="1.6"
-+am__api_version="1.7"
- ac_aux_dir=
- for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
-@@ -1558,6 +1558,15 @@
- SET_MAKE="MAKE=${MAKE-make}"
- fi
-
-+rm -rf .tst 2>/dev/null
-+mkdir .tst 2>/dev/null
-+if test -d .tst; then
-+ am__leading_dot=.
-+else
-+ am__leading_dot=_
-+fi
-+rmdir .tst 2>/dev/null
-+
- # test to see if srcdir already configured
- if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
-@@ -1566,9 +1575,19 @@
- { (exit 1); exit 1; }; }
- fi
-
-+# test whether we have cygpath
-+if test -z "$CYGPATH_W"; then
-+ if (cygpath --version) >/dev/null 2>/dev/null; then
-+ CYGPATH_W='cygpath -w'
-+ else
-+ CYGPATH_W=echo
-+ fi
-+fi
-+
-+
- # Define the identity of the package.
-- PACKAGE=nano
-- VERSION=1.2.1
-+ PACKAGE='nano'
-+ VERSION='1.2.1'
-
-
- cat >>confdefs.h <<_ACEOF
-@@ -1694,15 +1713,11 @@
-
-
-
--# Add the stamp file to the list of files AC keeps track of,
--# along with our hook.
- ac_config_headers="$ac_config_headers config.h:config.h.in"
-
-
-
-
--
--
- ac_ext=c
- ac_cpp='$CPP $CPPFLAGS'
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-@@ -2570,24 +2585,16 @@
- ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
--rm -f .deps 2>/dev/null
--mkdir .deps 2>/dev/null
--if test -d .deps; then
-- DEPDIR=.deps
--else
-- # MS-DOS does not allow filenames that begin with a dot.
-- DEPDIR=_deps
--fi
--rmdir .deps 2>/dev/null
--
-+DEPDIR="${am__leading_dot}deps"
-
- ac_config_commands="$ac_config_commands depfiles"
-
-
- am_make=${MAKE-make}
- cat > confinc << 'END'
--doit:
-+am__doit:
- @echo done
-+.PHONY: am__doit
- END
- # If we don't find an include directive, just comment out the code.
- echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-@@ -2602,7 +2609,7 @@
- # In particular we don't look at `^make:' because GNU make might
- # be invoked under some other name (usually "gmake"), in which
- # case it prints its new name instead of `make'.
--if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
-+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
- am__include=include
- am__quote=
- _am_result=GNU
-@@ -2662,18 +2669,32 @@
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
-+ # We will build objects and dependencies in a subdirectory because
-+ # it helps to detect inapplicable dependency modes. For instance
-+ # both Tru64's cc and ICC support -MD to output dependencies as a
-+ # side effect of compilation, but ICC will put the dependencies in
-+ # the current directory while Tru64 will put them in the object
-+ # directory.
-+ mkdir sub
-
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- for depmode in $am_compiler_list; do
-+ # Setup a source with many dependencies, because some compilers
-+ # like to wrap large dependency lists on column 80 (with \), and
-+ # we should not choose a depcomp mode which is confused by this.
-+ #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
-- echo '#include "conftest.h"' > conftest.c
-- echo 'int i;' > conftest.h
-- echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
-+ : > sub/conftest.c
-+ for i in 1 2 3 4 5 6; do
-+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
-+ : > sub/conftst$i.h
-+ done
-+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- case $depmode in
- nosideeffect)
-@@ -2691,13 +2712,20 @@
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this.
- if depmode=$depmode \
-- source=conftest.c object=conftest.o \
-- depfile=conftest.Po tmpdepfile=conftest.TPo \
-- $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
-- grep conftest.h conftest.Po > /dev/null 2>&1 &&
-+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
-+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
-+ >/dev/null 2>conftest.err &&
-+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
-- am_cv_CC_dependencies_compiler_type=$depmode
-- break
-+ # icc doesn't choke on unknown options, it will just issue warnings
-+ # (even with -Werror). So we grep stderr for any message
-+ # that says an option was ignored.
-+ if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
-+ am_cv_CC_dependencies_compiler_type=$depmode
-+ break
-+ fi
- fi
- done
-
-@@ -2714,6 +2742,18 @@
-
-
-
-+if
-+ test "x$enable_dependency_tracking" != xno \
-+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
-+ am__fastdepCC_TRUE=
-+ am__fastdepCC_FALSE='#'
-+else
-+ am__fastdepCC_TRUE='#'
-+ am__fastdepCC_FALSE=
-+fi
-+
-+
-+
-
- echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
- echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6
-@@ -5290,6 +5330,7 @@
-
- done
-
-+
- if test "${ac_cv_header_regex_h+set}" = set; then
- echo "$as_me:$LINENO: checking for regex.h" >&5
- echo $ECHO_N "checking for regex.h... $ECHO_C" >&6
-@@ -5422,7 +5463,10 @@
- if test $ac_cv_header_regex_h = yes; then
- echo "$as_me:$LINENO: checking for broken regexec" >&5
- echo $ECHO_N "checking for broken regexec... $ECHO_C" >&6
-- if test "$cross_compiling" = yes; then
-+if test "${ac_cv_regexec_segfault_emptystr+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
- See \`config.log' for more details." >&5
- echo "$as_me: error: cannot run test program while cross compiling
-@@ -5472,6 +5516,10 @@
- fi
-
- fi
-+echo "$as_me:$LINENO: result: $ac_cv_regexec_segfault_emptystr" >&5
-+echo "${ECHO_T}$ac_cv_regexec_segfault_emptystr" >&6
-+
-+fi
-
-
-
-@@ -6037,7 +6085,7 @@
- echo "$as_me:$LINENO: checking for SLtt_initialize in -lslang $tcap" >&5
- echo $ECHO_N "checking for SLtt_initialize in -lslang $tcap... $ECHO_C" >&6
- LIBS="$LIBS $tcap"
-- if test "$cross_compiling" = yes; then
-+if test "$cross_compiling" = yes; then
- { echo "$as_me:$LINENO: WARNING: *** Can not use slang when cross-compiling" >&5
- echo "$as_me: WARNING: *** Can not use slang when cross-compiling" >&2;}
- else
-@@ -6091,7 +6139,7 @@
- echo "$as_me:$LINENO: checking for SLtt_initialize in -lslang $tcap -lm" >&5
- echo $ECHO_N "checking for SLtt_initialize in -lslang $tcap -lm... $ECHO_C" >&6
- LIBS="$LIBS -lm"
-- if test "$cross_compiling" = yes; then
-+if test "$cross_compiling" = yes; then
- { echo "$as_me:$LINENO: WARNING: *** Can not use slang when cross-compiling" >&5
- echo "$as_me: WARNING: *** Can not use slang when cross-compiling" >&2;}
- else
-@@ -7671,6 +7719,13 @@
- Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
- fi
-+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&5
-+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-+Usually this means the macro was only invoked conditionally." >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-
- : ${CONFIG_STATUS=./config.status}
- ac_clean_files_save=$ac_clean_files
-@@ -8104,7 +8159,7 @@
- #
-
- AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
--# Capture the value of obsolete ALL_LINGUAS because we need it to compute
-+# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
- # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
- # from automake.
- eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
-@@ -8216,6 +8271,7 @@
- s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
- s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
- s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-+s,@CYGPATH_W@,$CYGPATH_W,;t t
- s,@PACKAGE@,$PACKAGE,;t t
- s,@VERSION@,$VERSION,;t t
- s,@ACLOCAL@,$ACLOCAL,;t t
-@@ -8230,6 +8286,7 @@
- s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
- s,@AWK@,$AWK,;t t
- s,@SET_MAKE@,$SET_MAKE,;t t
-+s,@am__leading_dot@,$am__leading_dot,;t t
- s,@CC@,$CC,;t t
- s,@CFLAGS@,$CFLAGS,;t t
- s,@LDFLAGS@,$LDFLAGS,;t t
-@@ -8244,6 +8301,8 @@
- s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
- s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
- s,@CCDEPMODE@,$CCDEPMODE,;t t
-+s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
-+s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
- s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
- s,@MSGFMT@,$MSGFMT,;t t
- s,@GMSGFMT@,$GMSGFMT,;t t
-@@ -8697,13 +8756,29 @@
- cat $tmp/config.h
- rm -f $tmp/config.h
- fi
-- # Run the commands associated with the file.
-- case $ac_file in
-- config.h ) # update the timestamp
--echo 'timestamp for config.h:config.h.in' >"./stamp-h1"
-- ;;
-+# Compute $ac_file's index in $config_headers.
-+_am_stamp_count=1
-+for _am_header in $config_headers :; do
-+ case $_am_header in
-+ $ac_file | $ac_file:* )
-+ break ;;
-+ * )
-+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
- done
-+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
-+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-+ X$ac_file : 'X\(//\)[^/]' \| \
-+ X$ac_file : 'X\(//\)$' \| \
-+ X$ac_file : 'X\(/\)' \| \
-+ . : '\(.\)' 2>/dev/null ||
-+echo X$ac_file |
-+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-+ /^X\(\/\/\)$/{ s//\1/; q; }
-+ /^X\(\/\).*/{ s//\1/; q; }
-+ s/.*/./; q'`/stamp-h$_am_stamp_count
-+done
- _ACEOF
- cat >>$CONFIG_STATUS <<\_ACEOF
-
---- nano-1.2.1/Makefile.am~configure
-+++ nano-1.2.1/Makefile.am
-@@ -31,6 +31,6 @@
- SUBDIRS = po m4
-
- localedir = $(datadir)/locale
--INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
-+INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
-
- ACLOCAL_AMFLAGS = -I m4
---- nano-1.2.1/Makefile.in~configure
-+++ nano-1.2.1/Makefile.in
-@@ -1,7 +1,7 @@
--# Makefile.in generated by automake 1.6.3 from Makefile.am.
-+# Makefile.in generated by automake 1.7.7 from Makefile.am.
- # @configure_input@
-
--# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- # Free Software Foundation, Inc.
- # This Makefile.in is free software; the Free Software Foundation
- # gives unlimited permission to copy and/or distribute it,
-@@ -13,100 +13,124 @@
- # PARTICULAR PURPOSE.
-
- @SET_MAKE@
--SHELL = @SHELL@
-
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
- VPATH = @srcdir@
--prefix = @prefix@
--exec_prefix = @exec_prefix@
--
--bindir = @bindir@
--sbindir = @sbindir@
--libexecdir = @libexecdir@
--datadir = @datadir@
--sysconfdir = @sysconfdir@
--sharedstatedir = @sharedstatedir@
--localstatedir = @localstatedir@
--libdir = @libdir@
--infodir = @infodir@
--mandir = @mandir@
--includedir = @includedir@
--oldincludedir = /usr/include
- pkgdatadir = $(datadir)/@PACKAGE@
- pkglibdir = $(libdir)/@PACKAGE@
- pkgincludedir = $(includedir)/@PACKAGE@
- top_builddir = .
-
--ACLOCAL = @ACLOCAL@
--AUTOCONF = @AUTOCONF@
--AUTOMAKE = @AUTOMAKE@
--AUTOHEADER = @AUTOHEADER@
--
- am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
- INSTALL = @INSTALL@
--INSTALL_PROGRAM = @INSTALL_PROGRAM@
--INSTALL_DATA = @INSTALL_DATA@
- install_sh_DATA = $(install_sh) -c -m 644
- install_sh_PROGRAM = $(install_sh) -c
- install_sh_SCRIPT = $(install_sh) -c
--INSTALL_SCRIPT = @INSTALL_SCRIPT@
- INSTALL_HEADER = $(INSTALL_DATA)
--transform = @program_transform_name@
-+transform = $(program_transform_name)
- NORMAL_INSTALL = :
- PRE_INSTALL = :
- POST_INSTALL = :
- NORMAL_UNINSTALL = :
- PRE_UNINSTALL = :
- POST_UNINSTALL = :
--host_alias = @host_alias@
- host_triplet = @host@
--
--EXEEXT = @EXEEXT@
--OBJEXT = @OBJEXT@
--PATH_SEPARATOR = @PATH_SEPARATOR@
-+ACLOCAL = @ACLOCAL@
-+AMDEP_FALSE = @AMDEP_FALSE@
-+AMDEP_TRUE = @AMDEP_TRUE@
- AMTAR = @AMTAR@
-+AUTOCONF = @AUTOCONF@
-+AUTOHEADER = @AUTOHEADER@
-+AUTOMAKE = @AUTOMAKE@
- AWK = @AWK@
--BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
--CATOBJEXT = @CATOBJEXT@
- CC = @CC@
-+CCDEPMODE = @CCDEPMODE@
-+CFLAGS = @CFLAGS@
-+CPP = @CPP@
-+CPPFLAGS = @CPPFLAGS@
- CURSES_LIB = @CURSES_LIB@
--DATADIRNAME = @DATADIRNAME@
-+CYGPATH_W = @CYGPATH_W@
-+
-+DEFS = -DSYSCONFDIR=\"$(sysconfdir)\"
- DEPDIR = @DEPDIR@
--GENCAT = @GENCAT@
--GLIBC21 = @GLIBC21@
-+ECHO_C = @ECHO_C@
-+ECHO_N = @ECHO_N@
-+ECHO_T = @ECHO_T@
-+EGREP = @EGREP@
-+EXEEXT = @EXEEXT@
- GLIB_CFLAGS = @GLIB_CFLAGS@
- GLIB_CONFIG = @GLIB_CONFIG@
- GLIB_LIBS = @GLIB_LIBS@
- GMSGFMT = @GMSGFMT@
--HAVE_LIB = @HAVE_LIB@
-+INSTALL_DATA = @INSTALL_DATA@
-+INSTALL_PROGRAM = @INSTALL_PROGRAM@
-+INSTALL_SCRIPT = @INSTALL_SCRIPT@
- INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
--INSTOBJEXT = @INSTOBJEXT@
--INTLBISON = @INTLBISON@
- INTLLIBS = @INTLLIBS@
--INTLOBJS = @INTLOBJS@
--INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
--LIB = @LIB@
-+LDFLAGS = @LDFLAGS@
- LIBICONV = @LIBICONV@
- LIBINTL = @LIBINTL@
--LTLIB = @LTLIB@
-+LIBOBJS = @LIBOBJS@
-+LIBS = @LIBS@
- LTLIBICONV = @LTLIBICONV@
- LTLIBINTL = @LTLIBINTL@
-+LTLIBOBJS = @LTLIBOBJS@
-+MAKEINFO = makeinfo --no-split
- MKINSTALLDIRS = @MKINSTALLDIRS@
-+MSGFMT = @MSGFMT@
-+MSGMERGE = @MSGMERGE@
-+OBJEXT = @OBJEXT@
- PACKAGE = @PACKAGE@
-+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-+PACKAGE_NAME = @PACKAGE_NAME@
-+PACKAGE_STRING = @PACKAGE_STRING@
-+PACKAGE_TARNAME = @PACKAGE_TARNAME@
-+PACKAGE_VERSION = @PACKAGE_VERSION@
-+PATH_SEPARATOR = @PATH_SEPARATOR@
- POSUB = @POSUB@
--RANLIB = @RANLIB@
-+SET_MAKE = @SET_MAKE@
-+SHELL = @SHELL@
- STRIP = @STRIP@
--USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
- USE_NLS = @USE_NLS@
- VERSION = @VERSION@
-+XGETTEXT = @XGETTEXT@
-+ac_ct_CC = @ac_ct_CC@
-+ac_ct_STRIP = @ac_ct_STRIP@
-+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
- am__include = @am__include@
-+am__leading_dot = @am__leading_dot@
- am__quote = @am__quote@
-+bindir = @bindir@
-+build = @build@
-+build_alias = @build_alias@
-+build_cpu = @build_cpu@
-+build_os = @build_os@
-+build_vendor = @build_vendor@
-+datadir = @datadir@
-+exec_prefix = @exec_prefix@
-+host = @host@
-+host_alias = @host_alias@
-+host_cpu = @host_cpu@
-+host_os = @host_os@
-+host_vendor = @host_vendor@
-+includedir = @includedir@
-+infodir = @infodir@
- install_sh = @install_sh@
-+libdir = @libdir@
-+libexecdir = @libexecdir@
-+localstatedir = @localstatedir@
-+mandir = @mandir@
-+oldincludedir = @oldincludedir@
-+prefix = @prefix@
-+program_transform_name = @program_transform_name@
-+sbindir = @sbindir@
-+sharedstatedir = @sharedstatedir@
-+sysconfdir = @sysconfdir@
-+target_alias = @target_alias@
- AUTOMAKE_OPTIONS = gnu no-dependencies
-
--DEFS = -DSYSCONFDIR=\"$(sysconfdir)\"
--
- bin_PROGRAMS = nano
- nano_SOURCES = color.c \
- cut.c \
-@@ -126,7 +150,6 @@
- nano_LDADD = @GLIB_LIBS@ @LIBINTL@
-
- info_TEXINFOS = nano.texi
--MAKEINFO = makeinfo --no-split
-
- EXTRA_DIST = ABOUT-NLS AUTHORS BUGS COPYING ChangeLog INSTALL NEWS \
- README THANKS TODO UPGRADE config.rpath install-sh missing \
-@@ -137,7 +160,7 @@
- SUBDIRS = po m4
-
- localedir = $(datadir)/locale
--INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\" -I@includedir@
-+INCLUDES = -Iintl -DLOCALEDIR=\"$(localedir)\"
-
- ACLOCAL_AMFLAGS = -I m4
- subdir = .
-@@ -154,34 +177,35 @@
- nano_OBJECTS = $(am_nano_OBJECTS)
- nano_DEPENDENCIES =
- nano_LDFLAGS =
-+
- DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
--CPPFLAGS = @CPPFLAGS@
--LDFLAGS = @LDFLAGS@
--LIBS = @LIBS@
- depcomp =
- am__depfiles_maybe =
- COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
- CCLD = $(CC)
- LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
--CFLAGS = @CFLAGS@
- DIST_SOURCES = $(nano_SOURCES)
-+am__TEXINFO_TEX_DIR = $(srcdir)
- INFO_DEPS = nano.info
- DVIS = nano.dvi
-+PDFS = nano.pdf
-+PSS = nano.ps
- TEXINFOS = nano.texi
-
- NROFF = nroff
- MANS = $(man_MANS)
-
--RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
-- uninstall-info-recursive all-recursive install-data-recursive \
-- install-exec-recursive installdirs-recursive install-recursive \
-- uninstall-recursive check-recursive installcheck-recursive
--DIST_COMMON = README ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL \
-- Makefile.am Makefile.in NEWS THANKS TODO aclocal.m4 \
-- config.guess config.h.in config.rpath config.sub configure \
-- configure.ac install-sh missing mkinstalldirs nano.spec.in \
-- texinfo.tex
-+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
-+ ps-recursive install-info-recursive uninstall-info-recursive \
-+ all-recursive install-data-recursive install-exec-recursive \
-+ installdirs-recursive install-recursive uninstall-recursive \
-+ check-recursive installcheck-recursive
-+DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure \
-+ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL Makefile.am NEWS \
-+ THANKS TODO aclocal.m4 config.guess config.h.in config.rpath \
-+ config.sub configure configure.ac install-sh missing \
-+ mkinstalldirs nano.spec.in texinfo.tex
- DIST_SUBDIRS = $(SUBDIRS)
- SOURCES = $(nano_SOURCES)
-
-@@ -189,7 +213,7 @@
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
-
- .SUFFIXES:
--.SUFFIXES: .c .dvi .info .o .obj .ps .texi
-+.SUFFIXES: .c .dvi .info .o .obj .pdf .ps .texi
-
- am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno
-@@ -235,7 +259,7 @@
- ; then \
- f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
- echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \
-- $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \
-+ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \
- else :; fi; \
- done
-
-@@ -263,55 +287,58 @@
- $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
-
- .c.obj:
-- $(COMPILE) -c `cygpath -w $<`
--
--nano.info: nano.texi
--nano.dvi: nano.texi
-+ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
-
- .texi.info:
-- @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
-- cd $(srcdir) \
-- && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
-- `echo $< | sed 's,.*/,,'`
-+ @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]
-+ $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-+ -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
-
- .texi.dvi:
-- TEXINPUTS="$(srcdir)$(PATH_SEPARATOR)$$TEXINPUTS" \
-+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
- MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-- $(TEXI2DVI) $<
-+ $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$<
-
--.texi:
-- @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
-- cd $(srcdir) \
-- && $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \
-- `echo $< | sed 's,.*/,,'`
-+.texi.pdf:
-+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-+ $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$<
-+nano.info: nano.texi
-+nano.dvi: nano.texi
-+nano.pdf: nano.texi
- TEXI2DVI = texi2dvi
-+
-+TEXI2PDF = $(TEXI2DVI) --pdf --batch
- DVIPS = dvips
- .dvi.ps:
-- $(DVIPS) $< -o $@
-+ $(DVIPS) -o $@ $<
-
- uninstall-info-am:
- $(PRE_UNINSTALL)
- @if (install-info --version && \
-- install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
-+ install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
-- echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
-- install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
-+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
-+ echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \
-+ install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \
- done; \
- else :; fi
- @$(NORMAL_UNINSTALL)
- @list='$(INFO_DEPS)'; \
- for file in $$list; do \
-+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
-+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
- (if cd $(DESTDIR)$(infodir); then \
-- echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
-- rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
-+ echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \
-+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
- else :; fi); \
- done
-
- dist-info: $(INFO_DEPS)
- list='$(INFO_DEPS)'; \
- for base in $$list; do \
-- d=$(srcdir); \
-+ if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in $$d/$$base*; do \
- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f $(distdir)/$$relfile || \
-@@ -320,16 +347,15 @@
- done
-
- mostlyclean-aminfo:
-- -rm -f nano.aux nano.cp nano.dvi nano.fn nano.ky nano.log nano.pg nano.ps \
-- nano.tmp nano.toc nano.tp nano.vr
-+ -rm -f nano.aux nano.cp nano.cps nano.fn nano.fns nano.ky nano.kys nano.log \
-+ nano.pg nano.pgs nano.tmp nano.toc nano.tp nano.tps nano.vr \
-+ nano.vrs nano.dvi nano.pdf nano.ps
-
- maintainer-clean-aminfo:
-- cd $(srcdir) && \
-- list='$(INFO_DEPS)'; for i in $$list; do \
-- rm -f $$i; \
-- if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
-- rm -f $$i-[0-9]*; \
-- fi; \
-+ @list='$(INFO_DEPS)'; for i in $$list; do \
-+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
-+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
-+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- done
-
- man1dir = $(mandir)/man1
-@@ -368,6 +394,10 @@
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-+ case "$$ext" in \
-+ 1*) ;; \
-+ *) ext='1' ;; \
-+ esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-@@ -411,6 +441,10 @@
- done; \
- for i in $$list; do \
- ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-+ case "$$ext" in \
-+ 5*) ;; \
-+ *) ext='5' ;; \
-+ esac; \
- inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
- inst=`echo $$inst | sed -e 's/^.*\///'`; \
- inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-@@ -472,10 +506,17 @@
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-+ctags-recursive:
-+ list='$(SUBDIRS)'; for subdir in $$list; do \
-+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
-+ done
-
- ETAGS = etags
- ETAGSFLAGS =
-
-+CTAGS = ctags
-+CTAGSFLAGS =
-+
- tags: TAGS
-
- ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-@@ -491,9 +532,15 @@
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
-+ if (etags --etags-include --version) >/dev/null 2>&1; then \
-+ include_option=--etags-include; \
-+ else \
-+ include_option=--include; \
-+ fi; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
-- test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-+ test -f $$subdir/TAGS && \
-+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
- fi; \
- done; \
- list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-@@ -506,13 +553,28 @@
- || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique
-
-+ctags: CTAGS
-+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
-+ $(TAGS_FILES) $(LISP)
-+ tags=; \
-+ here=`pwd`; \
-+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
-+ unique=`for i in $$list; do \
-+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-+ done | \
-+ $(AWK) ' { files[$$0] = 1; } \
-+ END { for (i in files) print i; }'`; \
-+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
-+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-+ $$tags $$unique
-+
- GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
- distclean-tags:
-- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH
-+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-
- top_distdir = .
-@@ -524,13 +586,20 @@
- && rm -fr $(distdir); }; }
-
- GZIP_ENV = --best
-+distuninstallcheck_listfiles = find . -type f -print
- distcleancheck_listfiles = find . -type f -print
-
- distdir: $(DISTFILES)
- $(am__remove_distdir)
- mkdir $(distdir)
- $(mkinstalldirs) $(distdir)/. $(distdir)/po
-- @list='$(DISTFILES)'; for file in $$list; do \
-+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-+ list='$(DISTFILES)'; for file in $$list; do \
-+ case $$file in \
-+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-+ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-+ esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-@@ -564,7 +633,7 @@
- fi; \
- done
- $(MAKE) $(AM_MAKEFLAGS) \
-- top_distdir="${top_distdir}" distdir="$(distdir)" \
-+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
- dist-info
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
-@@ -586,13 +655,13 @@
- $(am__remove_distdir)
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
- chmod -R a-w $(distdir); chmod a+w $(distdir)
-- mkdir $(distdir)/=build
-- mkdir $(distdir)/=inst
-+ mkdir $(distdir)/_build
-+ mkdir $(distdir)/_inst
- chmod a-w $(distdir)
-- dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \
-- && cd $(distdir)/=build \
-- && ../configure --srcdir=.. --prefix=$$dc_install_base \
-- --with-included-gettext \
-+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
-+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-+ && cd $(distdir)/_build \
-+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
-@@ -600,23 +669,39 @@
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
-- && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \
-- || { echo "ERROR: files left after uninstall:" ; \
-- find $$dc_install_base -type f -print ; \
-- exit 1; } >&2 ) \
-+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
-+ distuninstallcheck \
-+ && chmod -R a-w "$$dc_install_base" \
-+ && ({ \
-+ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \
-+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
-+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
-+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
-+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
-+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
-+ && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \
- && rm -f $(distdir).tar.gz \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
- $(am__remove_distdir)
- @echo "$(distdir).tar.gz is ready for distribution" | \
- sed 'h;s/./=/g;p;x;p;x'
-+distuninstallcheck:
-+ @cd $(distuninstallcheck_dir) \
-+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
-+ || { echo "ERROR: files left after uninstall:" ; \
-+ if test -n "$(DESTDIR)"; then \
-+ echo " (check DESTDIR support)"; \
-+ fi ; \
-+ $(distuninstallcheck_listfiles) ; \
-+ exit 1; } >&2
- distcleancheck: distclean
-- if test '$(srcdir)' = . ; then \
-+ @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
-- test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-- || { echo "ERROR: files left after distclean:" ; \
-+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
-+ || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
- check-am: all-am
-@@ -645,7 +730,7 @@
- clean-generic:
-
- distclean-generic:
-- -rm -f Makefile $(CONFIG_CLEAN_FILES)
-+ -rm -f $(CONFIG_CLEAN_FILES)
-
- maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
-@@ -656,6 +741,8 @@
-
- distclean: distclean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-+
-+ -rm -f Makefile
- distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
- distclean-tags
-
-@@ -678,10 +765,12 @@
- $(mkinstalldirs) $(DESTDIR)$(infodir)
- @list='$(INFO_DEPS)'; \
- for file in $$list; do \
-- d=$(srcdir); \
-- for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \
-+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
-+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
-+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
-+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
- if test -f $$ifile; then \
-- relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \
-+ relfile=`echo "$$ifile" | sed 's|^.*/||'`; \
- echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
- $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
- else : ; fi; \
-@@ -689,11 +778,12 @@
- done
- @$(POST_INSTALL)
- @if (install-info --version && \
-- install-info --version | fgrep -i -v debian) >/dev/null 2>&1; then \
-+ install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
-- echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
-- install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
-+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
-+ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\
-+ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\
- done; \
- else : ; fi
- install-man: install-man1 install-man5
-@@ -702,7 +792,9 @@
-
- maintainer-clean: maintainer-clean-recursive
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-- -rm -rf autom4te.cache
-+ -rm -rf $(top_srcdir)/autom4te.cache
-+
-+ -rm -f Makefile
- maintainer-clean-am: distclean-am maintainer-clean-aminfo \
- maintainer-clean-generic
-
-@@ -711,29 +803,38 @@
- mostlyclean-am: mostlyclean-aminfo mostlyclean-compile \
- mostlyclean-generic
-
-+pdf: pdf-recursive
-+
-+pdf-am: $(PDFS)
-+
-+ps: ps-recursive
-+
-+ps-am: $(PSS)
-+
- uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
-
- uninstall-info: uninstall-info-recursive
-
- uninstall-man: uninstall-man1 uninstall-man5
-
--.PHONY: $(RECURSIVE_TARGETS) GTAGS all all-am check check-am clean \
-- clean-binPROGRAMS clean-generic clean-recursive dist dist-all \
-- dist-gzip dist-info distcheck distclean distclean-compile \
-- distclean-generic distclean-hdr distclean-recursive \
-- distclean-tags distcleancheck distdir dvi dvi-am dvi-recursive \
-- info info-am info-recursive install install-am \
-- install-binPROGRAMS install-data install-data-am \
-- install-data-recursive install-exec install-exec-am \
-- install-exec-recursive install-info install-info-am \
-- install-info-recursive install-man install-man1 install-man5 \
-- install-recursive install-strip installcheck installcheck-am \
-- installdirs installdirs-am installdirs-recursive \
-- maintainer-clean maintainer-clean-aminfo \
-+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-+ clean-binPROGRAMS clean-generic clean-recursive ctags \
-+ ctags-recursive dist dist-all dist-gzip dist-info distcheck \
-+ distclean distclean-compile distclean-generic distclean-hdr \
-+ distclean-recursive distclean-tags distcleancheck distdir \
-+ distuninstallcheck dvi dvi-am dvi-recursive info info-am \
-+ info-recursive install install-am install-binPROGRAMS \
-+ install-data install-data-am install-data-recursive \
-+ install-exec install-exec-am install-exec-recursive \
-+ install-info install-info-am install-info-recursive install-man \
-+ install-man1 install-man5 install-recursive install-strip \
-+ installcheck installcheck-am installdirs installdirs-am \
-+ installdirs-recursive maintainer-clean maintainer-clean-aminfo \
- maintainer-clean-generic maintainer-clean-recursive mostlyclean \
- mostlyclean-aminfo mostlyclean-compile mostlyclean-generic \
-- mostlyclean-recursive tags tags-recursive uninstall \
-- uninstall-am uninstall-binPROGRAMS uninstall-info-am \
-+ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
-+ ps-recursive tags tags-recursive uninstall uninstall-am \
-+ uninstall-binPROGRAMS uninstall-info-am \
- uninstall-info-recursive uninstall-man uninstall-man1 \
- uninstall-man5 uninstall-recursive
-
diff --git a/packages/nano/nano-2.0.6/glib.m4 b/packages/nano/nano-2.0.6/glib.m4
deleted file mode 100644
index b8094bbfe0..0000000000
--- a/packages/nano/nano-2.0.6/glib.m4
+++ /dev/null
@@ -1,196 +0,0 @@
-# Configure paths for GLIB
-# Owen Taylor 97-11-3
-
-dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
-dnl gthread is specified in MODULES, pass to glib-config
-dnl
-AC_DEFUN(AM_PATH_GLIB,
-[dnl
-dnl Get the cflags and libraries from the glib-config script
-dnl
-AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
- glib_config_prefix="$withval", glib_config_prefix="")
-AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
- glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
-AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
- , enable_glibtest=yes)
-
- if test x$glib_config_exec_prefix != x ; then
- glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
- if test x${GLIB_CONFIG+set} != xset ; then
- GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
- fi
- fi
- if test x$glib_config_prefix != x ; then
- glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
- if test x${GLIB_CONFIG+set} != xset ; then
- GLIB_CONFIG=$glib_config_prefix/bin/glib-config
- fi
- fi
-
- for module in . $4
- do
- case "$module" in
- gmodule)
- glib_config_args="$glib_config_args gmodule"
- ;;
- gthread)
- glib_config_args="$glib_config_args gthread"
- ;;
- esac
- done
-
- AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
- min_glib_version=ifelse([$1], ,0.99.7,$1)
- AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
- no_glib=""
- if test "$GLIB_CONFIG" = "no" ; then
- no_glib=yes
- else
- GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
- GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
- glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_glibtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
- LIBS="$GLIB_LIBS $LIBS"
-dnl
-dnl Now check if the installed GLIB is sufficiently new. (Also sanity
-dnl checks the results of glib-config to some extent
-dnl
- rm -f conf.glibtest
- AC_TRY_RUN([
-#include <glib.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main ()
-{
- int major, minor, micro;
- char *tmp_version;
-
- system ("touch conf.glibtest");
-
- /* HP/UX 9 (%@#!) writes to sscanf strings */
- tmp_version = g_strdup("$min_glib_version");
- if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
- printf("%s, bad version string\n", "$min_glib_version");
- exit(1);
- }
-
- if ((glib_major_version != $glib_config_major_version) ||
- (glib_minor_version != $glib_config_minor_version) ||
- (glib_micro_version != $glib_config_micro_version))
- {
- printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
- $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
- glib_major_version, glib_minor_version, glib_micro_version);
- printf ("*** was found! If glib-config was correct, then it is best\n");
- printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
- printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
- printf("*** before re-running configure\n");
- }
- else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
- (glib_minor_version != GLIB_MINOR_VERSION) ||
- (glib_micro_version != GLIB_MICRO_VERSION))
- {
- printf("*** GLIB header files (version %d.%d.%d) do not match\n",
- GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- glib_major_version, glib_minor_version, glib_micro_version);
- }
- else
- {
- if ((glib_major_version > major) ||
- ((glib_major_version == major) && (glib_minor_version > minor)) ||
- ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n",
- glib_major_version, glib_minor_version, glib_micro_version);
- printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n",
- major, minor, micro);
- printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the glib-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
- printf("*** correct copy of glib-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_glib" = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$GLIB_CONFIG" = "no" ; then
- echo "*** The glib-config script installed by GLIB could not be found"
- echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the GLIB_CONFIG environment variable to the"
- echo "*** full path to glib-config."
- else
- if test -f conf.glibtest ; then
- :
- else
- echo "*** Could not run GLIB test program, checking why..."
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
- LIBS="$LIBS $GLIB_LIBS"
- AC_TRY_LINK([
-#include <glib.h>
-#include <stdio.h>
-], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding GLIB or finding the wrong"
- echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
- echo "***"
- echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
- echo "*** came with the system with the command"
- echo "***"
- echo "*** rpm --erase --nodeps gtk gtk-devel" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
- echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
- echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- GLIB_CFLAGS=""
- GLIB_LIBS=""
- ifelse([$3], , :, [$3])
- fi
- AC_SUBST(GLIB_CFLAGS)
- AC_SUBST(GLIB_LIBS)
- rm -f conf.glibtest
-])
diff --git a/packages/nano/nano_1.2.1.bb b/packages/nano/nano_1.2.1.bb
deleted file mode 100644
index 1c3728096c..0000000000
--- a/packages/nano/nano_1.2.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION = "GNU nano (Nano's ANOther editor, or \
-Not ANOther editor) is an enhanced clone of the \
-Pico text editor."
-LICENSE = "GPL"
-SECTION = "console/utils"
-DEPENDS = "ncurses"
-
-SRC_URI = "http://www.nano-editor.org/dist/v1.2/nano-${PV}.tar.gz \
- file://configure.patch;patch=1 \
- file://glib.m4"
-
-inherit autotools
-
-do_configure_prepend () {
- install -m 0644 ${WORKDIR}/glib.m4 m4/
-}
diff --git a/packages/nano/nano_2.0.6.bb b/packages/nano/nano_2.0.7.bb
index f6ef365591..0951466b82 100644
--- a/packages/nano/nano_2.0.6.bb
+++ b/packages/nano/nano_2.0.7.bb
@@ -11,6 +11,9 @@ SRC_URI = "http://www.nano-editor.org/dist/v2.0/nano-${PV}.tar.gz \
inherit autotools
+# only 16K more to get everything but the kitchen sink
+EXTRA_OECONF = "--enable-all"
+
do_configure_prepend () {
install -m 0644 ${WORKDIR}/glib.m4 m4/
}
diff --git a/packages/ncdu/.mtn2git_empty b/packages/ncdu/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ncdu/.mtn2git_empty
diff --git a/packages/ncdu/ncdu_1.3.bb b/packages/ncdu/ncdu_1.3.bb
new file mode 100644
index 0000000000..4676a6531e
--- /dev/null
+++ b/packages/ncdu/ncdu_1.3.bb
@@ -0,0 +1,6 @@
+DESCRIPTION = "NCurses Disk Usage"
+DEPENDS = "ncurses"
+
+SRC_URI = "http://dev.yorhel.nl/download/ncdu-${PV}.tar.gz"
+
+inherit autotools
diff --git a/packages/ncftp/ncftp_3.2.0.bb b/packages/ncftp/ncftp_3.2.0.bb
index ce87846ba0..23c01cf109 100644
--- a/packages/ncftp/ncftp_3.2.0.bb
+++ b/packages/ncftp/ncftp_3.2.0.bb
@@ -3,7 +3,7 @@ SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "ClarifiedArtistic"
-SRC_URI = "ftp://ftp.ncftp.com/ncftp/ncftp-${PV}-src.tar.bz2 \
+SRC_URI = "ftp://ftp.ncftp.com/ncftp/older_versions/ncftp-${PV}-src.tar.bz2 \
file://acinclude.m4 \
file://make.patch;patch=1 \
file://fixes.patch;patch=1"
diff --git a/packages/ncurses/ncurses-native_5.4.bb b/packages/ncurses/ncurses-native_5.4.bb
index 19e379a15c..95ca23f717 100644
--- a/packages/ncurses/ncurses-native_5.4.bb
+++ b/packages/ncurses/ncurses-native_5.4.bb
@@ -1,6 +1,14 @@
-SECTION = "libs"
require ncurses_${PV}.bb
+
inherit native
-EXTRA_OEMAKE = '"BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
+
DEPENDS = ""
+
+EXTRA_OEMAKE = '"BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
+
FILESPATH = "${FILE_DIRNAME}/local:${FILE_DIRNAME}/ncurses-${PV}-${PR}:${FILE_DIRNAME}/ncurses-${PV}:${FILE_DIRNAME}/ncurses:${FILE_DIRNAME}"
+
+do_install() {
+ :
+}
+
diff --git a/packages/ncurses/ncurses.inc b/packages/ncurses/ncurses.inc
index 2c6cfd05b0..9b4fff50ad 100644
--- a/packages/ncurses/ncurses.inc
+++ b/packages/ncurses/ncurses.inc
@@ -4,7 +4,6 @@ SECTION = "libs"
LICENSE = "MIT"
DEPENDS = "ncurses-native"
RSUGGESTS_${PN} = "ncurses-terminfo"
-RPROVIDES = "libncurses5"
inherit autotools
@@ -21,6 +20,7 @@ EXTRA_OECONF = "--with-shared \
--without-cxx-binding \
--with-terminfo-dirs=${sysconfdir}/terminfo:${datadir}/terminfo \
--enable-overwrite"
+
export BUILD_CCFLAGS = "-I${S}/ncurses -I${S}/include ${BUILD_CFLAGS}"
export BUILD_LDFLAGS = ""
export EXTRA_OEMAKE = '"BUILD_LDFLAGS=" "BUILD_CCFLAGS=${BUILD_CCFLAGS}"'
@@ -80,11 +80,29 @@ pkg_prerm_ncurses-tools () {
update-alternatives --remove reset reset.${PN}
}
-PACKAGES_prepend = "ncurses-tools "
-PACKAGES_append = " ncurses-terminfo"
-FILES_ncurses_append = " ${datadir}/tabset"
-# This keeps only tput/tset in ncurses
-# clear/reset are in already busybox
-FILES_ncurses-tools = "${bindir}/tic ${bindir}/toe ${bindir}/infotocap ${bindir}/captoinfo ${bindir}/infocmp ${bindir}/clear.${PN} ${bindir}/reset.${PN} ${bindir}/tack "
-FILES_ncurses-terminfo = "${datadir}/terminfo"
-FILES_${PN} = "${bindir}/tput ${bindir}/tset ${libdir}/lib*.so.* §{datadir}/tabset ${sysconfdir}/terminfo"
+
+PACKAGES =+ "${PN}-ncurses ${PN}-panel ${PN}-menu ${PN}-form ${PN}-terminfo ${PN}-tools"
+FILES_${PN}-ncurses = "${libdir}/libncurses.so.*"
+FILES_${PN}-panel = "${libdir}/libpanel.so.*"
+FILES_${PN}-menu = "${libdir}/libmenu.so.*"
+FILES_${PN}-form = "${libdir}/libform.so.*"
+FILES_${PN}-terminfo = "\
+ ${libdir}/terminfo \
+ ${datadir}/terminfo \
+"
+FILES_${PN}-tools = "\
+ ${bindir}/tic \
+ ${bindir}/tack \
+ ${bindir}/toe \
+ ${bindir}/infotocap \
+ ${bindir}/captoinfo \
+ ${bindir}/infocmp \
+ ${bindir}/clear.${PN} \
+ ${bindir}/reset.${PN} \
+"
+FILES_${PN} = "\
+ ${bindir}/tput \
+ ${bindir}/tset \
+ ${datadir}/tabset \
+ ${sysconfdir}/terminfo \
+"
diff --git a/packages/ncurses/ncurses_5.3.bb b/packages/ncurses/ncurses_5.3.bb
deleted file mode 100644
index 0b0897a409..0000000000
--- a/packages/ncurses/ncurses_5.3.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-BaseV := "${PV}"
-SnapV := "20030906"
-PV = "${BaseV}.${SnapV}"
-PR = "r2"
-
-SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${BaseV}.tar.gz \
- file://${SnapV}.patch;patch=1 \
- file://configure.patch;patch=1"
-S = "${WORKDIR}/ncurses-${BaseV}"
-
-require ncurses.inc
diff --git a/packages/ncurses/ncurses_5.4.bb b/packages/ncurses/ncurses_5.4.bb
index f361d745b3..00dd7d1d1a 100644
--- a/packages/ncurses/ncurses_5.4.bb
+++ b/packages/ncurses/ncurses_5.4.bb
@@ -1,7 +1,7 @@
-PR = "r11"
+PR = "r13"
SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz \
- file://visibility.patch;patch=1"
+ file://visibility.patch;patch=1"
S = "${WORKDIR}/ncurses-${PV}"
require ncurses.inc
diff --git a/packages/net-snmp/net-snmp_5.4.1.bb b/packages/net-snmp/net-snmp_5.4.1.bb
index 0fc36d3ff3..a5ef24869e 100644
--- a/packages/net-snmp/net-snmp_5.4.1.bb
+++ b/packages/net-snmp/net-snmp_5.4.1.bb
@@ -4,6 +4,9 @@ LICENSE = "BSD"
DEPENDS = "openssl"
RDEPENDS_${PN}-server += "net-snmp-mibs"
RDEPENDS_${PN}-client += "net-snmp-mibs"
+RDEPENDS_${PN}-dev = "net-snmp-client (= ${DEBPV}) net-snmp-server (= ${DEBPV})"
+RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${DEBPV}) net-snmp-server (= ${DEBPV})"
+
PR = "r1"
SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
diff --git a/packages/omniorb/omniorb_4.0.7.bb b/packages/omniorb/omniorb_4.0.7.bb
index 4909faaa1f..d98ab581ac 100644
--- a/packages/omniorb/omniorb_4.0.7.bb
+++ b/packages/omniorb/omniorb_4.0.7.bb
@@ -15,6 +15,8 @@ file://dynskel.patch;patch=1;pnum=0"
S = "${WORKDIR}/omniORB-${PV}"
+FILES_${PN}-dev += "${datadir}/idl/omniORB/* ${datadir}/idl/omniORB/cos/*
+
inherit autotools pkgconfig
do_compile () {
diff --git a/packages/openmoko-projects/diversity-daemon_svn.bb b/packages/openmoko-projects/diversity-daemon_svn.bb
index 02e1ea29bb..dd582490fb 100644
--- a/packages/openmoko-projects/diversity-daemon_svn.bb
+++ b/packages/openmoko-projects/diversity-daemon_svn.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://diversity.projects.openmoko.org/"
SECTION = "net/misc"
LICENSE = "GPL"
DEPENDS = "glib-2.0 dbus dbus-glib eds-dbus libjana curl"
-RDEPENDS = "eds-dbus openmoko-dialer2"
+RDEPENDS_${PN} = "eds-dbus openmoko-dialer2"
PV = "0.0+svnr${SRCREV}"
PR = "r2"
diff --git a/packages/openmoko-projects/diversity-nav_svn.bb b/packages/openmoko-projects/diversity-nav_svn.bb
index 23d6b4daf6..4e8dbdbceb 100644
--- a/packages/openmoko-projects/diversity-nav_svn.bb
+++ b/packages/openmoko-projects/diversity-nav_svn.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://diversity.projects.openmoko.org/"
SECTION = "openmoko/applications"
LICENSE = "GPL"
DEPENDS = "evas edje ecore edbus"
-RDEPENDS = "diversity-daemon"
+RDEPENDS_${PN} = "diversity-daemon"
PV = "0.0.1+svnr${SRCREV}"
PR = "r2"
diff --git a/packages/openmoko-projects/illume/illume-fix-includes.patch b/packages/openmoko-projects/illume/illume-fix-includes.patch
new file mode 100644
index 0000000000..74418b31de
--- /dev/null
+++ b/packages/openmoko-projects/illume/illume-fix-includes.patch
@@ -0,0 +1,70 @@
+Index: src/e_mod_win.c
+===================================================================
+--- src/e_mod_win.c (revision 14)
++++ src/e_mod_win.c (working copy)
+@@ -1,4 +1,4 @@
+-#include <e.h>
++#include <enlightenment/e.h>
+ #include "e_mod_win.h"
+ #include "e_slipshelf.h"
+ #include "e_slipwin.h"
+Index: src/e_kbd.c
+===================================================================
+--- src/e_kbd.c (revision 14)
++++ src/e_kbd.c (working copy)
+@@ -1,4 +1,4 @@
+-#include <e.h>
++#include <enlightenment/e.h>
+ #include "e_kbd.h"
+
+ /* internal calls */
+Index: src/e_slip.c
+===================================================================
+--- src/e_slip.c (revision 14)
++++ src/e_slip.c (working copy)
+@@ -1,4 +1,4 @@
+-#include <e.h>
++#include <enlightenment/e.h>
+ #include "e_slip.h"
+
+ EAPI int E_EVENT_SLIP_DEL = 0;
+Index: src/e_mod_layout.c
+===================================================================
+--- src/e_mod_layout.c (revision 14)
++++ src/e_mod_layout.c (working copy)
+@@ -1,4 +1,4 @@
+-#include <e.h>
++#include <enlightenment/e.h>
+ #include "e_mod_main.h"
+ #include "e_mod_layout.h"
+
+Index: src/e_mod_main.c
+===================================================================
+--- src/e_mod_main.c (revision 14)
++++ src/e_mod_main.c (working copy)
+@@ -1,4 +1,4 @@
+-#include <e.h>
++#include <enlightenment/e.h>
+
+ #include "e_kbd.h"
+ #include "e_slipshelf.h"
+Index: src/e_slipwin.c
+===================================================================
+--- src/e_slipwin.c (revision 14)
++++ src/e_slipwin.c (working copy)
+@@ -1,4 +1,4 @@
+-#include <e.h>
++#include <enlightenment/e.h>
+ #include "e_slipwin.h"
+
+ EAPI int E_EVENT_SLIPWIN_DEL = 0;
+Index: src/e_slipshelf.c
+===================================================================
+--- src/e_slipshelf.c (revision 14)
++++ src/e_slipshelf.c (working copy)
+@@ -1,4 +1,4 @@
+-#include <e.h>
++#include <enlightenment/e.h>
+ #include "e_slipshelf.h"
+
+ /* FIXME: break out gadcons for 2 swallow areas */
diff --git a/packages/openmoko-projects/illume/include-path.diff b/packages/openmoko-projects/illume/include-path.diff
deleted file mode 100644
index 0b5ed8add8..0000000000
--- a/packages/openmoko-projects/illume/include-path.diff
+++ /dev/null
@@ -1,16 +0,0 @@
-Include path fixes for Illume:
-
-$(includedir) is pointing to /usr/include, we do not want to have this when compiling
-
-Index: src/Makefile.am
-===================================================================
---- a/src/Makefile.am (Revision 12)
-+++ b/src/Makefile.am (Arbeitskopie)
-@@ -3,7 +3,6 @@
-
- INCLUDES = -I. \
- -I$(top_srcdir) \
-- -I$(includedir) \
- @e_cflags@
-
- pkgdir = $(datadir)/$(MODULE_ARCH)
diff --git a/packages/openmoko-projects/illume_svn.bb b/packages/openmoko-projects/illume_svn.bb
index f7dec16890..f93108dca4 100644
--- a/packages/openmoko-projects/illume_svn.bb
+++ b/packages/openmoko-projects/illume_svn.bb
@@ -1,26 +1,33 @@
DESCRIPTION = "Illume - Mobile UI module for Enlightenment"
+HOMEPAGE = "http://illume.projects.openmoko.org/"
+LICENSE = "MIT/BSD"
+
DEPENDS = "e-wm eet evas ecore edje embryo efreet edbus edje-native embryo-native"
-LICENSE = "MIT BSD"
-PV = "svnr${SRCREV}"
-PR = "r1"
-inherit e
+PV = "0.0+svnr${SRCREV}"
+PR = "r1"
SRC_URI = "svn://svn.projects.openmoko.org/svnroot/;module=${PN};proto=https \
- file://include-path.diff;patch=1"
+ file://illume-fix-includes.patch;patch=1;pnum=0;minrev=14"
+
S = "${WORKDIR}/${PN}"
+inherit autotools pkgconfig
+
EXTRA_OECONF = "--x-includes=${STAGING_INCDIR}/X11 \
--x-libraries=${STAGING_LIBDIR} \
--enable-simple-x11 \
--with-edje-cc=${STAGING_BINDIR_NATIVE}/edje_cc"
-
-FILES_${PN} = "${libdir}/enlightenment/modules/*/*.edj ${libdir}/enlightenment/modules/*/*.desktop ${libdir}/enlightenment/modules/*/*/*"
-FILES_${PN}-dbg += "${libdir}/enlightenment/modules/*/*/.debug/"
-do_install_append() {
- for I in `find ${STAGING_LIBDIR}/enlightenment -name "*.la" -print`; do rm -f $I; done
- for I in `find ${STAGING_LIBDIR}/enlightenment -name "*.a" -print`; do rm -f $I; done
- for I in `find ${STAGING_LIBDIR_CROSS}/enlightenment -name "*.la" -print`; do rm -f $I; done
- for I in `find ${STAGING_LIBDIR_CROSS}/enlightenment -name "*.a" -print`; do rm -f $I; done
+export CFLAGS += "-DE_TYPEDEFS=1"
+
+do_configure_append() {
+ find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:'
+ find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:'
}
+
+FILES_${PN} = "${libdir}/enlightenment/modules/*/*.edj \
+ ${libdir}/enlightenment/modules/*/*.desktop \
+ ${libdir}/enlightenment/modules/*/*/*"
+
+FILES_${PN}-dbg += "${libdir}/enlightenment/modules/*/*/.debug/"
diff --git a/packages/openmoko-projects/tangogps/global-config-h.patch b/packages/openmoko-projects/tangogps/global-config-h.patch
deleted file mode 100644
index 973710c942..0000000000
--- a/packages/openmoko-projects/tangogps/global-config-h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Index: tangoGPS-0.7/src/globals.c
-===================================================================
---- tangoGPS-0.7.orig/src/globals.c 2008-03-13 14:21:02.000000000 +0800
-+++ tangoGPS-0.7/src/globals.c 2008-03-13 14:28:49.000000000 +0800
-@@ -3,11 +3,11 @@
- * License GPLv2
- ****************************************************************************/
-
-+#include "globals.h"
-+
- #include <gtk/gtk.h>
- #include <gps.h>
-
--#include "globals.h"
--
- GdkPixmap *pixmap = NULL;
- GtkWidget *window1 = NULL;
- GtkWidget *window2 = NULL;
-Index: tangoGPS-0.7/src/globals.h
-===================================================================
---- tangoGPS-0.7.orig/src/globals.h 2008-03-13 14:27:46.000000000 +0800
-+++ tangoGPS-0.7/src/globals.h 2008-03-13 14:27:48.000000000 +0800
-@@ -1,3 +1,7 @@
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
- #include <gtk/gtk.h>
- #include <gconf/gconf-client.h>
-
diff --git a/packages/openmoko-projects/tangogps_0.7.bb b/packages/openmoko-projects/tangogps_0.7.bb
deleted file mode 100644
index 63513ffe00..0000000000
--- a/packages/openmoko-projects/tangogps_0.7.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-DESCRIPTION = "tangoGPS map"
-AUTHOR = "Marcus Bauer <marcus.bauer@gmail.com>"
-HOMEPAGE = "http://tangogps.org/"
-SECTION = "openmoko/pim"
-PRIORITY = "optional"
-LICENSE = "GPLv2"
-DEPENDS = "curl gtk+ gpsd"
-PR = "r1"
-
-SRC_URI = "http://tangogps.org/tangoGPS-0.7.tar.gz \
- file://global-config-h.patch;patch=1"
-
-S = "${WORKDIR}/tangoGPS-0.7"
-
-inherit autotools
-
-CPPFLAGS += "-I${STAGING_INCDIR}/gconf/2/"
diff --git a/packages/openmoko2/openmoko-session2.bb b/packages/openmoko2/openmoko-session2.bb
index a031c91af4..507f85835e 100644
--- a/packages/openmoko2/openmoko-session2.bb
+++ b/packages/openmoko2/openmoko-session2.bb
@@ -1,34 +1,31 @@
DESCRIPTION = "Custom Matchbox session files for OpenMoko"
LICENSE = "GPL"
SECTION = "x11"
-RDEPENDS = "matchbox-panel-2"
-RDEPENDS += "openmoko-common2 openmoko-today2 openmoko-dialer2"
+RDEPENDS_${PN} = "matchbox-panel-2 openmoko-common2 openmoko-today2 openmoko-dialer2 openmoko-panel-memory"
RCONFLICTS_${PN} = "openmoko-session matchbox-common"
-PR = "r65"
+PR = "r66"
SRC_URI = "\
file://etc \
file://matchbox-session \
"
-S = ${WORKDIR}
-inherit update-alternatives
+S = "${WORKDIR}"
-ALTERNATIVE_NAME = "x-window-manager"
-ALTERNATIVE_LINK = "${bindir}/x-window-manager"
-ALTERNATIVE_PATH = "${bindir}/matchbox-session"
-ALTERNATIVE_PRIORITY = "11"
+inherit update-alternatives
do_install() {
- install -d ${D}${bindir}
- install -m 0655 ${WORKDIR}/matchbox-session ${D}${bindir}
- install -d ${D}${sysconfdir}
- cp -R ${S}/etc/* ${D}${sysconfdir}
- rm -fR ${D}${sysconfdir}/.svn
- rm -fR ${D}${sysconfdir}/matchbox/.svn
- chmod -R 755 ${D}${sysconfdir}/
+ install -d ${D}${bindir}
+ install -m 0655 ${WORKDIR}/matchbox-session ${D}${bindir}
+ install -d ${D}${sysconfdir}
+ cp -R ${S}/etc/* ${D}${sysconfdir}
+ rm -fR ${D}${sysconfdir}/.svn
+ rm -fR ${D}${sysconfdir}/matchbox/.svn
+ chmod -R 755 ${D}${sysconfdir}/
}
+PACKAGE_ARCH = "all"
+
pkg_postinst_openmoko-session2 () {
#!/bin/sh -e
if [ "x$D" != "x" ]; then
@@ -48,7 +45,9 @@ gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --dire
}
-PACKAGE_ARCH = "all"
+ALTERNATIVE_NAME = "x-window-manager"
+ALTERNATIVE_PATH = "${bindir}/matchbox-session"
+ALTERNATIVE_LINK = "${bindir}/x-window-manager"
+ALTERNATIVE_PRIORITY = "11"
CONFFILES_${PN} = "${sysconfdir}/matchbox/session"
-
diff --git a/packages/openmoko2/settingsgui_0.8.bb b/packages/openmoko2/settingsgui_0.8.bb
new file mode 100644
index 0000000000..314348b0b8
--- /dev/null
+++ b/packages/openmoko2/settingsgui_0.8.bb
@@ -0,0 +1,10 @@
+DESCRIPTION = "OpenMoko Settings GUI"
+AUTHOR = "Kristian M."
+SECTION = "openmoko/applications"
+RDEPENDS = "python-pygtk python-subprocess python-threading"
+LICENSE = "GPL"
+PR = "r0"
+
+SRC_URI = "http://mput.de/~kristian/.openmoko/settingsgui-0.8.tar.bz2"
+
+inherit distutils
diff --git a/packages/openttd/openttd_0.4.0.1.bb b/packages/openttd/openttd_0.4.0.1.bb
deleted file mode 100644
index 9dab970849..0000000000
--- a/packages/openttd/openttd_0.4.0.1.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-require openttd.inc
-
-PR = "r2"
-
-EXTRA_OEMAKE = "WITH_ZLIB=1 \
- WITH_PNG=1 \
- WITH_SDL=1 \
- UNIX=1 \
- WITH_NETWORK=1 \
- VERBOSE=1 \
- INSTALL=1 \
- PREFIX=/usr \
- BINARY_DIR=bin \
- DATA_DIR=share/games/openttd \
- PERSONAL_DIR=.openttd \
- USE_HOMEDIR=1 \
- CC_HOST=gcc \
- CC_TARGET=${TARGET_SYS}-gcc"
-
-do_configure() {
- :
-}
-
-do_install() {
- oe_runmake install DESTDIR="${D}"
-
- install -d ${D}${datadir}/games/openttd/scenario/
- install -d ${D}${datadir}/games/openttd/data
-
- install -m 0644 ${S}/scenario/*.scn ${D}${datadir}/games/openttd/scenario/
- install -m 0644 ${S}/data/*.grf ${D}${datadir}/games/openttd/data/
-}
-
diff --git a/packages/openvpn/openvpn.inc b/packages/openvpn/openvpn.inc
new file mode 100644
index 0000000000..70cdf4c84e
--- /dev/null
+++ b/packages/openvpn/openvpn.inc
@@ -0,0 +1,21 @@
+DESCRIPTION = "A full-featured SSL VPN solution via tun device."
+HOMEPAGE = "http://openvpn.sourceforge.net"
+SECTION = "console/network"
+LICENSE = "GPLv2"
+PRIORITY = "optional"
+DEPENDS = "lzo openssl"
+RDEPENDS = "kernel-module-tun"
+
+SRC_URI = "http://openvpn.net/release/openvpn-${PV}.tar.gz \
+ file://openvpn"
+S = "${WORKDIR}/openvpn-${PV}"
+
+CFLAGS += "-fno-inline"
+
+inherit autotools
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -d ${D}/${sysconfdir}/openvpn
+ install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
+}
diff --git a/packages/openvpn/openvpn_1.5.0.bb b/packages/openvpn/openvpn_1.5.0.bb
index 49fb233e3a..12cebf5bcd 100644
--- a/packages/openvpn/openvpn_1.5.0.bb
+++ b/packages/openvpn/openvpn_1.5.0.bb
@@ -1,17 +1,3 @@
-SECTION = "console/network"
-DESCRIPTION = "A VPN solution via tun device. Not IPSEC!"
-PRIORITY = "optional"
-DEPENDS = "lzo openssl"
-RRECOMMENDS = "kernel-module-tun"
-PR = "r2"
-LICENSE = "GPL"
-SRC_URI = "${SOURCEFORGE_MIRROR}/openvpn/openvpn-${PV}.tar.gz \
- file://openvpn"
+require openvpn.inc
-inherit autotools
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d
- install -d ${D}${sysconfdir}/openvpn
- install -m 755 ${WORKDIR}/openvpn ${D}${sysconfdir}/init.d
-}
+PR = "r3"
diff --git a/packages/openvpn/openvpn_1.6.0.bb b/packages/openvpn/openvpn_1.6.0.bb
index 387c0a9291..5bb4a2822b 100644
--- a/packages/openvpn/openvpn_1.6.0.bb
+++ b/packages/openvpn/openvpn_1.6.0.bb
@@ -1,19 +1,3 @@
-SECTION = "console/network"
-DESCRIPTION = "A VPN solution via tun device. Not IPSEC!"
-HOMEPAGE = "http://openvpn.sourceforge.net"
-LICENSE = "GPLv2"
-PRIORITY = "optional"
-DEPENDS = "lzo openssl"
-RRECOMMENDS = "kernel-module-tun"
-PR = "r1"
+require openvpn.inc
-SRC_URI = "${SOURCEFORGE_MIRROR}/openvpn/openvpn-${PV}.tar.gz \
- file://openvpn"
-
-inherit autotools
-
-do_install_append() {
- install -d ${D}${sysconfdir}/init.d
- install -d ${D}${sysconfdir}/openvpn
- install -m 755 ${WORKDIR}/openvpn ${D}${sysconfdir}/init.d
-}
+PR = "r2"
diff --git a/packages/openvpn/openvpn_2.0.2.bb b/packages/openvpn/openvpn_2.0.2.bb
index badac9b551..bb22dc9059 100644
--- a/packages/openvpn/openvpn_2.0.2.bb
+++ b/packages/openvpn/openvpn_2.0.2.bb
@@ -1,22 +1,3 @@
-DESCRIPTION = "A full-featured SSL VPN solution via tun device."
-HOMEPAGE = "http://openvpn.sourceforge.net"
-SECTION = "console/network"
-LICENSE = "GPLv2"
-PRIORITY = "optional"
-DEPENDS = "lzo openssl"
-RDEPENDS = "kernel-module-tun"
-PR = "r0"
+require openvpn.inc
-SRC_URI = "http://openvpn.net/release/openvpn-${PV}.tar.gz \
- file://openvpn"
-S = "${WORKDIR}/openvpn-${PV}"
-
-CFLAGS += "-fno-inline"
-
-inherit autotools
-
-do_install_append() {
- install -d ${D}/${sysconfdir}/init.d
- install -d ${D}/${sysconfdir}/openvpn
- install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
-}
+PR = "r1"
diff --git a/packages/openvpn/openvpn_2.0.9.bb b/packages/openvpn/openvpn_2.0.9.bb
index badac9b551..bb22dc9059 100644
--- a/packages/openvpn/openvpn_2.0.9.bb
+++ b/packages/openvpn/openvpn_2.0.9.bb
@@ -1,22 +1,3 @@
-DESCRIPTION = "A full-featured SSL VPN solution via tun device."
-HOMEPAGE = "http://openvpn.sourceforge.net"
-SECTION = "console/network"
-LICENSE = "GPLv2"
-PRIORITY = "optional"
-DEPENDS = "lzo openssl"
-RDEPENDS = "kernel-module-tun"
-PR = "r0"
+require openvpn.inc
-SRC_URI = "http://openvpn.net/release/openvpn-${PV}.tar.gz \
- file://openvpn"
-S = "${WORKDIR}/openvpn-${PV}"
-
-CFLAGS += "-fno-inline"
-
-inherit autotools
-
-do_install_append() {
- install -d ${D}/${sysconfdir}/init.d
- install -d ${D}/${sysconfdir}/openvpn
- install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
-}
+PR = "r1"
diff --git a/packages/openvpn/openvpn_2.0.bb b/packages/openvpn/openvpn_2.0.bb
index bea71b9c44..bb22dc9059 100644
--- a/packages/openvpn/openvpn_2.0.bb
+++ b/packages/openvpn/openvpn_2.0.bb
@@ -1,22 +1,3 @@
-SECTION = "console/network"
-DESCRIPTION = "A full-featured SSL VPN solution via tun device."
-HOMEPAGE = "http://openvpn.sourceforge.net"
-LICENSE = "GPLv2"
-PRIORITY = "optional"
-DEPENDS = "lzo openssl"
-RDEPENDS = "kernel-module-tun"
-PR = "r1"
-
-SRC_URI = "http://openvpn.net/release/openvpn-${PV}.tar.gz \
- file://openvpn"
-S = "${WORKDIR}/openvpn-${PV}"
-
-CFLAGS += "-fno-inline"
+require openvpn.inc
-inherit autotools
-
-do_install_append() {
- install -d ${D}/${sysconfdir}/init.d
- install -d ${D}/${sysconfdir}/openvpn
- install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
-}
+PR = "r1"
diff --git a/packages/opkg/opkg-collateral.bb b/packages/opkg/opkg-collateral.bb
new file mode 100644
index 0000000000..79c741d7be
--- /dev/null
+++ b/packages/opkg/opkg-collateral.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "opkg configuration files"
+SECTION = "base"
+LICENSE = "MIT"
+
+SRC_URI = "file://opkg.conf.comments \
+ file://lists \
+ file://dest \
+ file://src "
+
+do_compile () {
+ cat ${WORKDIR}/opkg.conf.comments >${WORKDIR}/opkg.conf
+ cat ${WORKDIR}/src >>${WORKDIR}/opkg.conf
+ cat ${WORKDIR}/dest >>${WORKDIR}/opkg.conf
+ cat ${WORKDIR}/lists >>${WORKDIR}/opkg.conf
+}
+
+do_install () {
+ install -d ${D}${sysconfdir}/
+ install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg.conf
+}
+
+CONFFILES_${PN} = "${sysconfdir}/opkg.conf"
diff --git a/packages/opkg/opkg-collateral/.mtn2git_empty b/packages/opkg/opkg-collateral/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/opkg/opkg-collateral/.mtn2git_empty
diff --git a/packages/opkg/opkg-collateral/dest b/packages/opkg/opkg-collateral/dest
new file mode 100644
index 0000000000..088ca403da
--- /dev/null
+++ b/packages/opkg/opkg-collateral/dest
@@ -0,0 +1 @@
+dest root /
diff --git a/packages/opkg/opkg-collateral/lists b/packages/opkg/opkg-collateral/lists
new file mode 100644
index 0000000000..f8aecd8e15
--- /dev/null
+++ b/packages/opkg/opkg-collateral/lists
@@ -0,0 +1,2 @@
+lists_dir ext /var/lib/opkg
+
diff --git a/packages/opkg/opkg-collateral/opkg.conf.comments b/packages/opkg/opkg-collateral/opkg.conf.comments
new file mode 100644
index 0000000000..51623f4d53
--- /dev/null
+++ b/packages/opkg/opkg-collateral/opkg.conf.comments
@@ -0,0 +1,23 @@
+# Must have one or more source entries of the form:
+#
+# src <src-name> <source-url>
+#
+# and one or more destination entries of the form:
+#
+# dest <dest-name> <target-path>
+#
+# where <src-name> and <dest-names> are identifiers that
+# should match [a-zA-Z0-9._-]+, <source-url> should be a
+# URL that points to a directory containing a Familiar
+# Packages file, and <target-path> should be a directory
+# that exists on the target system.
+
+# Proxy Support
+#option http_proxy http://proxy.tld:3128
+#option ftp_proxy http://proxy.tld:3128
+#option proxy_username <username>
+#option proxy_password <password>
+
+# Offline mode (for use in constructing flash images offline)
+#option offline_root target
+
diff --git a/packages/opkg/opkg-collateral/src b/packages/opkg/opkg-collateral/src
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/opkg/opkg-collateral/src
diff --git a/packages/opkg/opkg-native_svn.bb b/packages/opkg/opkg-native_svn.bb
index 2215a5798c..176a62359e 100644
--- a/packages/opkg/opkg-native_svn.bb
+++ b/packages/opkg/opkg-native_svn.bb
@@ -1,8 +1,10 @@
-require opkg_svn.bb
+require opkg.inc
+
+DEPENDS = "curl-native"
+PR = "r1"
target_libdir := "${libdir}"
inherit native
-EXTRA_OECONF += "--with-opkglibdir=${target_libdir}/opkg -disable-gpg"
-
+EXTRA_OECONF += "--with-opkglibdir=${target_libdir} -disable-gpg"
diff --git a/packages/opkg/opkg-sdk_svn.bb b/packages/opkg/opkg-sdk_svn.bb
new file mode 100644
index 0000000000..58381921b2
--- /dev/null
+++ b/packages/opkg/opkg-sdk_svn.bb
@@ -0,0 +1,7 @@
+require opkg.inc
+
+DEPENDS = "curl-sdk"
+
+inherit sdk
+
+EXTRA_OECONF += "--with-opkglibdir=${target_libdir}/opkg -disable-gpg"
diff --git a/packages/opkg/opkg.inc b/packages/opkg/opkg.inc
new file mode 100644
index 0000000000..2179f5595e
--- /dev/null
+++ b/packages/opkg/opkg.inc
@@ -0,0 +1,15 @@
+DESCRIPTION = "Open Package Manager"
+DESCRIPTION_libopkg = "Open Package Manager Library"
+SECTION = "base"
+LICENSE = "GPL"
+DEPENDS = "curl gpgme"
+PV = "0.0+svnr${SRCREV}"
+
+SRC_URI = "svn://svn.openmoko.org/trunk/src/target/;module=opkg;proto=http"
+S = "${WORKDIR}/opkg"
+
+inherit autotools pkgconfig
+
+do_stage() {
+ autotools_stage_all
+}
diff --git a/packages/opkg/opkg_svn.bb b/packages/opkg/opkg_svn.bb
index 149f3050cf..30461ead4d 100644
--- a/packages/opkg/opkg_svn.bb
+++ b/packages/opkg/opkg_svn.bb
@@ -1,21 +1,33 @@
-DESCRIPTION = "Open Package Manager"
-DESCRIPTION_libopkg = "Open Package Manager Library"
-SECTION = "base"
-LICENSE = "GPL"
-DEPENDS = "curl gpgme"
-PV = "0.0+svnr${SRCREV}"
-PR = "r1"
+require opkg.inc
-SRC_URI = "svn://svn.openmoko.org/trunk/src/target/;module=opkg;proto=http"
-S = "${WORKDIR}/opkg"
-
-inherit autotools pkgconfig
-
-do_stage() {
- autotools_stage_all
-}
+PR = "r2"
PACKAGES =+ "libopkg-dev libopkg"
FILES_libopkg-dev = "${libdir}/*.a ${libdir}/*.la ${libdir}/*.so"
FILES_libopkg = "${libdir}/*.so.*"
+
+# Define a variable to allow distros to run configure earlier.
+# (for example, to enable loading of ethernet kernel modules before networking starts)
+OPKG_INIT_POSITION = "98"
+OPKG_INIT_POSITION_slugos = "41"
+
+pkg_postinst_opkg () {
+#!/bin/sh
+if [ "x$D" != "x" ]; then
+ install -d ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d
+ # this happens at S98 where our good 'ole packages script used to run
+ echo "#!/bin/sh
+opkg-cl configure
+" > ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+ chmod 0755 ${IMAGE_ROOTFS}/${sysconfdir}/rcS.d/S${OPKG_INIT_POSITION}configure
+fi
+
+update-alternatives --install ${bindir}/opkg opkg ${bindir}/opkg-cl 100
+}
+
+pkg_postrm_opkg () {
+#!/bin/sh
+update-alternatives --remove opkg ${bindir}/opkg-cl
+}
+
diff --git a/packages/packagekit/packagekit_git.bb b/packages/packagekit/packagekit_git.bb
index 6f3419a60a..8f1644cd25 100644
--- a/packages/packagekit/packagekit_git.bb
+++ b/packages/packagekit/packagekit_git.bb
@@ -3,7 +3,7 @@ SECTION = "libs"
PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "dbus (>= 1.1.1) dbus-glib glib-2.0 sqlite3 opkg intltool intltool-native (>= 0.37.1)"
-RDEPENDS = "opkg"
+RDEPENDS_${PN} = "opkg"
PV = "0.1+git${SRCREV}"
PR = "r8"
diff --git a/packages/pango/pango-1.18.3/pkgconfig_fixes.patch b/packages/pango/files/pkgconfig_fixes.patch
index f021591a91..f021591a91 100644
--- a/packages/pango/pango-1.18.3/pkgconfig_fixes.patch
+++ b/packages/pango/files/pkgconfig_fixes.patch
diff --git a/packages/pango/pango_1.8.2.bb b/packages/pango/pango_1.8.2.bb
index c80f7326a3..477a6f27da 100644
--- a/packages/pango/pango_1.8.2.bb
+++ b/packages/pango/pango_1.8.2.bb
@@ -11,7 +11,8 @@ PR = "r0"
FULL_OPTIMIZATION_arm = "-O2"
SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.6/pango-${PV}.tar.bz2 \
- file://no-tests.patch;patch=1"
+ file://no-tests.patch;patch=1 \
+ file://pkgconfig_fixes.patch;patch=1"
inherit autotools pkgconfig
diff --git a/packages/perl/libxml-parser-perl-native_2.34.bb b/packages/perl/libxml-parser-perl-native_2.34.bb
index 193de60c80..64758ad5f2 100644
--- a/packages/perl/libxml-parser-perl-native_2.34.bb
+++ b/packages/perl/libxml-parser-perl-native_2.34.bb
@@ -1,5 +1,6 @@
SECTION = "libs"
+require libxml-parser-perl_${PV}.bb
+
inherit native
-require libxml-parser-perl_${PV}.bb
diff --git a/packages/popt/popt-native_1.13.bb b/packages/popt/popt-native_1.13.bb
new file mode 100644
index 0000000000..0124aa8485
--- /dev/null
+++ b/packages/popt/popt-native_1.13.bb
@@ -0,0 +1,16 @@
+require popt.inc
+
+DEPENDS = "gettext-native"
+
+PR = "r0"
+
+inherit native autotools
+
+SRC_URI = "http://freshmeat.net/redir/popt/72854/url_bz2/popt-${PV}.tar.gz"
+
+S = "${WORKDIR}/popt-${PV}"
+
+do_install() {
+ oe_libinstall -a -so libpopt ${STAGING_LIBDIR_NATIVE}
+ install -m 0644 popt.h ${STAGING_INCDIR_NATIVE}
+}
diff --git a/packages/popt/popt-native_1.7.bb b/packages/popt/popt-native_1.7.bb
index 75b90d0763..a83d384eee 100644
--- a/packages/popt/popt-native_1.7.bb
+++ b/packages/popt/popt-native_1.7.bb
@@ -1,5 +1,20 @@
-require popt_${PV}.bb
-inherit native
+require popt.inc
+
+DEPENDS = "gettext-native"
+
+PR = "r5"
+
+inherit native autotools
+
+SRC_URI = "ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/popt-${PV}.tar.gz \
+ file://m4.patch;patch=1 \
+ file://intl.patch;patch=1"
S = "${WORKDIR}/popt-${PV}"
+
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/popt-${PV}"
+
+do_install() {
+ oe_libinstall -a -so libpopt ${STAGING_LIBDIR_NATIVE}
+ install -m 0644 popt.h ${STAGING_INCDIR_NATIVE}
+}
diff --git a/packages/popt/popt.inc b/packages/popt/popt.inc
new file mode 100644
index 0000000000..3917805129
--- /dev/null
+++ b/packages/popt/popt.inc
@@ -0,0 +1,5 @@
+DESCRIPTION = "Popt is a C library for parsing command line parameters"
+HOMEPAGE = "http://freshmeat.net/projects/popt"
+AUTHOR = "Jeff Johnson"
+LICENSE = "MIT"
+SECTION = "libs"
diff --git a/packages/popt/popt_1.13.bb b/packages/popt/popt_1.13.bb
new file mode 100644
index 0000000000..9b071ba731
--- /dev/null
+++ b/packages/popt/popt_1.13.bb
@@ -0,0 +1,16 @@
+require popt.inc
+
+DEPENDS = "gettext virtual/libintl"
+
+PR = "r0"
+
+inherit autotools
+
+SRC_URI = "http://freshmeat.net/redir/popt/72854/url_bz2/popt-${PV}.tar.gz"
+
+do_stage() {
+ oe_libinstall -a -so libpopt ${STAGING_LIBDIR}
+ install -m 0644 popt.h ${STAGING_INCDIR}
+}
+
+
diff --git a/packages/popt/popt_1.7.bb b/packages/popt/popt_1.7.bb
index 137b6744dc..7992db56e7 100644
--- a/packages/popt/popt_1.7.bb
+++ b/packages/popt/popt_1.7.bb
@@ -1,17 +1,16 @@
-DESCRIPTION = "The popt library exists essentially \
-for parsing command line options."
-LICENSE = "MIT"
-SECTION = "libs"
-DEPENDS = "gettext-native"
-PR = "r4"
+require popt.inc
+
+DEPENDS = "gettext virtual/libintl"
+
+PR = "r5"
+
+inherit autotools
SRC_URI = "ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/popt-${PV}.tar.gz \
file://m4.patch;patch=1 \
file://intl.patch;patch=1"
-inherit autotools
-
-do_stage () {
+do_stage() {
oe_libinstall -a -so libpopt ${STAGING_LIBDIR}
- install -m 0644 popt.h ${STAGING_INCDIR}/
+ install -m 0644 popt.h ${STAGING_INCDIR}
}
diff --git a/packages/pv/.mtn2git_empty b/packages/pv/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/pv/.mtn2git_empty
diff --git a/packages/pv/pv_1.1.4.bb b/packages/pv/pv_1.1.4.bb
new file mode 100644
index 0000000000..199b7dfa28
--- /dev/null
+++ b/packages/pv/pv_1.1.4.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "Pipe Viewer is a terminal-based tool for monitoring the progress of data through a pipeline."
+SECTION = "console/utils"
+HOMEPAGE = "http://www.ivarch.com/programs/pv.shtml"
+LICENSE = "Artistic License 2.0"
+
+inherit autotools
+
+SRC_URI = "http://pipeviewer.googlecode.com/files/pv-${PV}.tar.bz2"
+
+
+EXTRA_OEMAKE = "LD='${LD}'"
diff --git a/packages/pwgen/.mtn2git_empty b/packages/pwgen/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/pwgen/.mtn2git_empty
diff --git a/packages/pwgen/pwgen_2.06.bb b/packages/pwgen/pwgen_2.06.bb
new file mode 100644
index 0000000000..8fe419babb
--- /dev/null
+++ b/packages/pwgen/pwgen_2.06.bb
@@ -0,0 +1,7 @@
+DESCRIPTION = "Password generator which creates passwords which can be easily memorized by a human"
+HOMEPAGE = "http://sf.net/projects/pwgen/"
+LICENSE = "GPL"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pwgen/pwgen-${PV}.tar.gz"
+
+inherit autotools
diff --git a/packages/python/python-gsmd_svn.bb b/packages/python/python-gsmd_svn.bb
index 14d3abd607..e92df762e7 100644
--- a/packages/python/python-gsmd_svn.bb
+++ b/packages/python/python-gsmd_svn.bb
@@ -5,9 +5,9 @@ SECTION = "devel/python"
LICENSE = "LGPL"
DEPENDS = "libgsmd"
PV = "0.02+svnr${SRCREV}"
-PR = "r1"
+PR = "r0"
-SRC_URI = "svn://svn.projects.openmoko.org/svnroot/python-openmoko;module=python-gsmd;proto=http"
+SRC_URI = "svn://svn.projects.openmoko.org/svnroot/python-openmoko/trunk;module=python-gsmd;proto=http"
S = "${WORKDIR}/python-gsmd"
SRCREV_pn-python-gsmd ?= "${AUTOREV}"
diff --git a/packages/python/python-lightmediascanner_svn.bb b/packages/python/python-lightmediascanner_svn.bb
index 27d0bb62f1..003b718d4b 100644
--- a/packages/python/python-lightmediascanner_svn.bb
+++ b/packages/python/python-lightmediascanner_svn.bb
@@ -3,7 +3,7 @@ SECTION = "devel/python"
HOMEPAGE = "http://lms.garage.maemo.org/"
AUTHOR = "Gustavo Barbieri"
LICENSE = "LGPL"
-DEPENDS = "lightmediascanner"
+DEPENDS = "lightmediascanner python-cython-native"
PV = "0.1.0+svn${SRCREV}"
SRC_URI = "svn://garage.maemo.org/svn/lms/;module=python-lightmediascanner;proto=https"
diff --git a/packages/python/python-pyiw_0.3.3.bb b/packages/python/python-pyiw_0.3.3.bb
index aa86a07e8f..aaa18c7ee9 100644
--- a/packages/python/python-pyiw_0.3.3.bb
+++ b/packages/python/python-pyiw_0.3.3.bb
@@ -5,25 +5,24 @@ SECTION = "devel/python"
PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "wireless-tools"
-RDEPENDS = "python-core libiw"
+RDEPENDS = "python-core"
PR = "ml0"
+inherit autotools pkgconfig distutils-base
+
+CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR}"
+
SRC_URI = "http://downloads.emperorlinux.com/contrib/pyiw/pyiw-${PV}.tbz2 \
file://Makefile"
-
-S="${WORKDIR}/pyiw-${PV}"
+S = "${WORKDIR}/pyiw-${PV}"
do_unpack_real () {
- tar jxvf pyiw-${PV}.tbz2
+ tar jxvf ${DL_DIR}/pyiw-${PV}.tbz2
cp Makefile pyiw-${PV}/
}
do_unpack_real[dirs] = "${WORKDIR}"
addtask unpack_real before do_patch after do_unpack
-inherit autotools pkgconfig distutils-base
-
-CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR}"
-
do_install() {
install -d ${D}${libdir}/${PYTHON_DIR}/site-packages/
install -m 0755 pyiw.so ${D}${libdir}/${PYTHON_DIR}/site-packages/pyiw.so
diff --git a/packages/qt4/qt4-x11-free.inc b/packages/qt4/qt4-x11-free.inc
index 2650433ec8..60c266bc73 100644
--- a/packages/qt4/qt4-x11-free.inc
+++ b/packages/qt4/qt4-x11-free.inc
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.trolltech.com"
LICENSE = "GPL QPL"
DEPENDS += "virtual/libx11 fontconfig xft libxext libxrender libxrandr libxcursor"
PROVIDES = "qt4x11"
-PR = "r7"
+PR = "r9"
SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \
file://0001-cross-compile.patch;patch=1 \
diff --git a/packages/qt4/qt_packaging.inc b/packages/qt4/qt_packaging.inc
index ba2a037f59..1b4faf97d2 100644
--- a/packages/qt4/qt_packaging.inc
+++ b/packages/qt4/qt_packaging.inc
@@ -177,6 +177,15 @@ do_install() {
rm -rf ${D}/${bindir}/${QT_DIR_NAME}
rm -rf ${D}/${datadir}/${QT_DIR_NAME}/mkspecs
+ # fix some .la and .pc files
+ sed -i s#"moc_location=${STAGING_BINDIR}/moc4$"#"moc_location=${bindir}/moc4"# ${D}/${libdir}/pkgconfig/Qt*.pc
+ sed -i s#"uic_location=${STAGING_BINDIR}/uic4$"#"uic_location=${bindir}/uic4"# ${D}/${libdir}/pkgconfig/Qt*.pc
+ sed -i s#'$(OE_QMAKE_LIBS_X11)'#"${OE_QMAKE_LIBS_X11}"#g ${D}/${libdir}/pkgconfig/Qt*.pc
+ sed -i s#-L${STAGING_LIBDIR}##g ${D}${libdir}/pkgconfig/Qt*.pc
+
+ sed -i s#-L${STAGING_LIBDIR}#-L${libdir}#g ${D}${libdir}/libQt*.la
+ sed -i s#'$(OE_QMAKE_LIBS_X11)'#"${OE_QMAKE_LIBS_X11}"#g ${D}/${libdir}/libQt*.la
+
install -d ${D}/${libdir}/fonts
touch ${D}/${libdir}/fonts/fontdir
}
diff --git a/packages/qt4/qt_staging.inc b/packages/qt4/qt_staging.inc
index 9aa309d3af..1c3d69c1af 100644
--- a/packages/qt4/qt_staging.inc
+++ b/packages/qt4/qt_staging.inc
@@ -2,11 +2,12 @@
do_stage_append() {
cd ${STAGING_LIBDIR}/pkgconfig
sed -i s#"-L${S}/lib"##g Qt*.pc
- sed -i s#"moc_location=${S}/bin/moc"#moc_location=${STAGING_BINDIR}/moc4# Qt*.pc
- sed -i s#"uic_location=${S}/bin/uic"#uic_location=${STAGING_BINDIR}/uic4# Qt*.pc
- sed -i s#libdir=\$\{prefix\}/lib#libdir=\$\{prefix\}/lib/${QT_DIR_NAME}#g Qt*.pc
+ sed -i s#"moc_location=${STAGING_BINDIR}/moc4$"## Qt*.pc
+ sed -i s#"uic_location=${STAGING_BINDIR}/uic4$"## Qt*.pc
+ sed -i s#"-L${STAGING_LIBDIR}"##g Qt*.pc
+ sed -i s#'$(OE_QMAKE_LIBS_X11)'#"${OE_QMAKE_LIBS_X11}"#g Qt*.pc
- cd ${STAGING_LIBDIR}/${QT_DIR_NAME}
+ cd ${STAGING_LIBDIR}
sed -i s#"-L${S}/lib"##g libQt*.la
}
@@ -17,23 +18,27 @@ do_stage() {
oe_runmake install INSTALL_ROOT=${STAGE_TEMP}
install -d ${STAGING_INCDIR}/
- install -d ${STAGING_LIBDIR}/${QT_DIR_NAME}
+ install -d ${STAGING_LIBDIR}
cp -pPRf ${STAGE_TEMP}/$includedir/* ${STAGING_INCDIR}/
for i in ${STAGE_TEMP}/${libdir}/*.la
do
sed -i s,installed=yes,installed=no, $i
- cp -fpPR $i ${STAGING_LIBDIR}/${QT_DIR_NAME}/
- cp -fpPR ${STAGE_TEMP}/${libdir}/$(basename $i .la).prl ${STAGING_LIBDIR}/${QT_DIR_NAME}
- oe_libinstall -C ${STAGE_TEMP}/${libdir} -so $(basename $i .la) ${STAGING_LIBDIR}/${QT_DIR_NAME}
+ sed -i -e "/^dependency_libs=/s,-L${libdir},-L${STAGING_LIBDIR},g" $i
+ sed -i -e "s,-L${libdir},-L${STAGING_LIBDIR},g" ${STAGE_TEMP}/${libdir}/$(basename $i .la).prl
+ cp -fpPR $i ${STAGING_LIBDIR}
+ cp -fpPR ${STAGE_TEMP}/${libdir}/$(basename $i .la).prl ${STAGING_LIBDIR}
+ oe_libinstall -C ${STAGE_TEMP}/${libdir} -so $(basename $i .la) ${STAGING_LIBDIR}
done
for i in libQtAssistantClient${QT_LIBINFIX} libQtDesignerComponents${QT_LIBINFIX} libQtUiTools${QT_LIBINFIX} libQtUiTools${QT_LIBINFIX} libQtDesigner${QT_LIBINFIX}
do
- cp ${STAGE_TEMP}/${libdir}/$i.prl ${STAGING_LIBDIR}/${QT_DIR_NAME} || true
- cp ${STAGE_TEMP}/${libdir}/$i.la ${STAGING_LIBDIR}/${QT_DIR_NAME} || true
- oe_libinstall -C ${STAGE_TEMP}/${libdir} -so $i ${STAGING_LIBDIR}/${QT_DIR_NAME} || true
- oe_libinstall -C ${STAGE_TEMP}/${libdir} -a $i ${STAGING_LIBDIR}/${QT_DIR_NAME} || true
+ sed -i -e "s,-L${libdir},-L${STAGING_LIBDIR},g" $i.prl || true
+ cp ${STAGE_TEMP}/${libdir}/$i.prl ${STAGING_LIBDIR} || true
+ sed -i -e "/^dependency_libs=/s,-L${libdir},-L${STAGING_LIBDIR},g" $i.la || true
+ cp ${STAGE_TEMP}/${libdir}/$i.la ${STAGING_LIBDIR} || true
+ oe_libinstall -C ${STAGE_TEMP}/${libdir} -so $i ${STAGING_LIBDIR} || true
+ oe_libinstall -C ${STAGE_TEMP}/${libdir} -a $i ${STAGING_LIBDIR} || true
done
rm -rf ${STAGE_TEMP}
diff --git a/packages/qt4/qtopia-core.inc b/packages/qt4/qtopia-core.inc
index 46bec73cd8..eab7e1b3e1 100644
--- a/packages/qt4/qtopia-core.inc
+++ b/packages/qt4/qtopia-core.inc
@@ -4,7 +4,7 @@ LICENSE = "GPL"
PRIORITY = "optional"
HOMEPAGE = "http://www.trolltech.com"
DEPENDS += "tslib"
-PR = "r1"
+PR = "r3"
SRC_URI = "ftp://ftp.trolltech.com/qt/source/qtopia-core-opensource-src-${PV}.tar.gz \
file://qconfig-oe.h \
diff --git a/packages/qtopia-phone/qtopia-phone-x11_4.3.1.bb b/packages/qtopia-phone/qtopia-phone-x11_4.3.1.bb
index 45f3297212..3ccfe2803e 100644
--- a/packages/qtopia-phone/qtopia-phone-x11_4.3.1.bb
+++ b/packages/qtopia-phone/qtopia-phone-x11_4.3.1.bb
@@ -11,9 +11,9 @@ LICENSE = "GPL"
PRIORITY = "optional"
HOMEPAGE = "http://www.trolltech.com"
DEPENDS = "glib-2.0 dbus freetype alsa-lib bluez-libs virtual/libx11 fontconfig xft libxext libxrender libxrandr libxcursor libxtst"
-RDEPENDS = "atd"
+RDEPENDS = "atd tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
PROVIDES = "qtopia-phone"
-PR = "r7"
+PR = "r8"
SRCREV = "${AUTOREV}"
SRC_URI = "git://git.openmoko.org/git/qtopia.git;protocol=git \
file://Xsession.d/89qtopia \
diff --git a/packages/quagga/quagga.inc b/packages/quagga/quagga.inc
index 811eb15ea9..f81a062ed9 100644
--- a/packages/quagga/quagga.inc
+++ b/packages/quagga/quagga.inc
@@ -21,6 +21,8 @@ RDEPENDS_${PN}-watchquagga = "${PN}"
# the "ip" command from busybox is not sufficient (flush by protocol flushes all routes)
RDEPENDS_${PN} += "iproute2"
+QUAGGASUBDIR = ""
+
# ${QUAGGASUBDIR} is deal with old versions. Set to "/attic" for old
# versions and leave it empty for recent versions.
SRC_URI = "http://www.quagga.net/download${QUAGGASUBDIR}/quagga-${PV}.tar.gz \
diff --git a/packages/quagga/quagga_0.99.6.bb b/packages/quagga/quagga_0.99.6.bb
index 0595a3c94b..9911f519d0 100644
--- a/packages/quagga/quagga_0.99.6.bb
+++ b/packages/quagga/quagga_0.99.6.bb
@@ -1,3 +1,5 @@
PR = "r2"
require quagga.inc
+
+QUAGGASUBDIR = "/attic" \ No newline at end of file
diff --git a/packages/quagga/quagga_0.99.7.bb b/packages/quagga/quagga_0.99.7.bb
index 6bcc251730..7401534db5 100644
--- a/packages/quagga/quagga_0.99.7.bb
+++ b/packages/quagga/quagga_0.99.7.bb
@@ -1,3 +1,3 @@
-PR = "r0"
-
require quagga.inc
+
+QUAGGASUBDIR = "/attic" \ No newline at end of file
diff --git a/packages/quagga/quagga_0.99.8.bb b/packages/quagga/quagga_0.99.8.bb
index 6bcc251730..7401534db5 100644
--- a/packages/quagga/quagga_0.99.8.bb
+++ b/packages/quagga/quagga_0.99.8.bb
@@ -1,3 +1,3 @@
-PR = "r0"
-
require quagga.inc
+
+QUAGGASUBDIR = "/attic" \ No newline at end of file
diff --git a/packages/rsync/files/m4.patch b/packages/rsync/files/m4.patch
new file mode 100644
index 0000000000..9279e0e354
--- /dev/null
+++ b/packages/rsync/files/m4.patch
@@ -0,0 +1,33 @@
+--- /dev/null 2008-03-14 20:41:13.712070199 -0500
++++ rsync-3.0.0/m4/have_type.m4 2008-03-15 03:28:57.000000000 -0500
+@@ -0,0 +1,30 @@
++dnl $Id: have-type.m4 14166 2004-08-26 12:35:42Z joda $
++dnl
++dnl check for existance of a type
++
++dnl AC_HAVE_TYPE(TYPE,INCLUDES)
++AC_DEFUN([AC_HAVE_TYPE], [
++AC_REQUIRE([AC_HEADER_STDC])
++cv=`echo "$1" | sed 'y%./+- %__p__%'`
++AC_MSG_CHECKING(for $1)
++AC_CACHE_VAL([ac_cv_type_$cv],
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <sys/types.h>
++#if STDC_HEADERS
++#include <stdlib.h>
++#include <stddef.h>
++#endif
++$2]],
++[[$1 foo;]])],
++[eval "ac_cv_type_$cv=yes"],
++[eval "ac_cv_type_$cv=no"]))dnl
++ac_foo=`eval echo \\$ac_cv_type_$cv`
++AC_MSG_RESULT($ac_foo)
++if test "$ac_foo" = yes; then
++ ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
++if false; then
++ AC_CHECK_TYPES($1)
++fi
++ AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
++fi
++])
diff --git a/packages/rsync/rsync.inc b/packages/rsync/rsync.inc
new file mode 100644
index 0000000000..bc24f4daac
--- /dev/null
+++ b/packages/rsync/rsync.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "A file-synchronization tool"
+HOMEPAGE = "http://www.samba.org/rsync"
+SECTION = "console/network"
+LICENSE = "GPL"
+PRIORITY = "optional"
+DEPENDS += "popt"
+
+inherit autotools
+
+EXTRA_OEMAKE='STRIP=""'
+
+do_install_append() {
+ install -d ${D}/etc
+ install -m 0644 ${WORKDIR}/rsyncd.conf ${D}/etc
+}
+
diff --git a/packages/rsync/rsync_2.6.9.bb b/packages/rsync/rsync_2.6.9.bb
index ab7ae43428..102f7e8eb8 100644
--- a/packages/rsync/rsync_2.6.9.bb
+++ b/packages/rsync/rsync_2.6.9.bb
@@ -1,17 +1,6 @@
-LICENSE = "GPL"
-DESCRIPTION = "A file-synchronization tool"
-SECTION = "console/network"
-PRIORITY = "optional"
-PR = "r0"
+require rsync.inc
-SRC_URI = "http://rsync.samba.org/ftp/rsync/rsync-${PV}.tar.gz \
- file://rsyncd.conf"
-
-inherit autotools
+PR = "r1"
-do_install_append() {
- install -d ${D}/etc
- install -m 0644 ${WORKDIR}/rsyncd.conf ${D}/etc
-}
-
-EXTRA_OEMAKE='STRIP=""'
+SRC_URI = "http://rsync.samba.org/ftp/old-versions/rsync/rsync-${PV}.tar.gz \
+ file://rsyncd.conf"
diff --git a/packages/rsync/rsync_3.0.0.bb b/packages/rsync/rsync_3.0.0.bb
new file mode 100644
index 0000000000..720ef04521
--- /dev/null
+++ b/packages/rsync/rsync_3.0.0.bb
@@ -0,0 +1,11 @@
+require rsync.inc
+
+PR = "r0"
+
+SRC_URI = "http://rsync.samba.org/ftp/rsync/rsync-${PV}.tar.gz \
+ file://m4.patch;patch=1 \
+ file://rsyncd.conf"
+
+do_compile_prepend() {
+ sed -i "s/conf_stop make_stop//" Makefile
+}
diff --git a/packages/setserial/setserial_2.17.bb b/packages/setserial/setserial_2.17.bb
index 4646df818a..6b73eed0cf 100644
--- a/packages/setserial/setserial_2.17.bb
+++ b/packages/setserial/setserial_2.17.bb
@@ -1,12 +1,18 @@
+DESCRIPTION = "setserial is a program designed to set and/or report the configuration information associated with a serial port"
+HOMEPAGE = "http://setserial.sourceforge.net"
+AUTHOR = "Theodore Ts'o tytso@mit.edu"
SECTION = "console/utils"
-SRC_URI = "http://fresh.t-systems-sfr.com/linux/src/setserial-2.17.tar.gz"
LICENSE = "GPL"
-PR = "r1"
+PR = "r2"
+
inherit autotools
+SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${PN}-${PV}.tar.gz"
+
do_install() {
- install -d ${D}${base_bindir}
- install -d ${D}/usr/man/man8
- install -d ${D}${mandir}
- autotools_do_install
+ install -d ${D}${bindir}
+ install -d ${D}${mandir}/man8
+
+ install -m 0755 ${S}/setserial ${D}${bindir}
+ install -m 0644 ${S}/setserial.8 ${D}${mandir}/man8
}
diff --git a/packages/smartmontools/smartmontools_5.38.bb b/packages/smartmontools/smartmontools_5.38.bb
new file mode 100644
index 0000000000..ec9a10d4c5
--- /dev/null
+++ b/packages/smartmontools/smartmontools_5.38.bb
@@ -0,0 +1 @@
+include smartmontools.inc
diff --git a/packages/speech-dispatcher/files/configure_fix.patch b/packages/speech-dispatcher/files/configure_fix.patch
new file mode 100644
index 0000000000..19feabf379
--- /dev/null
+++ b/packages/speech-dispatcher/files/configure_fix.patch
@@ -0,0 +1,46 @@
+Index: speech-dispatcher-0.6.5/configure.in
+===================================================================
+--- speech-dispatcher-0.6.5.orig/configure.in 2008-03-10 23:11:42.000000000 +0000
++++ speech-dispatcher-0.6.5/configure.in 2008-03-10 23:14:02.000000000 +0000
+@@ -134,12 +134,15 @@
+ AC_SUBST(ibmtts_include)
+
+ dnl check for espeak support
++AC_LANG_PUSH([C++])
+ AC_CHECK_LIB(espeak,
+ espeak_Initialize,
+ espeak_ok="true"; echo "Compiling with espeak support.",
+ espeak_ok="false"; echo "Espeak not found.",
+ -lpthread -lm)
+
++AC_LANG_POP([C++])
++
+ AC_ARG_WITH(espeak, AS_HELP_STRING(--with-espeak, Compile with espeak support),
+ if test $withval = "no"; then
+ echo "Forced compilation without espeak support.";
+Index: speech-dispatcher-0.6.5/src/modules/Makefile.am
+===================================================================
+--- speech-dispatcher-0.6.5.orig/src/modules/Makefile.am 2008-03-10 23:18:50.000000000 +0000
++++ speech-dispatcher-0.6.5/src/modules/Makefile.am 2008-03-10 23:25:39.000000000 +0000
+@@ -8,6 +8,7 @@
+ EXTRA_DIST = module_main.c module_utils_addvoice.c festival_client.c festival_client.h
+
+ AM_CFLAGS = -Wall -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -L$(top_srcdir)/src/audio -I$(top_srcdir)/src/audio -I../../intl/ $(ibmtts_include) @SNDFILE_CFLAGS@ -Wl,--rpath -Wl,$(spdlibdir)
++AM_CXXFLAGS = -Wall -DLOCALEDIR=\"$(localedir)\" $(inc_local) @glib_include@ -L$(top_srcdir)/src/audio -I$(top_srcdir)/src/audio -I../../intl/ $(ibmtts_include) @SNDFILE_CFLAGS@ -Wl,--rpath -Wl,$(spdlibdir)
+
+ if flite_support
+ if ibmtts_support
+@@ -45,6 +46,6 @@
+ sd_cicero_SOURCES = cicero.c module_utils.c module_utils.h
+ sd_cicero_LDADD = -lm -lpthread -ldotconf @glib_libs@
+
+-sd_espeak_SOURCES = espeak.c module_utils.c module_utils.h
++sd_espeak_SOURCES = espeak.c module_utils.c module_utils.h dummy.cpp
+ sd_espeak_LDFLAGS = -rpath '$(spdlibdir)'
+ sd_espeak_LDADD = -lsdaudio -lm -lespeak -lpthread -ldotconf @SNDFILE_LIBS@ @gthread_libs@
+Index: speech-dispatcher-0.6.5/src/modules/dummy.cpp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ speech-dispatcher-0.6.5/src/modules/dummy.cpp 2008-03-10 23:26:50.000000000 +0000
+@@ -0,0 +1 @@
++
diff --git a/packages/speech-dispatcher/speech-dispatcher_0.6.5.bb b/packages/speech-dispatcher/speech-dispatcher_0.6.6.bb
index 3857a1577a..302f642d67 100644
--- a/packages/speech-dispatcher/speech-dispatcher_0.6.5.bb
+++ b/packages/speech-dispatcher/speech-dispatcher_0.6.6.bb
@@ -5,17 +5,18 @@ LICENSE = "GPLv2"
DEPENDS = "espeak flite pulseaudio libdotconf glib-2.0"
RPROVIDES_${PN} += "speechd"
-PR = "r7"
+PR = "r0"
inherit autotools update-rc.d
SRC_URI = "http://www.freebsoft.org/pub/projects/speechd/${PN}-${PV}.tar.gz \
file://speech-dispatcher.init \
file://srcMakefile.am.patch;patch=1 \
+ file://configure_fix.patch;patch=1 \
file://configSpeechd.conf.in_00.patch;patch=1"
LEAD_SONAME = "libspeechd.so"
-EXTRA_OECONF = " --with-espeak=yes --with-flite=yes --with-ibmtts=no --with-nas=no --with-alsa=yes --with-pulse=yes "
+EXTRA_OECONF = " --with-espeak --with-flite --without-ibmtts --without-nas --with-alsa --with-pulse "
INITSCRIPT_NAME = "speech-dispatcher"
INITSCRIPT_PARAMS = "defaults 45"
diff --git a/packages/stage-manager/files/stage-manager b/packages/stage-manager/files/stage-manager
index 35453992f4..536d1afda0 100755
--- a/packages/stage-manager/files/stage-manager
+++ b/packages/stage-manager/files/stage-manager
@@ -33,6 +33,7 @@ def read_cache(cachefile):
cache[data[0]] = {}
cache[data[0]]['ts'] = int(data[1])
cache[data[0]]['size'] = int(data[2])
+ cache[data[0]]['seen'] = False
return cache
def mkdirhier(dir):
@@ -77,13 +78,14 @@ if __name__ == "__main__":
if os.access(options.cachefile, os.F_OK):
cache = read_cache(options.cachefile)
- found = False
+ found_difference = False
def updateCache(path, fstamp):
cache[path] = {}
cache[path]['ts'] = fstamp[stat.ST_MTIME]
cache[path]['size'] = fstamp[stat.ST_SIZE]
- found = True
+ cache[path]['seen'] = True
+ found_difference = True
def copyfile(path):
if options.copydir:
@@ -94,11 +96,13 @@ if __name__ == "__main__":
def copydir(path, fstamp):
if options.copydir:
copypath = os.path.join(options.copydir, path.replace(options.parentdir, '', 1))
+ if os.path.exists(copypath):
+ os.system("rm -rf " + copypath)
if os.path.islink(path):
os.symlink(os.readlink(path), copypath)
else:
mkdirhier(copypath)
- os.utime(copypath, (fstamp[stat.ST_ATIME], fstamp[stat.ST_MTIME]))
+ os.utime(copypath, (fstamp[stat.ST_ATIME], fstamp[stat.ST_MTIME]))
for root, dirs, files in os.walk(options.parentdir):
for f in files:
@@ -115,6 +119,7 @@ if __name__ == "__main__":
print "file %s changed" % path
updateCache(path, fstamp)
copyfile(path)
+ cache[path]['seen'] = True
for d in dirs:
path = os.path.join(root, d)
fstamp = os.lstat(path)
@@ -127,13 +132,23 @@ if __name__ == "__main__":
print "dir %s changed" % path
updateCache(path, fstamp)
copydir(path, fstamp)
+ cache[path]['seen'] = True
+
+ todel = []
+ for path in cache:
+ if not cache[path]['seen']:
+ print "%s removed" % path
+ found_difference = True
+ todel.append(path)
if options.update:
print "Updating"
+ for path in todel:
+ del cache[path]
mkdirhier(os.path.split(options.cachefile)[0])
write_cache(options.cachefile, cache)
- if found:
+ if found_difference:
sys.exit(5)
sys.exit(0)
diff --git a/packages/stage-manager/stagemanager-native_0.0.1.bb b/packages/stage-manager/stagemanager-native_0.0.1.bb
index 828af1fbb5..355e1d95bb 100644
--- a/packages/stage-manager/stagemanager-native_0.0.1.bb
+++ b/packages/stage-manager/stagemanager-native_0.0.1.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Helper script for packaged-staging.bbclass"
-PR = "r7"
+PR = "r8"
SRC_URI = "file://stage-manager"
LICENSE = "GPLv2"
@@ -10,7 +10,6 @@ inherit native
DEPENDS = " "
PACKAGE_DEPENDS = " "
-PATCHTOOL = ""
INHIBIT_DEFAULT_DEPS = "1"
do_install() {
@@ -19,5 +18,5 @@ do_install() {
}
do_stage() {
-:
+ :
}
diff --git a/packages/starling/starling_0.1.bb b/packages/starling/starling_0.1.bb
deleted file mode 100644
index fab79342ac..0000000000
--- a/packages/starling/starling_0.1.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-LICENSE = "GPL"
-SECTION = "gpe/multimedia"
-PRIORITY = "optional"
-PR = "r1"
-
-inherit gpe autotools
-
-DESCRIPTION = "Starling audio player for GPE"
-DEPENDS = "gtk+ libgpewidget gstreamer gst-plugins-good gst-plugins-bad esound sqlite3 libsoup"
-RDEPENDS = "esd \
- gst-plugin-audioconvert \
- gst-plugin-esd \
- gst-plugin-typefindfunctions \
- gst-plugin-decodebin \
- gst-plugin-volume"
-
-RRECOMMENDS = "gst-plugin-mad \
- gst-plugin-modplug \
- gst-plugin-ivorbis \
- gst-plugin-tcp"
-
-SRC_URI = "http://handhelds.org/~skyhusker/${P}.tar.bz2"
diff --git a/packages/starling/starling_0.2.bb b/packages/starling/starling_0.2.bb
deleted file mode 100644
index 32cd1b9025..0000000000
--- a/packages/starling/starling_0.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-DESCRIPTION = "Starling audio player for GPE"
-SECTION = "gpe/multimedia"
-PRIORITY = "optional"
-LICENSE = "GPL"
-DEPENDS = "gtk+ gstreamer gst-plugins-good gst-plugins-bad sqlite libsoup gnutls"
-
-RDEPENDS = "esd \
- gst-plugin-audioconvert \
- gst-plugin-esd \
- gst-plugin-typefindfunctions \
- gst-plugin-decodebin \
- gst-plugin-volume"
-RRECOMMENDS = "gst-plugin-mad \
- gst-plugin-modplug \
- gst-plugin-ivorbis \
- gst-plugin-tcp"
-
-GPE_TARBALL_SUFFIX = "bz2"
-
-inherit gpe autotools
-
diff --git a/packages/starling/starling_svn.bb b/packages/starling/starling_svn.bb
index 67d98dbd60..7969cd84f0 100644
--- a/packages/starling/starling_svn.bb
+++ b/packages/starling/starling_svn.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Starling audio player for GPE"
SECTION = "gpe/multimedia"
PRIORITY = "optional"
LICENSE = "GPL"
-DEPENDS = "gtk+ libgpewidget gstreamer gst-plugins-good gst-plugins-bad esound sqlite3 libsoup"
+DEPENDS = "gtk+ gstreamer gst-plugins-good gst-plugins-bad esound sqlite libsoup"
RDEPENDS = "esd \
gst-plugin-audioconvert \
gst-plugin-esd \
diff --git a/packages/strace/strace-4.5.14/strace-4.5.14-add-syscalls-up-to-sysvipc.patch b/packages/strace/strace-4.5.14/strace-4.5.14-add-syscalls-up-to-sysvipc.patch
new file mode 100644
index 0000000000..99b00ed689
--- /dev/null
+++ b/packages/strace/strace-4.5.14/strace-4.5.14-add-syscalls-up-to-sysvipc.patch
@@ -0,0 +1,75 @@
+Index: strace-4.5.14/linux/avr32/syscallent.h
+===================================================================
+--- strace-4.5.14.orig/linux/avr32/syscallent.h 2007-02-19 07:48:12.000000000 +0100
++++ strace-4.5.14/linux/avr32/syscallent.h 2007-02-19 08:01:24.000000000 +0100
+@@ -251,4 +251,57 @@
+ { 3, TS, sys_tgkill, "tgkill" }, /* 221 */
+ { 5, 0, printargs, "SYS_222" }, /* 222 */
+ { 2, TF, sys_utimes, "utimes" }, /* 223 */
+- { 6, 0, printargs, "fadvise64_64" }, /* 224 */
++ { 6, 0, sys_fadvise64_64, "fadvise64_64" }, /* 224 */
++ { 3, 0, printargs, "cacheflush" }, /* 225 */
++ { 0, 0, printargs, "vserver" }, /* 226 */
++ { 4, 0, sys_mq_open, "mq_open" }, /* 227 */
++ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 228 */
++ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 229 */
++ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 230 */
++ { 2, 0, sys_mq_notify, "mq_notify" }, /* 231 */
++ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 232 */
++ { 4, 0, printargs, "kexec_load" }, /* 233 */
++ { 1, 0, sys_waitid, "waitid" }, /* 234 */
++ { 5, 0, printargs, "add_key" }, /* 235 */
++ { 4, 0, printargs, "request_key" }, /* 236 */
++ { 5, 0, printargs, "keyctl" }, /* 237 */
++ { 3, 0, printargs, "ioprio_set" }, /* 238 */
++ { 2, 0, printargs, "ioprio_get" }, /* 239 */
++ { 1, 0, printargs, "inotify_init" }, /* 240 */
++ { 3, 0, printargs, "inotify_add_watch" }, /* 241 */
++ { 2, 0, printargs, "inotify_rm_watch" }, /* 242 */
++ { 4, 0, printargs, "openat" }, /* 243 */
++ { 3, 0, printargs, "mkdirat" }, /* 244 */
++ { 4, 0, printargs, "mknodat" }, /* 245 */
++ { 5, 0, printargs, "fchownat" }, /* 246 */
++ { 3, 0, printargs, "futimesat" }, /* 247 */
++ { 4, 0, sys_fstatfs64, "fstatat64" }, /* 248 */
++ { 3, 0, printargs, "unlinkat" }, /* 249 */
++ { 4, 0, printargs, "renameat" }, /* 250 */
++ { 5, 0, printargs, "linkat" }, /* 251 */
++ { 3, 0, printargs, "symlinkat" }, /* 252 */
++ { 4, 0, printargs, "readlinkat" }, /* 253 */
++ { 3, 0, printargs, "fchmodat" }, /* 254 */
++ { 3, 0, printargs, "faccessat" }, /* 255 */
++ { 6, 0, printargs, "pselect6" }, /* 256 */
++ { 5, 0, printargs, "ppoll" }, /* 257 */
++ { 1, 0, printargs, "unshare" }, /* 258 */
++ { 2, 0, printargs, "set_robust_list" }, /* 259 */
++ { 3, 0, printargs, "get_robust_list" }, /* 260 */
++ { 6, 0, printargs, "splice" }, /* 261 */
++ { 4, 0, printargs, "sync_file_range" }, /* 262 */
++ { 4, 0, printargs, "tee" }, /* 263 */
++ { 4, 0, printargs, "vmsplice" }, /* 264 */
++ { 6 0, printargs, "sys_epoll_pwait" }, /* 265 */
++ { 2, TI, sys_msgget, "msgget" }, /* 266 */
++ { 4, TI, sys_msgsnd, "msgsnd" }, /* 267 */
++ { 5, TI, sys_msgrcv, "msgrcv" }, /* 268 */
++ { 3, TI, sys_msgctl, "msgctl" }, /* 269 */
++ { 3, TI, sys_semget, "semget" }, /* 270 */
++ { 3, TI, sys_semop, "semop" }, /* 271 */
++ { 4, TI, sys_semctl, "semctl" }, /* 272 */
++ { 4, TI, sys_semtimedop, "semtimedop" }, /* 273 */
++ { 3, TI, sys_shmat, "shmat" }, /* 274 */
++ { 3, TI, sys_shmget, "shmget" }, /* 275 */
++ { 1, TI, sys_shmdt, "shmdt" }, /* 276 */
++ { 3, TI, sys_shmctl, "shmctl" }, /* 277 */
+Index: strace-4.5.14/system.c
+===================================================================
+--- strace-4.5.14.orig/system.c 2007-02-19 07:48:12.000000000 +0100
++++ strace-4.5.14/system.c 2007-02-19 07:48:12.000000000 +0100
+@@ -1578,7 +1578,6 @@
+ { CTL_KERN, "CTL_KERN" },
+ { CTL_VM, "CTL_VM" },
+ { CTL_NET, "CTL_NET" },
+- /* was CTL_PROC */
+ { CTL_FS, "CTL_FS" },
+ { CTL_DEBUG, "CTL_DEBUG" },
+ { CTL_DEV, "CTL_DEV" },
diff --git a/packages/strace/strace-4.5.14/strace-4.5.14-avr32.patch b/packages/strace/strace-4.5.14/strace-4.5.14-avr32.patch
new file mode 100644
index 0000000000..1d4c4202e9
--- /dev/null
+++ b/packages/strace/strace-4.5.14/strace-4.5.14-avr32.patch
@@ -0,0 +1,2701 @@
+Index: strace-4.5.14-avr32/linux/avr32/syscallent.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ strace-4.5.14-avr32/linux/avr32/syscallent.h 2006-05-02 13:36:39.000000000 +0200
+@@ -0,0 +1,254 @@
++/*
++ * Copyright (c) 2004-2006 Atmel Corporation
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ * derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * $Id$
++ */
++
++ { 0, 0, sys_setup, "setup" }, /* 0 */
++ { 1, TP, sys_exit, "_exit" }, /* 1 */
++ { 0, TP, sys_fork, "fork" }, /* 2 */
++ { 3, 0, sys_read, "read" }, /* 3 */
++ { 3, 0, sys_write, "write" }, /* 4 */
++ { 3, TF, sys_open, "open" }, /* 5 */
++ { 1, 0, sys_close, "close" }, /* 6 */
++ { 1, 0, sys_umask, "umask" }, /* 7 */
++ { 2, TF, sys_creat, "creat" }, /* 8 */
++ { 2, TF, sys_link, "link" }, /* 9 */
++ { 1, TF, sys_unlink, "unlink" }, /* 10 */
++ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
++ { 1, TF, sys_chdir, "chdir" }, /* 12 */
++ { 1, 0, sys_time, "time" }, /* 13 */
++ { 3, TF, sys_mknod, "mknod" }, /* 14 */
++ { 2, TF, sys_chmod, "chmod" }, /* 15 */
++ { 3, TF, sys_chown, "chown" }, /* 16 */
++ { 3, TF, sys_chown, "lchown" }, /* 17 */
++ { 3, 0, sys_lseek, "lseek" }, /* 18 */
++ { 5, 0, sys_llseek, "_llseek" }, /* 19 */
++ { 0, 0, sys_getpid, "getpid" }, /* 20 */
++ { 5, TF, sys_mount, "mount" }, /* 21 */
++ { 2, TF, sys_umount, "umount" }, /* 22 */
++ { 1, 0, sys_setuid, "setuid" }, /* 23 */
++ { 0, 0, sys_getuid, "getuid" }, /* 24 */
++ { 1, 0, sys_stime, "stime" }, /* 25 */
++ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
++ { 1, 0, sys_alarm, "alarm" }, /* 27 */
++ { 0, TS, sys_pause, "pause" }, /* 28 */
++ { 2, TF, sys_utime, "utime" }, /* 29 */
++ { 2, TF, sys_stat, "stat" }, /* 30 */
++ { 2, 0, sys_fstat, "fstat" }, /* 31 */
++ { 2, TF, sys_lstat, "lstat" }, /* 32 */
++ { 2, TF, sys_access, "access" }, /* 33 */
++ { 1, TF, sys_chroot, "chroot" }, /* 34 */
++ { 0, 0, sys_sync, "sync" }, /* 35 */
++ { 1, 0, sys_fsync, "fsync" }, /* 36 */
++ { 2, TS, sys_kill, "kill" }, /* 37 */
++ { 2, TF, sys_rename, "rename" }, /* 38 */
++ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
++ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
++ { 1, 0, sys_dup, "dup" }, /* 41 */
++ { 1, 0, sys_pipe, "pipe" }, /* 42 */
++ { 1, 0, sys_times, "times" }, /* 43 */
++ { 5, TP, sys_clone, "clone" }, /* 44 */
++ { 1, 0, sys_brk, "brk" }, /* 45 */
++ { 1, 0, sys_setgid, "setgid" }, /* 46 */
++ { 0, 0, sys_getgid, "getgid" }, /* 47 */
++ { 2, TF, sys_getcwd, "getcwd" }, /* 48 */
++ { 0, 0, sys_geteuid, "geteuid" }, /* 49 */
++ { 0, 0, sys_getegid, "getegid" }, /* 50 */
++ { 1, TF, sys_acct, "acct" }, /* 51 */
++ { 1, 0, sys_setfsuid, "setfsuid" }, /* 52 */
++ { 1, 0, sys_setfsgid, "setfsgid" }, /* 53 */
++ { 3, 0, sys_ioctl, "ioctl" }, /* 54 */
++ { 3, 0, sys_fcntl, "fcntl" }, /* 55 */
++ { 2, 0, sys_setpgid, "setpgid" }, /* 56 */
++ { 4, 0, sys_mremap, "mremap" }, /* 57 */
++ { 3, 0, sys_setresuid, "setresuid" }, /* 58 */
++ { 3, 0, sys_getresuid, "getresuid" }, /* 59 */
++ { 2, 0, sys_setreuid, "setreuid" }, /* 60 */
++ { 2, 0, sys_setregid, "setregid" }, /* 61 */
++ { 2, 0, sys_ustat, "ustat" }, /* 62 */
++ { 2, 0, sys_dup2, "dup2" }, /* 63 */
++ { 0, 0, sys_getppid, "getppid" }, /* 64 */
++ { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
++ { 0, 0, sys_setsid, "setsid" }, /* 66 */
++ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 67 */
++ { 1, TS, printargs, "rt_sigreturn" }, /* 68 */
++ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 69 */
++ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 70 */
++ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 71 */
++ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 72 */
++ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 73 */
++ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
++ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
++ { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */
++ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
++ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
++ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
++ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
++ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
++ { 5, 0, sys_select, "select" }, /* 82 */
++ { 2, TF, sys_symlink, "symlink" }, /* 83 */
++ { 1, 0, sys_fchdir, "fchdir" }, /* 84 */
++ { 3, TF, sys_readlink, "readlink" }, /* 85 */
++ { 5, TF, sys_pread, "pread" }, /* 86 */
++ { 5, TF, sys_pwrite, "pwrite" }, /* 87 */
++ { 1, TF, sys_swapon, "swapon" }, /* 88 */
++ { 3, 0, sys_reboot, "reboot" }, /* 89 */
++ { 6, 0, sys_mmap, "mmap" }, /* 90 */
++ { 2, 0, sys_munmap, "munmap" }, /* 91 */
++ { 2, TF, sys_truncate, "truncate" }, /* 92 */
++ { 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */
++ { 2, 0, sys_fchmod, "fchmod" }, /* 94 */
++ { 3, 0, sys_fchown, "fchown" }, /* 95 */
++ { 2, 0, sys_getpriority, "getpriority" }, /* 96 */
++ { 3, 0, sys_setpriority, "setpriority" }, /* 97 */
++ { 4, TP, sys_wait4, "wait4" }, /* 98 */
++ { 2, TF, sys_statfs, "statfs" }, /* 99 */
++ { 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */
++ { 0, 0, sys_vhangup, "vhangup" }, /* 101 */
++ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 102 */
++ { 3, 0, sys_syslog, "syslog" }, /* 103 */
++ { 3, 0, sys_setitimer, "setitimer" }, /* 104 */
++ { 2, 0, sys_getitimer, "getitimer" }, /* 105 */
++ { 1, 0, sys_swapoff, "swapoff" }, /* 106 */
++ { 1, 0, sys_sysinfo, "sysinfo" }, /* 107 */
++ { 6, 0, sys_ipc, "ipc" }, /* 108 */
++ { 4, TF, sys_sendfile, "sendfile" }, /* 109 */
++ { 2, 0, sys_setdomainname, "setdomainname" }, /* 110 */
++ { 1, 0, sys_uname, "uname" }, /* 111 */
++ { 1, 0, sys_adjtimex, "adjtimex" }, /* 112 */
++ { 3, 0, sys_mprotect, "mprotect" }, /* 113 */
++ { 0, TP, sys_vfork, "vfork" }, /* 114 */
++ { 2, 0, sys_init_module, "init_module" }, /* 115 */
++ { 1, 0, sys_delete_module, "delete_module" }, /* 116 */
++ { 4, 0, sys_quotactl, "quotactl" }, /* 117 */
++ { 1, 0, sys_getpgid, "getpgid" }, /* 118 */
++ { 0, 0, sys_bdflush, "bdflush" }, /* 119 */
++ { 3, 0, sys_sysfs, "sysfs" }, /* 120 */
++ { 1, 0, sys_personality, "personality" }, /* 121 */
++ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 122 */
++ { 3, 0, sys_getdents, "getdents" }, /* 123 */
++ { 2, 0, sys_flock, "flock" }, /* 124 */
++ { 3, 0, sys_msync, "msync" }, /* 125 */
++ { 3, 0, sys_readv, "readv" }, /* 126 */
++ { 3, 0, sys_writev, "writev" }, /* 127 */
++ { 1, 0, sys_getsid, "getsid" }, /* 128 */
++ { 1, 0, sys_fdatasync, "fdatasync" }, /* 129 */
++ { 1, 0, sys_sysctl, "_sysctl" }, /* 130 */
++ { 2, 0, sys_mlock, "mlock" }, /* 131 */
++ { 2, 0, sys_munlock, "munlock" }, /* 132 */
++ { 2, 0, sys_mlockall, "mlockall" }, /* 133 */
++ { 0, 0, sys_munlockall, "munlockall" }, /* 134 */
++ { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 135 */
++ { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 136 */
++ { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 137 */
++ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 138 */
++ { 0, 0, sys_sched_yield, "sched_yield"}, /* 139 */
++ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 140 */
++ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 141 */
++ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 142 */
++ { 2, 0, sys_nanosleep, "nanosleep" }, /* 143 */
++ { 3, 0, sys_poll, "poll" }, /* 144 */
++ { 3, 0, printargs, "nfsservctl" }, /* 145 */
++ { 3, 0, sys_setresgid, "setresgid" }, /* 146 */
++ { 3, 0, sys_getresgid, "getresgid" }, /* 147 */
++ { 5, 0, sys_prctl, "prctl" }, /* 148 */
++ { 3, TN, sys_socket, "socket" }, /* 149 */
++ { 3, TN, sys_bind, "bind" }, /* 150 */
++ { 3, TN, sys_connect, "connect" }, /* 151 */
++ { 2, TN, sys_listen, "listen" }, /* 152 */
++ { 3, TN, sys_accept, "accept" }, /* 153 */
++ { 3, TN, sys_getsockname, "getsockname" }, /* 154 */
++ { 3, TN, sys_getpeername, "getpeername" }, /* 155 */
++ { 4, TN, sys_socketpair, "socketpair" }, /* 156 */
++ { 4, TN, sys_send, "send" }, /* 157 */
++ { 4, TN, sys_recv, "recv" }, /* 158 */
++ { 6, TN, sys_sendto, "sendto" }, /* 159 */
++ { 6, TN, sys_recvfrom, "recvfrom" }, /* 160 */
++ { 2, TN, sys_shutdown, "shutdown" }, /* 161 */
++ { 5, TN, sys_setsockopt, "setsockopt" }, /* 162 */
++ { 5, TN, sys_getsockopt, "getsockopt" }, /* 163 */
++ { 3, TN, sys_sendmsg, "sendmsg" }, /* 164 */
++ { 3, TN, sys_recvmsg, "recvmsg" }, /* 165 */
++ { 3, TF, sys_truncate64, "truncate64" }, /* 166 */
++ { 3, TF, sys_ftruncate64, "ftruncate64" }, /* 167 */
++ { 2, TF, sys_stat64, "stat64" }, /* 168 */
++ { 2, TF, sys_lstat64, "lstat64" }, /* 169 */
++ { 2, TF, sys_fstat64, "fstat64" }, /* 170 */
++ { 2, TF, sys_pivotroot, "pivot_root" }, /* 171 */
++ { 3, 0, printargs, "mincore" }, /* 172 */
++ { 3, 0, sys_madvise, "madvise" }, /* 173 */
++ { 4, 0, sys_getdents64, "getdents64" }, /* 174 */
++ { 3, 0, sys_fcntl, "fcntl64" }, /* 175 */
++ { 0, 0, printargs, "gettid" }, /* 176 */
++ { 4, 0, sys_readahead, "readahead" }, /* 177 */
++ { 5, TF, sys_setxattr, "setxattr" }, /* 178 */
++ { 5, TF, sys_setxattr, "lsetxattr" }, /* 179 */
++ { 5, 0, sys_fsetxattr, "fsetxattr" }, /* 180 */
++ { 4, TF, sys_getxattr, "getxattr" }, /* 181 */
++ { 4, TF, sys_getxattr, "lgetxattr" }, /* 182 */
++ { 4, 0, sys_fgetxattr, "fgetxattr" }, /* 183 */
++ { 3, TF, sys_listxattr, "listxattr" }, /* 184 */
++ { 3, TF, sys_listxattr, "llistxattr" }, /* 185 */
++ { 3, 0, sys_flistxattr, "flistxattr" }, /* 186 */
++ { 2, TF, sys_removexattr, "removexattr" }, /* 187 */
++ { 2, TF, sys_removexattr, "lremovexattr" }, /* 188 */
++ { 2, 0, sys_fremovexattr, "fremovexattr" }, /* 189 */
++ { 2, TS, sys_kill, "tkill" }, /* 190 */
++ { 4, TF, sys_sendfile64, "sendfile64" }, /* 191 */
++ { 5, 0, sys_futex, "futex" }, /* 192 */
++ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 193 */
++ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 194 */
++ { 2, 0, sys_capget, "capget" }, /* 195 */
++ { 2, 0, sys_capset, "capset" }, /* 196 */
++ { 2, 0, printargs, "io_setup" }, /* 197 */
++ { 1, 0, printargs, "io_destroy" }, /* 198 */
++ { 5, 0, printargs, "io_getevents" }, /* 199 */
++ { 3, 0, printargs, "io_submit" }, /* 200 */
++ { 3, 0, printargs, "io_cancel" }, /* 201 */
++ { 6, 0, printargs, "fadvise64" }, /* 202 */
++ { 1, TP, sys_exit, "exit_group" }, /* 203 */
++ { 4, 0, printargs, "lookup_dcookie"}, /* 204 */
++ { 1, 0, printargs, "epoll_create" }, /* 205 */
++ { 4, 0, printargs, "epoll_ctl" }, /* 206 */
++ { 4, 0, printargs, "epoll_wait" }, /* 207 */
++ { 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 208 */
++ { 1, 0, printargs, "set_tid_address"}, /* 209 */
++ { 3, 0, sys_timer_create, "timer_create" }, /* 210 */
++ { 4, 0, sys_timer_settime, "timer_settime" }, /* 211 */
++ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 212 */
++ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 213 */
++ { 1, 0, sys_timer_delete, "timer_delete" }, /* 214 */
++ { 2, 0, sys_clock_settime, "clock_settime" }, /* 215 */
++ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 216 */
++ { 2, 0, sys_clock_getres, "clock_getres" }, /* 217 */
++ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 218 */
++ { 3, TF, sys_statfs64, "statfs64" }, /* 219 */
++ { 3, 0, sys_fstatfs64, "fstatfs64" }, /* 220 */
++ { 3, TS, sys_tgkill, "tgkill" }, /* 221 */
++ { 5, 0, printargs, "SYS_222" }, /* 222 */
++ { 2, TF, sys_utimes, "utimes" }, /* 223 */
++ { 6, 0, printargs, "fadvise64_64" }, /* 224 */
+Index: strace-4.5.14-avr32/defs.h
+===================================================================
+--- strace-4.5.14-avr32.orig/defs.h 2006-05-02 13:36:31.000000000 +0200
++++ strace-4.5.14-avr32/defs.h 2006-05-02 13:36:39.000000000 +0200
+@@ -94,6 +94,9 @@
+ # if defined(X86_64)
+ # define LINUX_X86_64
+ # endif
++# if defined(AVR32)
++# define LINUX_AVR32
++# endif
+ #endif
+
+ #if defined(SVR4) || defined(FREEBSD)
+@@ -120,7 +123,7 @@
+ #include <sys/pioctl.h>
+ #endif /* FREEBSD */
+ #else /* !USE_PROCFS */
+-#if (defined(LINUXSPARC) || defined (LINUX_X86_64)) && defined(__GLIBC__)
++#if (defined(LINUXSPARC) || defined (LINUX_X86_64) || defined (LINUX_AVR32)) && defined(__GLIBC__)
+ #include <sys/ptrace.h>
+ #else
+ /* Work around awkward prototype in ptrace.h. */
+@@ -327,7 +330,7 @@ struct tcb {
+ #define TCB_FOLLOWFORK 00400 /* Process should have forks followed */
+ #define TCB_REPRINT 01000 /* We should reprint this syscall on exit */
+ #ifdef LINUX
+-# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM)
++# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) || defined(AVR32)
+ # define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */
+ # endif
+ # define TCB_CLONE_DETACHED 04000 /* CLONE_DETACHED set in creating syscall */
+Index: strace-4.5.14-avr32/process.c
+===================================================================
+--- strace-4.5.14-avr32.orig/process.c 2006-05-02 13:36:31.000000000 +0200
++++ strace-4.5.14-avr32/process.c 2006-05-02 13:36:39.000000000 +0200
+@@ -694,6 +694,10 @@ int new;
+ 0x100000 | new) < 0)
+ return -1;
+ return 0;
++#elif defined(AVR32)
++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_R8), new) < 0)
++ return -1;
++ return 0;
+ #else
+ #warning Do not know how to handle change_syscall for this architecture
+ #endif /* architecture */
+@@ -774,6 +778,28 @@ setarg(tcp, argnum)
+ if (errno)
+ return -1;
+ }
++#elif defined(AVR32)
++ {
++ errno = 0;
++ if (argnum == 0)
++ ptrace(PTRACE_POKEUSER, tcp->pid,
++ (char *)(REG_R12_ORIG),
++ tcp->u_arg[argnum]);
++ else if (argnum < 4)
++ /* r11 .. r9 */
++ ptrace(PTRACE_POKEUSER, tcp->pid,
++ (char *)(REG_R12 - 4 * argnum),
++ tcp->u_arg[argnum]);
++ else if (argnum < 6)
++ /* r6 .. r5 */
++ ptrace(PTRACE_POKEUSER, tcp->pid,
++ (char *)(REG_R10 - 4 * argnum),
++ tcp->u_arg[argnum]);
++ else
++ return -E2BIG;
++ if (errno)
++ return -1;
++ }
+ #else
+ # warning Sorry, setargs not implemented for this architecture.
+ #endif
+@@ -2866,8 +2892,27 @@ const struct xlat struct_user_offsets[]
+ { uoff(regs.ARM_pc), "pc" },
+ { uoff(regs.ARM_cpsr), "cpsr" },
+ #endif
+-
+-#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64)
++#ifdef AVR32
++ { uoff(regs.sr), "sr" },
++ { uoff(regs.pc), "pc" },
++ { uoff(regs.lr), "lr" },
++ { uoff(regs.sp), "sp" },
++ { uoff(regs.r12), "r12" },
++ { uoff(regs.r11), "r11" },
++ { uoff(regs.r10), "r10" },
++ { uoff(regs.r9), "r9" },
++ { uoff(regs.r8), "r8" },
++ { uoff(regs.r7), "r7" },
++ { uoff(regs.r6), "r6" },
++ { uoff(regs.r5), "r5" },
++ { uoff(regs.r4), "r4" },
++ { uoff(regs.r3), "r3" },
++ { uoff(regs.r2), "r2" },
++ { uoff(regs.r1), "r1" },
++ { uoff(regs.r0), "r0" },
++ { uoff(regs.r12_orig), "orig_r12" },
++#endif
++#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32)
+ { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" },
+ #endif
+ #if defined(I386) || defined(X86_64)
+@@ -2883,20 +2928,20 @@ const struct xlat struct_user_offsets[]
+ #if !defined(SPARC64)
+ { uoff(start_code), "offsetof(struct user, start_code)" },
+ #endif
+-#ifdef SH64
++#if defined(SH64) || defined(AVR32)
+ { uoff(start_data), "offsetof(struct user, start_data)" },
+ #endif
+ #if !defined(SPARC64)
+ { uoff(start_stack), "offsetof(struct user, start_stack)" },
+ #endif
+ { uoff(signal), "offsetof(struct user, signal)" },
+-#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64)
++#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) && !defined(AVR32)
+ { uoff(reserved), "offsetof(struct user, reserved)" },
+ #endif
+ #if !defined(SPARC64)
+ { uoff(u_ar0), "offsetof(struct user, u_ar0)" },
+ #endif
+-#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64)
++#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(AVR32)
+ { uoff(u_fpstate), "offsetof(struct user, u_fpstate)" },
+ #endif
+ { uoff(magic), "offsetof(struct user, magic)" },
+Index: strace-4.5.14-avr32/syscall.c
+===================================================================
+--- strace-4.5.14-avr32.orig/syscall.c 2006-05-02 13:36:30.000000000 +0200
++++ strace-4.5.14-avr32/syscall.c 2006-05-02 13:36:39.000000000 +0200
+@@ -853,6 +853,8 @@ struct tcb *tcp;
+ static long r9;
+ #elif defined(X86_64)
+ static long rax;
++#elif defined(AVR32)
++ static struct pt_regs regs;
+ #endif
+ #endif /* LINUX */
+ #ifdef FREEBSD
+@@ -1299,7 +1301,26 @@ struct tcb *tcp;
+ return 0;
+ }
+ }
+-#endif /* SH64 */
++#elif defined(AVR32)
++ /*
++ * Read complete register set in one go.
++ */
++ if (ptrace(PTRACE_GETREGS, pid, NULL, &regs) < 0)
++ return -1;
++
++ /*
++ * We only need to grab the syscall number on syscall entry.
++ */
++ if (!(tcp->flags & TCB_INSYSCALL)) {
++ scno = regs.r8;
++
++ /* Check if we return from execve. */
++ if (tcp->flags & TCB_WAITEXECVE) {
++ tcp->flags &= ~TCB_WAITEXECVE;
++ return 0;
++ }
++ }
++#endif /* AVR32 */
+ #endif /* LINUX */
+ #ifdef SUNOS4
+ if (upeek(pid, uoff(u_arg[7]), &scno) < 0)
+@@ -1658,6 +1679,17 @@ struct tcb *tcp;
+ tcp->u_rval = r9;
+ u_error = 0;
+ }
++#else
++#ifdef AVR32
++ if (regs.r12 && (unsigned) -regs.r12 < nerrnos) {
++ tcp->u_rval = -1;
++ u_error = -regs.r12;
++ }
++ else {
++ tcp->u_rval = regs.r12;
++ u_error = 0;
++ }
++#endif /* AVR32 */
+ #endif /* SH64 */
+ #endif /* SH */
+ #endif /* HPPA */
+@@ -1883,6 +1915,12 @@ force_result(tcp, error, rval)
+ r9 = error ? -error : rval;
+ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_GENERAL(9), r9) < 0)
+ return -1;
++#else
++#ifdef AVR32
++ regs.r12 = error ? -error : rval;
++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_R12, regs.r12) < 0)
++ return -1;
++#endif /* AVR32 */
+ #endif /* SH64 */
+ #endif /* SH */
+ #endif /* HPPA */
+@@ -2155,6 +2193,14 @@ struct tcb *tcp;
+ return -1;
+ }
+ }
++#elif defined(AVR32)
++ tcp->u_nargs = sysent[tcp->scno].nargs;
++ tcp->u_arg[0] = regs.r12;
++ tcp->u_arg[1] = regs.r11;
++ tcp->u_arg[2] = regs.r10;
++ tcp->u_arg[3] = regs.r9;
++ tcp->u_arg[4] = regs.r5;
++ tcp->u_arg[5] = regs.r3;
+ #else /* Other architecture (like i386) (32bits specific) */
+ {
+ int i;
+@@ -2460,7 +2506,7 @@ strace: out of memory for call counts\n"
+
+ switch (known_scno(tcp)) {
+ #ifdef LINUX
+-#if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA)
++#if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA) && !defined(AVR32)
+ case SYS_socketcall:
+ decode_subcall(tcp, SYS_socket_subcall,
+ SYS_socket_nsubcalls, deref_style);
+@@ -2469,7 +2515,7 @@ strace: out of memory for call counts\n"
+ decode_subcall(tcp, SYS_ipc_subcall,
+ SYS_ipc_nsubcalls, shift_style);
+ break;
+-#endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA */
++#endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA && !AVR32 */
+ #if defined (SPARC) || defined (SPARC64)
+ case SYS_socketcall:
+ sparc_socket_decode (tcp);
+Index: strace-4.5.14-avr32/util.c
+===================================================================
+--- strace-4.5.14-avr32.orig/util.c 2006-05-02 13:36:30.000000000 +0200
++++ strace-4.5.14-avr32/util.c 2006-05-02 13:36:39.000000000 +0200
+@@ -1051,6 +1051,9 @@ struct tcb *tcp;
+ #elif defined(SH64)
+ if (upeek(tcp->pid, REG_PC ,&pc) < 0)
+ return -1;
++#elif defined(AVR32)
++ if (upeek(tcp->pid, REG_PC, &pc) < 0)
++ return -1;
+ #endif
+ return pc;
+ #endif /* LINUX */
+@@ -1199,6 +1202,14 @@ struct tcb *tcp;
+ return;
+ }
+ tprintf("[%08lx] ", pc);
++#elif defined(AVR32)
++ long pc;
++
++ if (upeek(tcp->pid, REG_PC, &pc) < 0) {
++ tprintf("[????????] ");
++ return;
++ }
++ tprintf("[%08lx] ", pc);
+ #endif /* !architecture */
+ #endif /* LINUX */
+
+@@ -1380,6 +1391,9 @@ typedef struct regs arg_setup_state;
+ # define arg0_offset (REG_OFFSET+16)
+ # define arg1_offset (REG_OFFSET+24)
+ # define restore_arg0(tcp, state, val) 0
++# elif defined (AVR32)
++# define arg0_offset (REG_R12)
++# define arg1_offset (REG_R11)
+ # else
+ # define arg0_offset 0
+ # define arg1_offset 4
+Index: strace-4.5.14-avr32/configure.ac
+===================================================================
+--- strace-4.5.14-avr32.orig/configure.ac 2006-05-02 13:36:30.000000000 +0200
++++ strace-4.5.14-avr32/configure.ac 2006-05-02 13:36:39.000000000 +0200
+@@ -103,6 +103,10 @@ x86?64*)
+ arch=x86_64
+ AC_DEFINE([X86_64], 1, [Define for the AMD x86-64 architecture.])
+ ;;
++avr32*)
++ arch=avr32
++ AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.])
++ ;;
+ *)
+ AC_MSG_RESULT([NO!])
+ AC_MSG_ERROR([architecture $host_cpu is not supported by strace])
+Index: strace-4.5.14-avr32/config.h.in
+===================================================================
+--- strace-4.5.14-avr32.orig/config.h.in 2006-05-02 13:36:30.000000000 +0200
++++ strace-4.5.14-avr32/config.h.in 2006-05-02 13:36:39.000000000 +0200
+@@ -6,6 +6,9 @@
+ /* Define for the ARM architecture. */
+ #undef ARM
+
++/* Define for the AVR32 architecture. */
++#undef AVR32
++
+ /* Define for the FreeBSD operating system. */
+ #undef FREEBSD
+
+Index: strace-4.5.14-avr32/config.sub
+===================================================================
+--- strace-4.5.14-avr32.orig/config.sub 2006-05-02 13:36:30.000000000 +0200
++++ strace-4.5.14-avr32/config.sub 2006-05-02 13:36:39.000000000 +0200
+@@ -231,6 +231,7 @@ case $basic_machine in
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
++ | avr32 \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+@@ -297,7 +298,7 @@ case $basic_machine in
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+- | avr-* \
++ | avr-* | avr32-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+Index: strace-4.5.14-avr32/configure
+===================================================================
+--- strace-4.5.14-avr32.orig/configure 2006-05-02 13:36:30.000000000 +0200
++++ strace-4.5.14-avr32/configure 2006-05-02 13:36:39.000000000 +0200
+@@ -956,7 +956,7 @@ esac
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+- cd $ac_popdir
++ cd "$ac_popdir"
+ done
+ fi
+
+@@ -2017,6 +2017,14 @@ cat >>confdefs.h <<\_ACEOF
+ _ACEOF
+
+ ;;
++avr32*)
++ arch=avr32
++
++cat >>confdefs.h <<\_ACEOF
++#define AVR32 1
++_ACEOF
++
++ ;;
+ *)
+ echo "$as_me:$LINENO: result: NO!" >&5
+ echo "${ECHO_T}NO!" >&6
+@@ -2660,8 +2668,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2719,8 +2726,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2836,8 +2842,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2891,8 +2896,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2937,8 +2941,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -2982,8 +2985,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3721,8 +3723,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3786,8 +3787,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -3959,8 +3959,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4032,8 +4031,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4087,8 +4085,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4159,8 +4156,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4214,8 +4210,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4345,8 +4340,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4410,8 +4404,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4454,8 +4447,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4519,8 +4511,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4563,8 +4554,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4628,8 +4618,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4672,8 +4661,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4737,8 +4725,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4781,8 +4768,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4846,8 +4832,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4890,8 +4875,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4955,8 +4939,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -4999,8 +4982,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5064,8 +5046,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5108,8 +5089,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5173,8 +5153,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5217,8 +5196,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5286,8 +5264,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5360,8 +5337,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5460,8 +5436,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5610,8 +5585,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5668,8 +5642,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5816,8 +5789,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -5968,8 +5940,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6033,8 +6004,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6100,8 +6070,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6147,8 +6116,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6214,8 +6182,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6466,8 +6433,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6532,8 +6498,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6600,8 +6565,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6717,8 +6681,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6811,8 +6774,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -6958,8 +6920,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7019,8 +6980,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7081,8 +7041,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7355,8 +7314,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7400,8 +7358,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7470,8 +7427,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7538,8 +7494,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7584,8 +7539,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7651,8 +7605,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7697,8 +7650,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7766,8 +7718,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7833,8 +7784,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7898,8 +7848,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -7965,8 +7914,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8031,8 +7979,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8076,8 +8023,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8144,8 +8090,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8217,8 +8162,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -8288,8 +8232,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+@@ -9292,11 +9235,6 @@ esac
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+- if test x"$ac_file" != x-; then
+- { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+- rm -f "$ac_file"
+- fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+@@ -9335,6 +9273,12 @@ echo "$as_me: error: cannot find input f
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
++
++ if test x"$ac_file" != x-; then
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ rm -f "$ac_file"
++ fi
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+Index: strace-4.5.14-avr32/system.c
+===================================================================
+--- strace-4.5.14-avr32.orig/system.c 2006-09-14 17:03:55.000000000 +0200
++++ strace-4.5.14-avr32/system.c 2006-09-14 17:04:44.000000000 +0200
+@@ -1578,7 +1578,7 @@ static const struct xlat sysctl_root[] =
+ { CTL_KERN, "CTL_KERN" },
+ { CTL_VM, "CTL_VM" },
+ { CTL_NET, "CTL_NET" },
+- { CTL_PROC, "CTL_PROC" },
++ /* was CTL_PROC */
+ { CTL_FS, "CTL_FS" },
+ { CTL_DEBUG, "CTL_DEBUG" },
+ { CTL_DEV, "CTL_DEV" },
+Index: strace-4.5.14-avr32/linux/avr32/ioctlent.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ strace-4.5.14-avr32/linux/avr32/ioctlent.h 2006-09-21 14:34:24.000000000 +0200
+@@ -0,0 +1,1268 @@
++{"linux/fs.h", "FIBMAP", 0x1},
++{"linux/fs.h", "FIGETBSZ", 0x2},
++{"linux/fd.h", "FDCLRPRM", 0x241},
++{"linux/fd.h", "FDMSGON", 0x245},
++{"linux/fd.h", "FDMSGOFF", 0x246},
++{"linux/fd.h", "FDFMTBEG", 0x247},
++{"linux/fd.h", "FDFMTEND", 0x249},
++{"linux/fd.h", "FDSETEMSGTRESH", 0x24a},
++{"linux/fd.h", "FDFLUSH", 0x24b},
++{"linux/fd.h", "FDRESET", 0x254},
++{"linux/fd.h", "FDWERRORCLR", 0x256},
++{"linux/fd.h", "FDRAWCMD", 0x258},
++{"linux/fd.h", "FDTWADDLE", 0x259},
++{"linux/fd.h", "FDEJECT", 0x25a},
++{"linux/wireless.h", "IW_POWER_ALL_R", 0x300},
++{"linux/in6.h", "IPV6_PRIORITY_RESERVED1", 0x300},
++{"linux/apm_bios.h", "APM_DEVICE_PARALLEL", 0x300},
++{"linux/hdreg.h", "HDIO_GETGEO", 0x301},
++{"linux/ps2esdi.h", "HDIO_GETGEO", 0x301},
++{"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x302},
++{"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x304},
++{"linux/hdreg.h", "HDIO_GET_QDMA", 0x305},
++{"linux/hdreg.h", "HDIO_SET_XFER", 0x306},
++{"linux/hdreg.h", "HDIO_OBSOLETE_IDENTITY", 0x307},
++{"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x308},
++{"linux/hdreg.h", "HDIO_GET_32BIT", 0x309},
++{"linux/hdreg.h", "HDIO_GET_NOWERR", 0x30a},
++{"linux/hdreg.h", "HDIO_GET_DMA", 0x30b},
++{"linux/hdreg.h", "HDIO_GET_NICE", 0x30c},
++{"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x30d},
++{"linux/hdreg.h", "HDIO_GET_WCACHE", 0x30e},
++{"linux/hdreg.h", "HDIO_GET_ACOUSTIC", 0x30f},
++{"linux/hdreg.h", "HDIO_GET_ADDRESS", 0x310},
++{"linux/hdreg.h", "HDIO_GET_BUSSTATE", 0x31a},
++{"linux/hdreg.h", "HDIO_TRISTATE_HWIF", 0x31b},
++{"linux/hdreg.h", "HDIO_DRIVE_RESET", 0x31c},
++{"linux/hdreg.h", "HDIO_DRIVE_TASKFILE", 0x31d},
++{"linux/hdreg.h", "HDIO_DRIVE_TASK", 0x31e},
++{"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x31f},
++{"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x321},
++{"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x322},
++{"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x323},
++{"linux/hdreg.h", "HDIO_SET_32BIT", 0x324},
++{"linux/hdreg.h", "HDIO_SET_NOWERR", 0x325},
++{"linux/hdreg.h", "HDIO_SET_DMA", 0x326},
++{"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x327},
++{"linux/hdreg.h", "HDIO_SCAN_HWIF", 0x328},
++{"linux/hdreg.h", "HDIO_SET_NICE", 0x329},
++{"linux/hdreg.h", "HDIO_UNREGISTER_HWIF", 0x32a},
++{"linux/hdreg.h", "HDIO_SET_WCACHE", 0x32b},
++{"linux/hdreg.h", "HDIO_SET_ACOUSTIC", 0x32c},
++{"linux/hdreg.h", "HDIO_SET_BUSSTATE", 0x32d},
++{"linux/hdreg.h", "HDIO_SET_QDMA", 0x32e},
++{"linux/hdreg.h", "HDIO_SET_ADDRESS", 0x32f},
++{"linux/zorro_ids.h", "ZORRO_MANUF_CARDCO_1", 0x3ec},
++{"linux/zorro_ids.h", "ZORRO_MANUF_A_SQUARED", 0x3ed},
++{"linux/zorro_ids.h", "ZORRO_MANUF_COMSPEC_COMMUNICATIONS", 0x3ee},
++{"linux/zorro_ids.h", "ZORRO_MANUF_ANAKIN_RESEARCH", 0x3f1},
++{"linux/zorro_ids.h", "ZORRO_MANUF_MICROBOTICS", 0x3f2},
++{"linux/zorro_ids.h", "ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA", 0x3f4},
++{"linux/zorro_ids.h", "ZORRO_MANUF_EXPANSION_TECHNOLOGIES", 0x3f6},
++{"linux/zorro_ids.h", "ZORRO_MANUF_ASDG", 0x3ff},
++{"linux/apm_bios.h", "APM_DEVICE_PCMCIA", 0x600},
++{"linux/ixjuser.h", "MIXER_PORT_CD_L", 0x600},
++{"linux/in6.h", "IPV6_PRIORITY_INTERACTIVE", 0x600},
++{"linux/lp.h", "LPCHAR", 0x601},
++{"linux/lp.h", "LPTIME", 0x602},
++{"linux/lp.h", "LPABORT", 0x604},
++{"linux/lp.h", "LPSETIRQ", 0x605},
++{"linux/lp.h", "LPGETIRQ", 0x606},
++{"linux/lp.h", "LPWAIT", 0x608},
++{"linux/lp.h", "LPCAREFUL", 0x609},
++{"linux/lp.h", "LPABORTOPEN", 0x60a},
++{"linux/lp.h", "LPGETSTATUS", 0x60b},
++{"linux/lp.h", "LPRESET", 0x60c},
++{"linux/lp.h", "LPGETSTATS", 0x60d},
++{"linux/lp.h", "LPGETFLAGS", 0x60e},
++{"linux/lp.h", "LPSETTIMEOUT", 0x60f},
++{"linux/som.h", "SOM_LIB_RELOC", 0x619},
++{"linux/zorro_ids.h", "ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1", 0x6e1},
++{"linux/fs.h", "BLKROSET", 0x125d},
++{"linux/fs.h", "BLKROGET", 0x125e},
++{"linux/fs.h", "BLKRRPART", 0x125f},
++{"linux/fs.h", "BLKGETSIZE", 0x1260},
++{"linux/fs.h", "BLKFLSBUF", 0x1261},
++{"linux/fs.h", "BLKRASET", 0x1262},
++{"linux/fs.h", "BLKRAGET", 0x1263},
++{"linux/fs.h", "BLKFRASET", 0x1264},
++{"linux/fs.h", "BLKFRAGET", 0x1265},
++{"linux/fs.h", "BLKSECTSET", 0x1266},
++{"linux/fs.h", "BLKSECTGET", 0x1267},
++{"linux/fs.h", "BLKSSZGET", 0x1268},
++{"linux/blkpg.h", "BLKPG", 0x1269},
++{"linux/fs.h", "BLKTRACESTART", 0x1274},
++{"linux/fs.h", "BLKTRACESTOP", 0x1275},
++{"linux/fs.h", "BLKTRACETEARDOWN", 0x1276},
++{"linux/zorro_ids.h", "ZORRO_MANUF_APOLLO_2", 0x2200},
++{"scsi/sg.h", "SG_SET_TIMEOUT", 0x2201},
++{"scsi/sg.h", "SG_GET_TIMEOUT", 0x2202},
++{"scsi/sg.h", "SG_EMULATED_HOST", 0x2203},
++{"scsi/sg.h", "SG_SET_TRANSFORM", 0x2204},
++{"scsi/sg.h", "SG_GET_TRANSFORM", 0x2205},
++{"linux/zorro_ids.h", "ZORRO_MANUF_APOLLO_3", 0x2222},
++{"scsi/sg.h", "SG_GET_COMMAND_Q", 0x2270},
++{"scsi/sg.h", "SG_SET_COMMAND_Q", 0x2271},
++{"scsi/sg.h", "SG_GET_RESERVED_SIZE", 0x2272},
++{"scsi/sg.h", "SG_SET_RESERVED_SIZE", 0x2275},
++{"scsi/sg.h", "SG_GET_SCSI_ID", 0x2276},
++{"scsi/sg.h", "SG_SET_FORCE_LOW_DMA", 0x2279},
++{"scsi/sg.h", "SG_GET_LOW_DMA", 0x227a},
++{"scsi/sg.h", "SG_SET_FORCE_PACK_ID", 0x227b},
++{"scsi/sg.h", "SG_GET_PACK_ID", 0x227c},
++{"scsi/sg.h", "SG_GET_NUM_WAITING", 0x227d},
++{"scsi/sg.h", "SG_SET_DEBUG", 0x227e},
++{"scsi/sg.h", "SG_GET_SG_TABLESIZE", 0x227f},
++{"scsi/sg.h", "SG_GET_VERSION_NUM", 0x2282},
++{"scsi/sg.h", "SG_NEXT_CMD_LEN", 0x2283},
++{"scsi/sg.h", "SG_SCSI_RESET", 0x2284},
++{"scsi/sg.h", "SG_IO", 0x2285},
++{"scsi/sg.h", "SG_GET_REQUEST_TABLE", 0x2286},
++{"scsi/sg.h", "SG_SET_KEEP_ORPHAN", 0x2287},
++{"scsi/sg.h", "SG_GET_KEEP_ORPHAN", 0x2288},
++{"linux/apm_bios.h", "APM_IOC_STANDBY", 0x4101},
++{"linux/agpgart.h", "AGPIOC_ACQUIRE", 0x4101},
++{"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x4102},
++{"linux/agpgart.h", "AGPIOC_RELEASE", 0x4102},
++{"linux/pmu.h", "PMU_IOC_SLEEP", 0x4200},
++{"linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", 0x420a},
++{"linux/cciss_ioctl.h", "CCISS_DEREGDISK", 0x420c},
++{"linux/cciss_ioctl.h", "CCISS_REGNEWD", 0x420e},
++{"linux/cciss_ioctl.h", "CCISS_RESCANDISK", 0x4210},
++{"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600},
++{"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601},
++{"linux/ps2esdi.h", "CMD_READ", 0x4601},
++{"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602},
++{"linux/ps2esdi.h", "CMD_WRITE", 0x4602},
++{"linux/fb.h", "FBIOGETCMAP", 0x4604},
++{"linux/fb.h", "FBIOPUTCMAP", 0x4605},
++{"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606},
++{"linux/fb.h", "FBIOGET_CON2FBMAP", 0x460f},
++{"linux/fb.h", "FBIOPUT_CON2FBMAP", 0x4610},
++{"linux/fb.h", "FBIOBLANK", 0x4611},
++{"linux/fb.h", "FBIO_ALLOC", 0x4613},
++{"linux/fb.h", "FBIO_FREE", 0x4614},
++{"linux/fb.h", "FBIOGET_GLYPH", 0x4615},
++{"linux/fb.h", "FBIOGET_HWCINFO", 0x4616},
++{"linux/fb.h", "FBIOPUT_MODEINFO", 0x4617},
++{"linux/fb.h", "FBIOGET_DISPINFO", 0x4618},
++{"linux/arcfb.h", "FBIO_WAITEVENT", 0x4688},
++{"linux/hiddev.h", "HIDIOCAPPLICATION", 0x4802},
++{"linux/hiddev.h", "HIDIOCINITREPORT", 0x4805},
++{"linux/isdn.h", "IIOCNETAIF", 0x4901},
++{"linux/isdn.h", "IIOCNETDIF", 0x4902},
++{"linux/isdn.h", "IIOCNETSCF", 0x4903},
++{"linux/isdn.h", "IIOCNETGCF", 0x4904},
++{"linux/isdn.h", "IIOCNETANM", 0x4905},
++{"linux/isdn.h", "IIOCNETDNM", 0x4906},
++{"linux/isdn.h", "IIOCNETGNM", 0x4907},
++{"linux/isdn.h", "IIOCGETSET", 0x4908},
++{"linux/isdn.h", "IIOCSETSET", 0x4909},
++{"linux/isdn.h", "IIOCSETVER", 0x490a},
++{"linux/isdn.h", "IIOCNETHUP", 0x490b},
++{"linux/isdn.h", "IIOCSETGST", 0x490c},
++{"linux/isdn.h", "IIOCSETBRJ", 0x490d},
++{"linux/isdn.h", "IIOCSIGPRF", 0x490e},
++{"linux/isdn.h", "IIOCGETPRF", 0x490f},
++{"linux/isdn.h", "IIOCSETPRF", 0x4910},
++{"linux/isdn.h", "IIOCGETMAP", 0x4911},
++{"linux/isdn.h", "IIOCSETMAP", 0x4912},
++{"linux/isdn.h", "IIOCNETASL", 0x4913},
++{"linux/isdn.h", "IIOCNETDIL", 0x4914},
++{"linux/isdn.h", "IIOCGETCPS", 0x4915},
++{"linux/isdn.h", "IIOCGETDVR", 0x4916},
++{"linux/isdn.h", "IIOCNETLCR", 0x4917},
++{"linux/isdn.h", "IIOCNETDWRSET", 0x4918},
++{"linux/isdn.h", "IIOCNETALN", 0x4920},
++{"linux/isdn.h", "IIOCNETDLN", 0x4921},
++{"linux/isdn.h", "IIOCNETGPN", 0x4922},
++{"linux/isdn.h", "IIOCDBGVAR", 0x497f},
++{"linux/isdn.h", "IIOCDRVCTL", 0x4980},
++{"linux/kd.h", "KIOCSOUND", 0x4b2f},
++{"linux/kd.h", "KDMKTONE", 0x4b30},
++{"linux/kd.h", "KDGETLED", 0x4b31},
++{"linux/kd.h", "KDSETLED", 0x4b32},
++{"linux/kd.h", "KDGKBTYPE", 0x4b33},
++{"linux/kd.h", "KDADDIO", 0x4b34},
++{"linux/kd.h", "KDDELIO", 0x4b35},
++{"linux/kd.h", "KDENABIO", 0x4b36},
++{"linux/kd.h", "KDDISABIO", 0x4b37},
++{"linux/kd.h", "KDSETMODE", 0x4b3a},
++{"linux/kd.h", "KDGETMODE", 0x4b3b},
++{"linux/kd.h", "KDMAPDISP", 0x4b3c},
++{"linux/kd.h", "KDUNMAPDISP", 0x4b3d},
++{"linux/kd.h", "GIO_SCRNMAP", 0x4b40},
++{"linux/kd.h", "PIO_SCRNMAP", 0x4b41},
++{"linux/kd.h", "KDGKBMODE", 0x4b44},
++{"linux/kd.h", "KDSKBMODE", 0x4b45},
++{"linux/kd.h", "KDGKBENT", 0x4b46},
++{"linux/kd.h", "KDSKBENT", 0x4b47},
++{"linux/kd.h", "KDGKBSENT", 0x4b48},
++{"linux/kd.h", "KDSKBSENT", 0x4b49},
++{"linux/kd.h", "KDGKBDIACR", 0x4b4a},
++{"linux/kd.h", "KDSKBDIACR", 0x4b4b},
++{"linux/kd.h", "KDGETKEYCODE", 0x4b4c},
++{"linux/kd.h", "KDSETKEYCODE", 0x4b4d},
++{"linux/kd.h", "KDSIGACCEPT", 0x4b4e},
++{"linux/kd.h", "KDKBDREP", 0x4b52},
++{"linux/kd.h", "GIO_FONT", 0x4b60},
++{"linux/kd.h", "PIO_FONT", 0x4b61},
++{"linux/kd.h", "KDGKBMETA", 0x4b62},
++{"linux/kd.h", "KDSKBMETA", 0x4b63},
++{"linux/kd.h", "KDGKBLED", 0x4b64},
++{"linux/kd.h", "KDSKBLED", 0x4b65},
++{"linux/kd.h", "GIO_UNIMAP", 0x4b66},
++{"linux/kd.h", "PIO_UNIMAP", 0x4b67},
++{"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68},
++{"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69},
++{"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a},
++{"linux/kd.h", "GIO_FONTX", 0x4b6b},
++{"linux/kd.h", "PIO_FONTX", 0x4b6c},
++{"linux/kd.h", "PIO_FONTRESET", 0x4b6d},
++{"linux/kd.h", "GIO_CMAP", 0x4b70},
++{"linux/kd.h", "PIO_CMAP", 0x4b71},
++{"linux/kd.h", "KDFONTOP", 0x4b72},
++{"linux/loop.h", "LOOP_SET_FD", 0x4c00},
++{"linux/loop.h", "LOOP_CLR_FD", 0x4c01},
++{"linux/loop.h", "LOOP_SET_STATUS", 0x4c02},
++{"linux/loop.h", "LOOP_GET_STATUS", 0x4c03},
++{"linux/loop.h", "LOOP_SET_STATUS64", 0x4c04},
++{"linux/loop.h", "LOOP_GET_STATUS64", 0x4c05},
++{"linux/loop.h", "LOOP_CHANGE_FD", 0x4c06},
++{"mtd/mtd-abi.h", "MTDFILEMODE", 0x4d13},
++{"linux/random.h", "RNDZAPENTCNT", 0x5204},
++{"linux/random.h", "RNDCLEARPOOL", 0x5206},
++{"linux/cdrom.h", "CDROMPAUSE", 0x5301},
++{"linux/n_r3964.h", "R3964_ENABLE_SIGNALS", 0x5301},
++{"linux/n_r3964.h", "R3964_SETPRIORITY", 0x5302},
++{"linux/cdrom.h", "CDROMRESUME", 0x5302},
++{"linux/n_r3964.h", "R3964_USE_BCC", 0x5303},
++{"linux/cdrom.h", "CDROMPLAYMSF", 0x5303},
++{"linux/n_r3964.h", "R3964_READ_TELEGRAM", 0x5304},
++{"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304},
++{"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305},
++{"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306},
++{"linux/cdrom.h", "CDROMSTOP", 0x5307},
++{"linux/cdrom.h", "CDROMSTART", 0x5308},
++{"linux/cdrom.h", "CDROMEJECT", 0x5309},
++{"linux/cdrom.h", "CDROMVOLCTRL", 0x530a},
++{"linux/cdrom.h", "CDROMSUBCHNL", 0x530b},
++{"linux/cdrom.h", "CDROMREADMODE2", 0x530c},
++{"linux/cdrom.h", "CDROMREADMODE1", 0x530d},
++{"linux/cdrom.h", "CDROMREADAUDIO", 0x530e},
++{"linux/cdrom.h", "CDROMEJECT_SW", 0x530f},
++{"linux/cdrom.h", "CDROMMULTISESSION", 0x5310},
++{"linux/cdrom.h", "CDROM_GET_MCN", 0x5311},
++{"linux/cdrom.h", "CDROMRESET", 0x5312},
++{"linux/cdrom.h", "CDROMVOLREAD", 0x5313},
++{"linux/cdrom.h", "CDROMREADRAW", 0x5314},
++{"linux/cdrom.h", "CDROMREADCOOKED", 0x5315},
++{"linux/cdrom.h", "CDROMSEEK", 0x5316},
++{"linux/cdrom.h", "CDROMPLAYBLK", 0x5317},
++{"linux/cdrom.h", "CDROMREADALL", 0x5318},
++{"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319},
++{"linux/cdrom.h", "CDROMGETSPINDOWN", 0x531d},
++{"linux/cdrom.h", "CDROMSETSPINDOWN", 0x531e},
++{"linux/cdrom.h", "CDROM_SET_OPTIONS", 0x5320},
++{"linux/cdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321},
++{"linux/cdrom.h", "CDROM_SELECT_SPEED", 0x5322},
++{"linux/cdrom.h", "CDROM_SELECT_DISC", 0x5323},
++{"linux/cdrom.h", "CDROM_MEDIA_CHANGED", 0x5325},
++{"linux/cdrom.h", "CDROM_DRIVE_STATUS", 0x5326},
++{"linux/cdrom.h", "CDROM_DISC_STATUS", 0x5327},
++{"linux/cdrom.h", "CDROM_CHANGER_NSLOTS", 0x5328},
++{"linux/cdrom.h", "CDROM_LOCKDOOR", 0x5329},
++{"linux/cdrom.h", "CDROM_DEBUG", 0x5330},
++{"linux/cdrom.h", "CDROM_GET_CAPABILITY", 0x5331},
++{"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORLOCK", 0x5380},
++{"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORUNLOCK", 0x5381},
++{"linux/cdrom.h", "CDROMAUDIOBUFSIZ", 0x5382},
++{"scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0x5382},
++{"scsi/scsi.h", "SCSI_IOCTL_TAGGED_ENABLE", 0x5383},
++{"scsi/scsi.h", "SCSI_IOCTL_TAGGED_DISABLE", 0x5384},
++{"scsi/scsi.h", "SCSI_IOCTL_PROBE_HOST", 0x5385},
++{"scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0x5386},
++{"linux/cdrom.h", "DVD_READ_STRUCT", 0x5390},
++{"linux/cdrom.h", "DVD_WRITE_STRUCT", 0x5391},
++{"linux/cdrom.h", "DVD_AUTH", 0x5392},
++{"linux/cdrom.h", "CDROM_SEND_PACKET", 0x5393},
++{"linux/cdrom.h", "CDROM_NEXT_WRITABLE", 0x5394},
++{"linux/cdrom.h", "CDROM_LAST_WRITTEN", 0x5395},
++{"asm/ioctls.h", "TCGETS", 0x5401},
++{"asm/ioctls.h", "TCSETS", 0x5402},
++{"asm/ioctls.h", "TCSETSW", 0x5403},
++{"asm/ioctls.h", "TCSETSF", 0x5404},
++{"asm/ioctls.h", "TCGETA", 0x5405},
++{"asm/ioctls.h", "TCSETA", 0x5406},
++{"asm/ioctls.h", "TCSETAW", 0x5407},
++{"asm/ioctls.h", "TCSETAF", 0x5408},
++{"asm/ioctls.h", "TCSBRK", 0x5409},
++{"asm/ioctls.h", "TCXONC", 0x540a},
++{"asm/ioctls.h", "TCFLSH", 0x540b},
++{"asm/ioctls.h", "TIOCEXCL", 0x540c},
++{"asm/ioctls.h", "TIOCNXCL", 0x540d},
++{"asm/ioctls.h", "TIOCSCTTY", 0x540e},
++{"asm/ioctls.h", "TIOCGPGRP", 0x540f},
++{"asm/ioctls.h", "TIOCSPGRP", 0x5410},
++{"asm/ioctls.h", "TIOCOUTQ", 0x5411},
++{"asm/ioctls.h", "TIOCSTI", 0x5412},
++{"asm/ioctls.h", "TIOCGWINSZ", 0x5413},
++{"asm/ioctls.h", "TIOCSWINSZ", 0x5414},
++{"asm/ioctls.h", "TIOCMGET", 0x5415},
++{"asm/ioctls.h", "TIOCMBIS", 0x5416},
++{"asm/ioctls.h", "TIOCMBIC", 0x5417},
++{"asm/ioctls.h", "TIOCMSET", 0x5418},
++{"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419},
++{"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a},
++{"asm/ioctls.h", "FIONREAD", 0x541b},
++{"asm/ioctls.h", "TIOCLINUX", 0x541c},
++{"asm/ioctls.h", "TIOCCONS", 0x541d},
++{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
++{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
++{"asm/ioctls.h", "TIOCPKT", 0x5420},
++{"asm/ioctls.h", "FIONBIO", 0x5421},
++{"asm/ioctls.h", "TIOCNOTTY", 0x5422},
++{"asm/ioctls.h", "TIOCSETD", 0x5423},
++{"asm/ioctls.h", "TIOCGETD", 0x5424},
++{"asm/ioctls.h", "TCSBRKP", 0x5425},
++{"asm/ioctls.h", "TIOCSBRK", 0x5427},
++{"asm/ioctls.h", "TIOCCBRK", 0x5428},
++{"asm/ioctls.h", "TIOCGSID", 0x5429},
++{"asm/ioctls.h", "FIONCLEX", 0x5450},
++{"asm/ioctls.h", "FIOCLEX", 0x5451},
++{"asm/ioctls.h", "FIOASYNC", 0x5452},
++{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
++{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
++{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
++{"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
++{"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
++{"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
++{"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
++{"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
++{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
++{"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
++{"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
++{"asm/ioctls.h", "TIOCGHAYESESP", 0x545e},
++{"asm/ioctls.h", "TIOCSHAYESESP", 0x545f},
++{"asm/ioctls.h", "FIOQSIZE", 0x5460},
++{"linux/uinput.h", "UI_DEV_CREATE", 0x5501},
++{"linux/uinput.h", "UI_DEV_DESTROY", 0x5502},
++{"linux/vt.h", "VT_OPENQRY", 0x5600},
++{"linux/vt.h", "VT_GETMODE", 0x5601},
++{"linux/videodev2.h", "VIDIOC_RESERVED", 0x5601},
++{"linux/vt.h", "VT_SETMODE", 0x5602},
++{"linux/vt.h", "VT_GETSTATE", 0x5603},
++{"linux/vt.h", "VT_SENDSIG", 0x5604},
++{"linux/vt.h", "VT_RELDISP", 0x5605},
++{"linux/vt.h", "VT_ACTIVATE", 0x5606},
++{"linux/vt.h", "VT_WAITACTIVE", 0x5607},
++{"linux/vt.h", "VT_DISALLOCATE", 0x5608},
++{"linux/vt.h", "VT_RESIZE", 0x5609},
++{"linux/vt.h", "VT_RESIZEX", 0x560a},
++{"linux/vt.h", "VT_LOCKSWITCH", 0x560b},
++{"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c},
++{"linux/vt.h", "VT_GETHIFONTMASK", 0x560d},
++{"linux/videodev2.h", "VIDIOC_LOG_STATUS", 0x5646},
++{"linux/sonet.h", "SONET_SETFRAMING", 0x6115},
++{"linux/atm_nicstar.h", "NS_ADJBUFLEV", 0x6163},
++{"linux/atm_tcp.h", "SIOCSIFATMTCP", 0x6180},
++{"linux/atm_tcp.h", "ATMTCP_CREATE", 0x618e},
++{"linux/atm_tcp.h", "ATMTCP_REMOVE", 0x618f},
++{"linux/atmlec.h", "ATMLEC_CTRL", 0x61d0},
++{"linux/atmlec.h", "ATMLEC_DATA", 0x61d1},
++{"linux/atmlec.h", "ATMLEC_MCAST", 0x61d2},
++{"linux/atmmpc.h", "ATMMPC_CTRL", 0x61d8},
++{"linux/atmmpc.h", "ATMMPC_DATA", 0x61d9},
++{"linux/atmclip.h", "SIOCMKCLIP", 0x61e0},
++{"linux/atmarp.h", "ATMARPD_CTRL", 0x61e1},
++{"linux/atmarp.h", "ATMARP_MKIP", 0x61e2},
++{"linux/atmarp.h", "ATMARP_SETENTRY", 0x61e3},
++{"linux/atmarp.h", "ATMARP_ENCAP", 0x61e5},
++{"linux/atmsvc.h", "ATMSIGD_CTRL", 0x61f0},
++{"linux/cm4000_cs.h", "CM_IOCSRDR", 0x6303},
++{"linux/cm4000_cs.h", "CM_IOCARDOFF", 0x6304},
++{"linux/chio.h", "CHIOINITELEM", 0x6311},
++{"linux/comstats.h", "COM_GETPORTSTATS", 0x631e},
++{"linux/comstats.h", "COM_CLRPORTSTATS", 0x631f},
++{"linux/comstats.h", "COM_GETBRDSTATS", 0x6320},
++{"linux/comstats.h", "COM_READPORT", 0x6328},
++{"linux/comstats.h", "COM_READBOARD", 0x6329},
++{"linux/comstats.h", "COM_READPANEL", 0x632a},
++{"linux/video_decoder.h", "DECODER_DUMP", 0x64c0},
++{"linux/hpet.h", "HPET_IE_ON", 0x6801},
++{"linux/hpet.h", "HPET_IE_OFF", 0x6802},
++{"linux/hpet.h", "HPET_EPI", 0x6804},
++{"linux/hpet.h", "HPET_DPI", 0x6805},
++{"linux/mmtimer.h", "MMTIMER_GETOFFSET", 0x6d00},
++{"linux/synclink.h", "MGSL_IOCSTXIDLE", 0x6d02},
++{"linux/synclink.h", "MGSL_IOCGTXIDLE", 0x6d03},
++{"linux/synclink.h", "MGSL_IOCTXENABLE", 0x6d04},
++{"linux/mmtimer.h", "MMTIMER_GETBITS", 0x6d04},
++{"linux/synclink.h", "MGSL_IOCRXENABLE", 0x6d05},
++{"linux/mmtimer.h", "MMTIMER_MMAPAVAIL", 0x6d06},
++{"linux/synclink.h", "MGSL_IOCTXABORT", 0x6d06},
++{"linux/synclink.h", "MGSL_IOCGSTATS", 0x6d07},
++{"linux/synclink.h", "MGSL_IOCLOOPTXDONE", 0x6d09},
++{"linux/synclink.h", "MGSL_IOCSIF", 0x6d0a},
++{"linux/synclink.h", "MGSL_IOCGIF", 0x6d0b},
++{"linux/synclink.h", "MGSL_IOCCLRMODCOUNT", 0x6d0f},
++{"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x6e03},
++{"linux/rtc.h", "RTC_AIE_ON", 0x7001},
++{"linux/rtc.h", "RTC_AIE_OFF", 0x7002},
++{"linux/rtc.h", "RTC_UIE_ON", 0x7003},
++{"linux/rtc.h", "RTC_UIE_OFF", 0x7004},
++{"linux/rtc.h", "RTC_PIE_ON", 0x7005},
++{"linux/rtc.h", "RTC_PIE_OFF", 0x7006},
++{"linux/rtc.h", "RTC_WIE_ON", 0x700f},
++{"linux/rtc.h", "RTC_WIE_OFF", 0x7010},
++{"linux/nvram.h", "NVRAM_INIT", 0x7040},
++{"linux/nvram.h", "NVRAM_SETCKS", 0x7041},
++{"linux/ppdev.h", "PPCLAIM", 0x708b},
++{"linux/ppdev.h", "PPRELEASE", 0x708c},
++{"linux/ppdev.h", "PPYIELD", 0x708d},
++{"linux/ppdev.h", "PPEXCL", 0x708f},
++{"linux/telephony.h", "PHONE_CAPABILITIES", 0x7180},
++{"linux/telephony.h", "PHONE_RING", 0x7183},
++{"linux/telephony.h", "PHONE_HOOKSTATE", 0x7184},
++{"linux/telephony.h", "OLD_PHONE_RING_START", 0x7187},
++{"linux/telephony.h", "PHONE_RING_STOP", 0x7188},
++{"linux/telephony.h", "PHONE_REC_START", 0x718a},
++{"linux/telephony.h", "PHONE_REC_STOP", 0x718b},
++{"linux/telephony.h", "PHONE_REC_LEVEL", 0x718f},
++{"linux/telephony.h", "PHONE_PLAY_START", 0x7191},
++{"linux/telephony.h", "PHONE_PLAY_STOP", 0x7192},
++{"linux/telephony.h", "PHONE_PLAY_LEVEL", 0x7195},
++{"linux/telephony.h", "PHONE_GET_TONE_ON_TIME", 0x719e},
++{"linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", 0x719f},
++{"linux/telephony.h", "PHONE_GET_TONE_STATE", 0x71a0},
++{"linux/telephony.h", "PHONE_BUSY", 0x71a1},
++{"linux/telephony.h", "PHONE_RINGBACK", 0x71a2},
++{"linux/telephony.h", "PHONE_DIALTONE", 0x71a3},
++{"linux/telephony.h", "PHONE_CPT_STOP", 0x71a4},
++{"linux/telephony.h", "PHONE_PSTN_GET_STATE", 0x71a5},
++{"linux/telephony.h", "PHONE_PSTN_LINETEST", 0x71a8},
++{"linux/ixjuser.h", "IXJCTL_DSP_RESET", 0x71c0},
++{"linux/ixjuser.h", "IXJCTL_DSP_IDLE", 0x71c5},
++{"linux/ixjuser.h", "IXJCTL_TESTRAM", 0x71c6},
++{"linux/ixjuser.h", "IXJCTL_AEC_STOP", 0x71cc},
++{"linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", 0x71cd},
++{"linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", 0x71d3},
++{"linux/ixjuser.h", "IXJCTL_PLAY_CID", 0x71d7},
++{"linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", 0x71e7},
++{"linux/cdk.h", "STL_BINTR", 0x7314},
++{"linux/cdk.h", "STL_BSTART", 0x7315},
++{"linux/cdk.h", "STL_BSTOP", 0x7316},
++{"linux/cdk.h", "STL_BRESET", 0x7317},
++{"linux/cdk.h", "STL_GETPFLAG", 0x7350},
++{"linux/cdk.h", "STL_SETPFLAG", 0x7351},
++{"linux/if_ppp.h", "PPPIOCDISCONN", 0x7439},
++{"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x744e},
++{"linux/meye.h", "MEYEIOC_STILLCAPT", 0x76c4},
++{"linux/videotext.h", "VTXIOCPUTPAGE", 0x8108},
++{"linux/videotext.h", "VTXIOCSETDISP", 0x8109},
++{"linux/videotext.h", "VTXIOCPUTSTAT", 0x810a},
++{"linux/videotext.h", "VTXIOCCLRCACHE", 0x810b},
++{"asm/sockios.h", "FIOSETOWN", 0x8901},
++{"asm/sockios.h", "SIOCSPGRP", 0x8902},
++{"asm/sockios.h", "FIOGETOWN", 0x8903},
++{"asm/sockios.h", "SIOCGPGRP", 0x8904},
++{"asm/sockios.h", "SIOCATMARK", 0x8905},
++{"asm/sockios.h", "SIOCGSTAMP", 0x8906},
++{"linux/sockios.h", "SIOCADDRT", 0x890b},
++{"linux/sockios.h", "SIOCDELRT", 0x890c},
++{"linux/sockios.h", "SIOCRTMSG", 0x890d},
++{"linux/sockios.h", "SIOCGIFNAME", 0x8910},
++{"linux/sockios.h", "SIOCSIFLINK", 0x8911},
++{"linux/sockios.h", "SIOCGIFCONF", 0x8912},
++{"linux/sockios.h", "SIOCGIFFLAGS", 0x8913},
++{"linux/sockios.h", "SIOCSIFFLAGS", 0x8914},
++{"linux/sockios.h", "SIOCGIFADDR", 0x8915},
++{"linux/sockios.h", "SIOCSIFADDR", 0x8916},
++{"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917},
++{"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918},
++{"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919},
++{"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a},
++{"linux/sockios.h", "SIOCGIFNETMASK", 0x891b},
++{"linux/sockios.h", "SIOCSIFNETMASK", 0x891c},
++{"linux/sockios.h", "SIOCGIFMETRIC", 0x891d},
++{"linux/sockios.h", "SIOCSIFMETRIC", 0x891e},
++{"linux/sockios.h", "SIOCGIFMEM", 0x891f},
++{"linux/sockios.h", "SIOCSIFMEM", 0x8920},
++{"linux/sockios.h", "SIOCGIFMTU", 0x8921},
++{"linux/sockios.h", "SIOCSIFMTU", 0x8922},
++{"linux/sockios.h", "SIOCSIFNAME", 0x8923},
++{"linux/sockios.h", "SIOCSIFHWADDR", 0x8924},
++{"linux/sockios.h", "SIOCGIFENCAP", 0x8925},
++{"linux/sockios.h", "SIOCSIFENCAP", 0x8926},
++{"linux/sockios.h", "SIOCGIFHWADDR", 0x8927},
++{"linux/sockios.h", "SIOCGIFSLAVE", 0x8929},
++{"linux/sockios.h", "SIOCSIFSLAVE", 0x8930},
++{"linux/sockios.h", "SIOCADDMULTI", 0x8931},
++{"linux/sockios.h", "SIOCDELMULTI", 0x8932},
++{"linux/sockios.h", "SIOCGIFINDEX", 0x8933},
++{"linux/sockios.h", "SIOCSIFPFLAGS", 0x8934},
++{"linux/sockios.h", "SIOCGIFPFLAGS", 0x8935},
++{"linux/sockios.h", "SIOCDIFADDR", 0x8936},
++{"linux/sockios.h", "SIOCSIFHWBROADCAST", 0x8937},
++{"linux/sockios.h", "SIOCGIFCOUNT", 0x8938},
++{"linux/sockios.h", "SIOCGIFBR", 0x8940},
++{"linux/sockios.h", "SIOCSIFBR", 0x8941},
++{"linux/sockios.h", "SIOCGIFTXQLEN", 0x8942},
++{"linux/sockios.h", "SIOCSIFTXQLEN", 0x8943},
++{"linux/sockios.h", "SIOCGIFDIVERT", 0x8944},
++{"linux/sockios.h", "SIOCSIFDIVERT", 0x8945},
++{"linux/sockios.h", "SIOCETHTOOL", 0x8946},
++{"linux/sockios.h", "SIOCGMIIPHY", 0x8947},
++{"linux/sockios.h", "SIOCGMIIREG", 0x8948},
++{"linux/sockios.h", "SIOCSMIIREG", 0x8949},
++{"linux/sockios.h", "SIOCWANDEV", 0x894a},
++{"linux/sockios.h", "SIOCDARP", 0x8953},
++{"linux/sockios.h", "SIOCGARP", 0x8954},
++{"linux/sockios.h", "SIOCSARP", 0x8955},
++{"linux/sockios.h", "SIOCDRARP", 0x8960},
++{"linux/sockios.h", "SIOCGRARP", 0x8961},
++{"linux/sockios.h", "SIOCSRARP", 0x8962},
++{"linux/sockios.h", "SIOCGIFMAP", 0x8970},
++{"linux/sockios.h", "SIOCSIFMAP", 0x8971},
++{"linux/sockios.h", "SIOCADDDLCI", 0x8980},
++{"linux/sockios.h", "SIOCDELDLCI", 0x8981},
++{"linux/sockios.h", "SIOCGIFVLAN", 0x8982},
++{"linux/sockios.h", "SIOCSIFVLAN", 0x8983},
++{"linux/sockios.h", "SIOCBONDENSLAVE", 0x8990},
++{"linux/sockios.h", "SIOCBONDRELEASE", 0x8991},
++{"linux/sockios.h", "SIOCBONDSETHWADDR", 0x8992},
++{"linux/sockios.h", "SIOCBONDSLAVEINFOQUERY", 0x8993},
++{"linux/sockios.h", "SIOCBONDINFOQUERY", 0x8994},
++{"linux/sockios.h", "SIOCBONDCHANGEACTIVE", 0x8995},
++{"linux/sockios.h", "SIOCBRADDBR", 0x89a0},
++{"linux/sockios.h", "SIOCBRDELBR", 0x89a1},
++{"linux/sockios.h", "SIOCBRADDIF", 0x89a2},
++{"linux/sockios.h", "SIOCBRDELIF", 0x89a3},
++{"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0},
++{"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0},
++{"linux/auto_fs.h", "AUTOFS_IOC_READY", 0x9360},
++{"linux/auto_fs.h", "AUTOFS_IOC_FAIL", 0x9361},
++{"linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", 0x9362},
++{"linux/nbd.h", "NBD_SET_SOCK", 0xab00},
++{"linux/nbd.h", "NBD_SET_BLKSIZE", 0xab01},
++{"linux/nbd.h", "NBD_SET_SIZE", 0xab02},
++{"linux/nbd.h", "NBD_DO_IT", 0xab03},
++{"linux/nbd.h", "NBD_CLEAR_SOCK", 0xab04},
++{"linux/nbd.h", "NBD_CLEAR_QUE", 0xab05},
++{"linux/nbd.h", "NBD_PRINT_DEBUG", 0xab06},
++{"linux/nbd.h", "NBD_SET_SIZE_BLOCKS", 0xab07},
++{"linux/nbd.h", "NBD_DISCONNECT", 0xab08},
++{"linux/raw.h", "RAW_SETBIND", 0xac00},
++{"linux/raw.h", "RAW_GETBIND", 0xac01},
++{"linux/if_pppox.h", "PPPOEIOCDFWD", 0xb101},
++{"linux/cyclades.h", "CYGETMON", 0x435901},
++{"linux/cyclades.h", "CYGETTHRESH", 0x435902},
++{"linux/cyclades.h", "CYSETTHRESH", 0x435903},
++{"linux/cyclades.h", "CYGETDEFTHRESH", 0x435904},
++{"linux/cyclades.h", "CYSETDEFTHRESH", 0x435905},
++{"linux/cyclades.h", "CYGETTIMEOUT", 0x435906},
++{"linux/cyclades.h", "CYSETTIMEOUT", 0x435907},
++{"linux/cyclades.h", "CYGETDEFTIMEOUT", 0x435908},
++{"linux/cyclades.h", "CYSETDEFTIMEOUT", 0x435909},
++{"linux/cyclades.h", "CYSETRFLOW", 0x43590a},
++{"linux/cyclades.h", "CYGETRFLOW", 0x43590b},
++{"linux/cyclades.h", "CYSETRTSDTR_INV", 0x43590c},
++{"linux/cyclades.h", "CYGETRTSDTR_INV", 0x43590d},
++{"linux/cyclades.h", "CYZSETPOLLCYCLE", 0x43590e},
++{"linux/cyclades.h", "CYZGETPOLLCYCLE", 0x43590f},
++{"linux/cyclades.h", "CYGETCD1400VER", 0x435910},
++{"linux/cyclades.h", "CYGETCARDINFO", 0x435911},
++{"linux/cyclades.h", "CYSETWAIT", 0x435912},
++{"linux/cyclades.h", "CYGETWAIT", 0x435913},
++{"linux/videodev2.h", "VIDIOC_S_PRIORITY", 0x40015644},
++{"linux/ppdev.h", "PPWCONTROL", 0x40017084},
++{"linux/ppdev.h", "PPWDATA", 0x40017086},
++{"linux/ppdev.h", "PPWCTLONIRQ", 0x40017092},
++{"linux/telephony.h", "PHONE_MAXRINGS", 0x40017185},
++{"linux/telephony.h", "PHONE_PLAY_TONE", 0x4001719b},
++{"linux/sonypi.h", "SONYPI_IOCSBRT", 0x40017600},
++{"linux/sonypi.h", "SONYPI_IOCSBLUE", 0x40017609},
++{"linux/sonypi.h", "SONYPI_IOCSFAN", 0x4001760b},
++{"linux/atmdev.h", "ATM_SETBACKEND", 0x400261f2},
++{"linux/atmdev.h", "ATM_NEWBACKENDIF", 0x400261f3},
++{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x40026e02},
++{"linux/ppdev.h", "PPFCONTROL", 0x4002708e},
++{"linux/telephony.h", "PHONE_RING_CADENCE", 0x40027186},
++{"linux/fs.h", "BLKBSZSET", 0x40041271},
++{"linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", 0x40044004},
++{"linux/agpgart.h", "AGPIOC_SETUP", 0x40044103},
++{"linux/agpgart.h", "AGPIOC_RESERVE", 0x40044104},
++{"linux/agpgart.h", "AGPIOC_PROTECT", 0x40044105},
++{"linux/agpgart.h", "AGPIOC_DEALLOCATE", 0x40044107},
++{"linux/agpgart.h", "AGPIOC_BIND", 0x40044108},
++{"linux/agpgart.h", "AGPIOC_UNBIND", 0x40044109},
++{"linux/pmu.h", "PMU_IOC_SET_BACKLIGHT", 0x40044202},
++{"linux/cciss_ioctl.h", "CCISS_REGNEWDISK", 0x4004420d},
++{"linux/input.h", "EVIOCRMFF", 0x40044581},
++{"linux/input.h", "EVIOCGRAB", 0x40044590},
++{"linux/matroxfb.h", "FBIO_WAITFORVSYNC", 0x40044620},
++{"linux/hiddev.h", "HIDIOCSFLAG", 0x4004480f},
++{"mtd/mtd-abi.h", "OTPGETREGIONCOUNT", 0x40044d0e},
++{"linux/ticable.h", "IOCTL_TIUSB_TIMEOUT", 0x40044e20},
++{"linux/ticable.h", "IOCTL_TIUSB_RESET_DEVICE", 0x40044e21},
++{"linux/ticable.h", "IOCTL_TIUSB_RESET_PIPES", 0x40044e22},
++{"linux/random.h", "RNDADDTOENTCNT", 0x40045201},
++{"asm/ioctls.h", "TIOCSPTLCK", 0x40045431},
++{"linux/if_tun.h", "TUNSETNOCSUM", 0x400454c8},
++{"linux/if_tun.h", "TUNSETDEBUG", 0x400454c9},
++{"linux/if_tun.h", "TUNSETIFF", 0x400454ca},
++{"linux/if_tun.h", "TUNSETPERSIST", 0x400454cb},
++{"linux/if_tun.h", "TUNSETOWNER", 0x400454cc},
++{"linux/if_tun.h", "TUNSETLINK", 0x400454cd},
++{"linux/uinput.h", "UI_SET_EVBIT", 0x40045564},
++{"linux/uinput.h", "UI_SET_KEYBIT", 0x40045565},
++{"linux/uinput.h", "UI_SET_RELBIT", 0x40045566},
++{"linux/uinput.h", "UI_SET_ABSBIT", 0x40045567},
++{"linux/uinput.h", "UI_SET_MSCBIT", 0x40045568},
++{"linux/uinput.h", "UI_SET_LEDBIT", 0x40045569},
++{"linux/uinput.h", "UI_SET_SNDBIT", 0x4004556a},
++{"linux/uinput.h", "UI_SET_FFBIT", 0x4004556b},
++{"linux/uinput.h", "UI_SET_PHYS", 0x4004556c},
++{"linux/uinput.h", "UI_SET_SWBIT", 0x4004556d},
++{"linux/videodev2.h", "VIDIOC_OVERLAY", 0x4004560e},
++{"linux/videodev2.h", "VIDIOC_STREAMON", 0x40045612},
++{"linux/videodev2.h", "VIDIOC_STREAMOFF", 0x40045613},
++{"linux/atmdev.h", "ATM_SETSC", 0x400461f1},
++{"linux/atmdev.h", "ATM_DROPPARTY", 0x400461f5},
++{"linux/cm4000_cs.h", "CM_IOCSPTS", 0x40046302},
++{"linux/chio.h", "CHIOSPICKER", 0x40046305},
++{"linux/cm4000_cs.h", "CM_IOSDBGLVL", 0x400463fa},
++{"linux/video_decoder.h", "DECODER_SET_NORM", 0x40046403},
++{"linux/video_decoder.h", "DECODER_SET_INPUT", 0x40046404},
++{"linux/video_decoder.h", "DECODER_SET_OUTPUT", 0x40046405},
++{"linux/video_decoder.h", "DECODER_ENABLE_OUTPUT", 0x40046406},
++{"linux/video_decoder.h", "DECODER_SET_GPIO", 0x40046408},
++{"linux/video_decoder.h", "DECODER_SET_VBI_BYPASS", 0x4004640a},
++{"linux/video_encoder.h", "ENCODER_SET_NORM", 0x40046502},
++{"linux/video_encoder.h", "ENCODER_SET_INPUT", 0x40046503},
++{"linux/video_encoder.h", "ENCODER_SET_OUTPUT", 0x40046504},
++{"linux/video_encoder.h", "ENCODER_ENABLE_OUTPUT", 0x40046505},
++{"linux/ext3_fs.h", "EXT3_IOC_SETFLAGS", 0x40046602},
++{"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x40046602},
++{"linux/iflags.h", "IFLAGS_SET_IOC", 0x40046602},
++{"linux/ext3_fs.h", "EXT3_IOC_SETVERSION", 0x40046604},
++{"linux/ext3_fs.h", "EXT3_IOC_SETRSVSZ", 0x40046606},
++{"linux/ext3_fs.h", "EXT3_IOC_GROUP_EXTEND", 0x40046607},
++{"linux/hpet.h", "HPET_IRQFREQ", 0x40046806},
++{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID2", 0x40046e02},
++{"linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", 0x40046e06},
++{"linux/ncp_fs.h", "NCP_IOC_GETDENTRYTTL", 0x40046e0c},
++{"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_CONNECTION", 0x40046ef8},
++{"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_MODE", 0x40046efa},
++{"linux/rtc.h", "RTC_IRQP_SET", 0x4004700c},
++{"linux/rtc.h", "RTC_EPOCH_SET", 0x4004700e},
++{"linux/ppdev.h", "PPSETMODE", 0x40047080},
++{"linux/ppdev.h", "PPDATADIR", 0x40047090},
++{"linux/ppdev.h", "PPNEGOT", 0x40047091},
++{"linux/ppdev.h", "PPSETPHASE", 0x40047094},
++{"linux/ppdev.h", "PPSETFLAGS", 0x4004709b},
++{"linux/ticable.h", "IOCTL_TISER_DELAY", 0x400470a0},
++{"linux/ticable.h", "IOCTL_TISER_TIMEOUT", 0x400470a1},
++{"linux/ticable.h", "IOCTL_TIPAR_DELAY", 0x400470a8},
++{"linux/ticable.h", "IOCTL_TIPAR_TIMEOUT", 0x400470a9},
++{"linux/serio.h", "SPIOCSTYPE", 0x40047101},
++{"linux/telephony.h", "PHONE_CAPABILITIES_CHECK", 0x40047182},
++{"linux/telephony.h", "PHONE_RING_START", 0x40047187},
++{"linux/telephony.h", "PHONE_REC_CODEC", 0x40047189},
++{"linux/telephony.h", "PHONE_REC_DEPTH", 0x4004718c},
++{"linux/telephony.h", "PHONE_FRAME", 0x4004718d},
++{"linux/telephony.h", "PHONE_REC_VOLUME", 0x4004718e},
++{"linux/telephony.h", "PHONE_PLAY_CODEC", 0x40047190},
++{"linux/telephony.h", "PHONE_PLAY_DEPTH", 0x40047193},
++{"linux/telephony.h", "PHONE_PLAY_VOLUME", 0x40047194},
++{"linux/telephony.h", "PHONE_DTMF_OOB", 0x40047199},
++{"linux/telephony.h", "PHONE_SET_TONE_ON_TIME", 0x4004719c},
++{"linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", 0x4004719d},
++{"linux/telephony.h", "PHONE_PSTN_SET_STATE", 0x400471a4},
++{"linux/telephony.h", "PHONE_WINK_DURATION", 0x400471a6},
++{"linux/telephony.h", "PHONE_VAD", 0x400471a9},
++{"linux/telephony.h", "PHONE_WINK", 0x400471aa},
++{"linux/ixjuser.h", "IXJCTL_SET_FILTER", 0x400471c7},
++{"linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", 0x400471c8},
++{"linux/ixjuser.h", "IXJCTL_INIT_TONE", 0x400471c9},
++{"linux/ixjuser.h", "IXJCTL_TONE_CADENCE", 0x400471ca},
++{"linux/ixjuser.h", "IXJCTL_AEC_START", 0x400471cb},
++{"linux/ixjuser.h", "IXJCTL_SET_LED", 0x400471ce},
++{"linux/ixjuser.h", "IXJCTL_MIXER", 0x400471cf},
++{"linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", 0x400471d0},
++{"linux/ixjuser.h", "IXJCTL_PORT", 0x400471d1},
++{"linux/ixjuser.h", "IXJCTL_DAA_AGAIN", 0x400471d2},
++{"linux/ixjuser.h", "IXJCTL_POTS_PSTN", 0x400471d5},
++{"linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", 0x400471d6},
++{"linux/ixjuser.h", "IXJCTL_CIDCW", 0x400471d9},
++{"linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", 0x400471db},
++{"linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", 0x400471dc},
++{"linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", 0x400471dd},
++{"linux/ixjuser.h", "IXJCTL_HZ", 0x400471e0},
++{"linux/ixjuser.h", "IXJCTL_RATE", 0x400471e1},
++{"linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", 0x400471e8},
++{"linux/ixjuser.h", "IXJCTL_SIGCTL", 0x400471e9},
++{"linux/ixjuser.h", "IXJCTL_SC_RXG", 0x400471ea},
++{"linux/ixjuser.h", "IXJCTL_SC_TXG", 0x400471eb},
++{"linux/ixjuser.h", "IXJCTL_INTERCOM_START", 0x400471fd},
++{"linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", 0x400471fe},
++{"linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", 0x40047211},
++{"linux/if_ppp.h", "PPPIOCATTCHAN", 0x40047438},
++{"linux/if_ppp.h", "PPPIOCCONNECT", 0x4004743a},
++{"linux/if_ppp.h", "PPPIOCSMRRU", 0x4004743b},
++{"linux/if_ppp.h", "PPPIOCDETACH", 0x4004743c},
++{"linux/if_ppp.h", "PPPIOCATTACH", 0x4004743d},
++{"linux/if_ppp.h", "PPPIOCSDEBUG", 0x40047440},
++{"linux/if_ppp.h", "PPPIOCSMAXCID", 0x40047451},
++{"linux/if_ppp.h", "PPPIOCSMRU", 0x40047452},
++{"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x40047454},
++{"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x40047457},
++{"linux/if_ppp.h", "PPPIOCSFLAGS", 0x40047459},
++{"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x40047481},
++{"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x40047483},
++{"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x40047484},
++{"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x40047485},
++{"linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", 0x40047487},
++{"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x40047602},
++{"linux/ext3_fs.h", "EXT3_IOC_SETVERSION_OLD", 0x40047602},
++{"linux/videodev.h", "VIDIOCCAPTURE", 0x40047608},
++{"linux/videodev.h", "VIDIOCSFREQ", 0x4004760f},
++{"linux/videodev.h", "VIDIOCSYNC", 0x40047612},
++{"linux/videodev.h", "VIDIOCSWRITEMODE", 0x40047619},
++{"linux/meye.h", "MEYEIOC_QBUF_CAPT", 0x400476c2},
++{"linux/videotext.h", "VTXIOCSETVIRT", 0x4004810c},
++{"linux/dn.h", "OSIOCSNETADDR", 0x400489e0},
++{"linux/dn.h", "SIOCSNETADDR", 0x400489e0},
++{"linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", 0x40049366},
++{"linux/if_pppox.h", "PPPOEIOCSFWD", 0x4004b100},
++{"linux/gigaset_dev.h", "GIGASET_BRKCHARS", 0x40064702},
++{"linux/meye.h", "MEYEIOC_S_PARAMS", 0x400676c1},
++{"linux/cciss_ioctl.h", "CCISS_SETINTINFO", 0x40084203},
++{"linux/input.h", "EVIOCSREP", 0x40084503},
++{"linux/input.h", "EVIOCSKEYCODE", 0x40084504},
++{"mtd/mtd-abi.h", "MEMERASE", 0x40084d02},
++{"mtd/mtd-abi.h", "MEMLOCK", 0x40084d05},
++{"mtd/mtd-abi.h", "MEMUNLOCK", 0x40084d06},
++{"mtd/mtd-abi.h", "MEMGETBADBLOCK", 0x40084d0b},
++{"mtd/mtd-abi.h", "MEMSETBADBLOCK", 0x40084d0c},
++{"linux/random.h", "RNDADDENTROPY", 0x40085203},
++{"linux/videodev2.h", "VIDIOC_S_STD", 0x40085618},
++{"linux/videodev2.h", "VIDIOC_S_CTRL_OLD", 0x4008561c},
++{"linux/atmdev.h", "ATM_GETNAMES", 0x40086183},
++{"linux/atmdev.h", "ATM_ADDPARTY", 0x400861f4},
++{"linux/chio.h", "CHIOGSTATUS", 0x40086308},
++{"linux/video_decoder.h", "DECODER_INIT", 0x40086409},
++{"linux/mtio.h", "MTIOCTOP", 0x40086d01},
++{"linux/ppdev.h", "PPSETTIME", 0x40087096},
++{"linux/if_ppp.h", "PPPIOCSACTIVE", 0x40087446},
++{"linux/if_ppp.h", "PPPIOCSPASS", 0x40087447},
++{"linux/if_ppp.h", "PPPIOCSNPMODE", 0x4008744b},
++{"linux/fd.h", "FDFMTTRK", 0x400c0248},
++{"linux/capi.h", "CAPI_REGISTER", 0x400c4301},
++{"linux/hiddev.h", "HIDIOCGREPORT", 0x400c4807},
++{"linux/hiddev.h", "HIDIOCSREPORT", 0x400c4808},
++{"mtd/mtd-abi.h", "OTPGETREGIONINFO", 0x400c4d0f},
++{"linux/uinput.h", "UI_END_FF_ERASE", 0x400c55cb},
++{"linux/ite_gpio.h", "ITE_GPIO_OUT", 0x400c5a01},
++{"linux/ite_gpio.h", "ITE_GPIO_INT_CTRL", 0x400c5a02},
++{"linux/ite_gpio.h", "ITE_GPIO_IN_STATUS", 0x400c5a03},
++{"linux/ite_gpio.h", "ITE_GPIO_OUT_STATUS", 0x400c5a04},
++{"linux/ite_gpio.h", "ITE_GPIO_GEN_CTRL", 0x400c5a05},
++{"linux/ite_gpio.h", "ITE_GPIO_INT_WAIT", 0x400c5a06},
++{"linux/atm_idt77105.h", "IDT77105_GETSTAT", 0x400c6132},
++{"linux/atm_idt77105.h", "IDT77105_GETSTATZ", 0x400c6133},
++{"linux/atmdev.h", "ATM_GETSTAT", 0x400c6150},
++{"linux/atmdev.h", "ATM_GETSTATZ", 0x400c6151},
++{"linux/atmdev.h", "ATM_GETLOOP", 0x400c6152},
++{"linux/atmdev.h", "ATM_SETLOOP", 0x400c6153},
++{"linux/atmdev.h", "ATM_QUERYLOOP", 0x400c6154},
++{"linux/atm_eni.h", "ENI_MEMDUMP", 0x400c6160},
++{"linux/atm_he.h", "HE_GET_REG", 0x400c6160},
++{"linux/atm_zatm.h", "ZATM_GETPOOL", 0x400c6161},
++{"linux/atm_zatm.h", "ZATM_GETPOOLZ", 0x400c6162},
++{"linux/atm_nicstar.h", "NS_SETBUFLEV", 0x400c6162},
++{"linux/atm_zatm.h", "ZATM_SETPOOL", 0x400c6163},
++{"linux/atm_eni.h", "ENI_SETMULT", 0x400c6167},
++{"linux/atmdev.h", "ATM_GETLINKRATE", 0x400c6181},
++{"linux/atmdev.h", "ATM_GETTYPE", 0x400c6184},
++{"linux/atmdev.h", "ATM_GETESI", 0x400c6185},
++{"linux/atmdev.h", "ATM_GETADDR", 0x400c6186},
++{"linux/atmdev.h", "ATM_RSTADDR", 0x400c6187},
++{"linux/atmdev.h", "ATM_ADDADDR", 0x400c6188},
++{"linux/atmdev.h", "ATM_DELADDR", 0x400c6189},
++{"linux/atmdev.h", "ATM_GETCIRANGE", 0x400c618a},
++{"linux/atmdev.h", "ATM_SETCIRANGE", 0x400c618b},
++{"linux/atmdev.h", "ATM_SETESI", 0x400c618c},
++{"linux/atmdev.h", "ATM_SETESIF", 0x400c618d},
++{"linux/atmdev.h", "ATM_ADDLECSADDR", 0x400c618e},
++{"linux/atmdev.h", "ATM_DELLECSADDR", 0x400c618f},
++{"linux/atmdev.h", "ATM_GETLECSADDR", 0x400c6190},
++{"linux/chio.h", "CHIOPOSITION", 0x400c6303},
++{"linux/i2o-dev.h", "I2OEVTREG", 0x400c690a},
++{"linux/ncp_fs.h", "NCP_IOC_GETROOT", 0x400c6e08},
++{"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x400c744d},
++{"linux/videodev.h", "VIDIOCSPLAYMODE", 0x400c7618},
++{"linux/video_decoder.h", "DECODER_SET_PICTURE", 0x400e6407},
++{"linux/videodev.h", "VIDIOCSPICT", 0x400e7607},
++{"linux/cciss_ioctl.h", "CCISS_SETNODENAME", 0x40104205},
++{"linux/synclink.h", "MGSL_IOCSGPIO", 0x40106d10},
++{"linux/videodev.h", "VIDIOCMCAPTURE", 0x40107613},
++{"linux/fd.h", "FDSETMAXERRS", 0x4014024c},
++{"linux/videodev2.h", "VIDIOC_S_CROP", 0x4014563c},
++{"linux/chio.h", "CHIOMOVE", 0x40146301},
++{"linux/videodev.h", "VIDIOCSFBUF", 0x4014760c},
++{"linux/videodev.h", "VIDIOCSCAPTURE", 0x40147617},
++{"linux/hiddev.h", "HIDIOCSUSAGE", 0x4018480c},
++{"linux/hiddev.h", "HIDIOCGCOLLECTIONINDEX", 0x40184810},
++{"linux/ext3_fs.h", "EXT3_IOC_GROUP_ADD", 0x40186608},
++{"linux/videodev.h", "VIDIOCSMICROCODE", 0x4018761b},
++{"linux/fd.h", "FDSETPRM", 0x401c0242},
++{"linux/fd.h", "FDDEFPRM", 0x401c0243},
++{"linux/atmbr2684.h", "BR2684_SETFILT", 0x401c6190},
++{"linux/chio.h", "CHIOEXCHANGE", 0x401c6302},
++{"linux/rtc.h", "RTC_PLL_SET", 0x401c7012},
++{"linux/synclink.h", "MGSL_IOCSPARAMS", 0x40206d00},
++{"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x4020744f},
++{"linux/videodev.h", "VIDIOCSWIN", 0x4020760a},
++{"linux/videodev.h", "VIDIOCSVBIFMT", 0x4020761d},
++{"linux/videotext.h", "VTXIOCCLRPAGE", 0x40208102},
++{"linux/videotext.h", "VTXIOCCLRFOUND", 0x40208103},
++{"linux/videotext.h", "VTXIOCPAGEREQ", 0x40208104},
++{"linux/videotext.h", "VTXIOCGETSTAT", 0x40208105},
++{"linux/videotext.h", "VTXIOCGETPAGE", 0x40208106},
++{"linux/videotext.h", "VTXIOCSTOPDAU", 0x40208107},
++{"linux/joystick.h", "JSIOCSCORR", 0x40246a21},
++{"linux/rtc.h", "RTC_ALM_SET", 0x40247007},
++{"linux/rtc.h", "RTC_SET_TIME", 0x4024700a},
++{"linux/rtc.h", "RTC_WKALM_SET", 0x4028700f},
++{"linux/smb_fs.h", "SMB_IOC_NEWCONN", 0x40287502},
++{"linux/videodev.h", "VIDIOCSAUDIO", 0x40287611},
++{"linux/videodev2.h", "VIDIOC_S_FBUF", 0x402c560b},
++{"linux/videodev2.h", "VIDIOC_S_FREQUENCY", 0x402c5639},
++{"linux/chio.h", "CHIOSVOLTAG", 0x40306312},
++{"linux/videodev.h", "VIDIOCSCHAN", 0x40307603},
++{"linux/uinput.h", "UI_END_FF_UPLOAD", 0x403455c9},
++{"linux/videodev2.h", "VIDIOC_S_AUDIO", 0x40345622},
++{"linux/videodev2.h", "VIDIOC_S_AUDOUT", 0x40345632},
++{"linux/videodev.h", "VIDIOCSTUNER", 0x40347605},
++{"linux/joystick.h", "JSIOCSAXMAP", 0x40406a31},
++{"linux/videodev2.h", "VIDIOC_S_MODULATOR", 0x40445637},
++{"linux/videodev2.h", "VIDIOC_S_TUNER", 0x4054561e},
++{"linux/fd.h", "FDSETDRVPRM", 0x40580290},
++{"linux/chio.h", "CHIOGELEM", 0x406c6310},
++{"linux/videodev2.h", "VIDIOC_S_JPEGCOMP", 0x408c563e},
++{"mtd/mtd-abi.h", "MEMSETOOBSEL", 0x40c84d09},
++{"linux/videodev2.h", "VIDIOC_S_PARM_OLD", 0x40cc5616},
++{"linux/joystick.h", "JSIOCSBTNMAP", 0x42006a33},
++{"linux/hiddev.h", "HIDIOCSUSAGES", 0x501c4814},
++{"linux/videodev2.h", "VIDIOC_G_PRIORITY", 0x80015643},
++{"linux/joystick.h", "JSIOCGAXES", 0x80016a11},
++{"linux/joystick.h", "JSIOCGBUTTONS", 0x80016a12},
++{"linux/ppdev.h", "PPRSTATUS", 0x80017081},
++{"linux/ppdev.h", "PPRCONTROL", 0x80017083},
++{"linux/ppdev.h", "PPRDATA", 0x80017085},
++{"linux/sonypi.h", "SONYPI_IOCGBRT", 0x80017600},
++{"linux/sonypi.h", "SONYPI_IOCGBATFLAGS", 0x80017607},
++{"linux/sonypi.h", "SONYPI_IOCGBLUE", 0x80017608},
++{"linux/sonypi.h", "SONYPI_IOCGFAN", 0x8001760a},
++{"linux/sonypi.h", "SONYPI_IOCGTEMP", 0x8001760c},
++{"linux/capi.h", "CAPI_GET_ERRCODE", 0x80024321},
++{"linux/capi.h", "CAPI_INSTALLED", 0x80024322},
++{"linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD", 0x8002690e},
++{"linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", 0x8002690f},
++{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x80027501},
++{"linux/sonypi.h", "SONYPI_IOCGBAT1CAP", 0x80027602},
++{"linux/sonypi.h", "SONYPI_IOCGBAT1REM", 0x80027603},
++{"linux/sonypi.h", "SONYPI_IOCGBAT2CAP", 0x80027604},
++{"linux/sonypi.h", "SONYPI_IOCGBAT2REM", 0x80027605},
++{"linux/fs.h", "BLKBSZGET", 0x80041270},
++{"linux/fs.h", "BLKGETSIZE64", 0x80041272},
++{"linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", 0x80044003},
++{"linux/agpgart.h", "AGPIOC_INFO", 0x80044100},
++{"linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", 0x80044201},
++{"linux/pmu.h", "PMU_IOC_GET_MODEL", 0x80044203},
++{"linux/pmu.h", "PMU_IOC_HAS_ADB", 0x80044204},
++{"linux/pmu.h", "PMU_IOC_CAN_SLEEP", 0x80044205},
++{"linux/pmu.h", "PMU_IOC_GRAB_BACKLIGHT", 0x80044206},
++{"linux/cciss_ioctl.h", "CCISS_GETHEARTBEAT", 0x80044206},
++{"linux/cciss_ioctl.h", "CCISS_GETBUSTYPES", 0x80044207},
++{"linux/cciss_ioctl.h", "CCISS_GETFIRMVER", 0x80044208},
++{"linux/cciss_ioctl.h", "CCISS_GETDRIVVER", 0x80044209},
++{"linux/capi.h", "CAPI_GET_FLAGS", 0x80044323},
++{"linux/capi.h", "CAPI_SET_FLAGS", 0x80044324},
++{"linux/capi.h", "CAPI_CLR_FLAGS", 0x80044325},
++{"linux/capi.h", "CAPI_NCCI_OPENCOUNT", 0x80044326},
++{"linux/capi.h", "CAPI_NCCI_GETUNIT", 0x80044327},
++{"linux/input.h", "EVIOCGVERSION", 0x80044501},
++{"linux/input.h", "EVIOCGEFFECTS", 0x80044584},
++{"linux/arcfb.h", "FBIO_GETCONTROL2", 0x80044689},
++{"linux/hiddev.h", "HIDIOCGVERSION", 0x80044801},
++{"linux/hiddev.h", "HIDIOCGFLAG", 0x8004480e},
++{"linux/soundcard.h", "SOUND_MIXER_READ_VOLUME", 0x80044d00},
++{"linux/soundcard.h", "SOUND_MIXER_READ_BASS", 0x80044d01},
++{"linux/soundcard.h", "SOUND_MIXER_READ_TREBLE", 0x80044d02},
++{"linux/soundcard.h", "SOUND_MIXER_READ_SYNTH", 0x80044d03},
++{"linux/soundcard.h", "SOUND_MIXER_READ_PCM", 0x80044d04},
++{"linux/soundcard.h", "SOUND_MIXER_READ_SPEAKER", 0x80044d05},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE", 0x80044d06},
++{"linux/soundcard.h", "SOUND_MIXER_READ_MIC", 0x80044d07},
++{"mtd/mtd-abi.h", "MEMGETREGIONCOUNT", 0x80044d07},
++{"linux/soundcard.h", "SOUND_MIXER_READ_CD", 0x80044d08},
++{"linux/soundcard.h", "SOUND_MIXER_READ_IMIX", 0x80044d09},
++{"linux/soundcard.h", "SOUND_MIXER_READ_ALTPCM", 0x80044d0a},
++{"linux/soundcard.h", "SOUND_MIXER_READ_RECLEV", 0x80044d0b},
++{"linux/soundcard.h", "SOUND_MIXER_READ_IGAIN", 0x80044d0c},
++{"linux/soundcard.h", "SOUND_MIXER_READ_OGAIN", 0x80044d0d},
++{"mtd/mtd-abi.h", "OTPSELECT", 0x80044d0d},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE1", 0x80044d0e},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE2", 0x80044d0f},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE3", 0x80044d10},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LOUD", 0x80044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_READ_ENHANCE", 0x80044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_READ_MUTE", 0x80044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_READ_STEREODEVS", 0x80044dfb},
++{"linux/soundcard.h", "SOUND_MIXER_READ_CAPS", 0x80044dfc},
++{"linux/soundcard.h", "SOUND_MIXER_READ_RECMASK", 0x80044dfd},
++{"linux/soundcard.h", "SOUND_MIXER_READ_DEVMASK", 0x80044dfe},
++{"linux/soundcard.h", "SOUND_MIXER_READ_RECSRC", 0x80044dff},
++{"linux/ticable.h", "IOCTL_TIUSB_GET_MAXPS", 0x80044e23},
++{"linux/ticable.h", "IOCTL_TIUSB_GET_DEVID", 0x80044e24},
++{"linux/random.h", "RNDGETENTCNT", 0x80045200},
++{"asm/ioctls.h", "TIOCGPTN", 0x80045430},
++{"linux/videodev2.h", "VIDIOC_G_INPUT", 0x80045626},
++{"linux/videodev2.h", "VIDIOC_G_OUTPUT", 0x8004562e},
++{"linux/watchdog.h", "WDIOC_GETSTATUS", 0x80045701},
++{"linux/watchdog.h", "WDIOC_GETBOOTSTATUS", 0x80045702},
++{"linux/watchdog.h", "WDIOC_GETTEMP", 0x80045703},
++{"linux/watchdog.h", "WDIOC_SETOPTIONS", 0x80045704},
++{"linux/watchdog.h", "WDIOC_KEEPALIVE", 0x80045705},
++{"linux/watchdog.h", "WDIOC_GETTIMEOUT", 0x80045707},
++{"linux/watchdog.h", "WDIOC_GETPRETIMEOUT", 0x80045709},
++{"linux/watchdog.h", "WDIOC_GETTIMELEFT", 0x8004570a},
++{"linux/sonet.h", "SONET_GETDIAG", 0x80046114},
++{"linux/sonet.h", "SONET_GETFRAMING", 0x80046116},
++{"linux/cm4000_cs.h", "CM_IOCGSTATUS", 0x80046300},
++{"linux/chio.h", "CHIOGPICKER", 0x80046304},
++{"linux/video_decoder.h", "DECODER_GET_STATUS", 0x80046402},
++{"linux/iflags.h", "IFLAGS_GET_IOC", 0x80046601},
++{"linux/ext3_fs.h", "EXT3_IOC_GETFLAGS", 0x80046601},
++{"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x80046601},
++{"linux/ext3_fs.h", "EXT3_IOC_GETVERSION", 0x80046603},
++{"linux/ext3_fs.h", "EXT3_IOC_GETRSVSZ", 0x80046605},
++{"linux/ext3_fs.h", "EXT3_IOC_WAIT_FOR_READONLY", 0x80046663},
++{"linux/i2o-dev.h", "I2OVALIDATE", 0x80046908},
++{"linux/ipmi.h", "IPMICTL_SET_GETS_EVENTS_CMD", 0x80046910},
++{"linux/ipmi.h", "IPMICTL_SET_MY_ADDRESS_CMD", 0x80046911},
++{"linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", 0x80046912},
++{"linux/ipmi.h", "IPMICTL_SET_MY_LUN_CMD", 0x80046913},
++{"linux/ipmi.h", "IPMICTL_GET_MY_LUN_CMD", 0x80046914},
++{"linux/ipmi.h", "IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD", 0x80046918},
++{"linux/ipmi.h", "IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD", 0x80046919},
++{"linux/ipmi.h", "IPMICTL_SET_MY_CHANNEL_LUN_CMD", 0x8004691a},
++{"linux/ipmi.h", "IPMICTL_GET_MY_CHANNEL_LUN_CMD", 0x8004691b},
++{"linux/i8k.h", "I8K_BIOS_VERSION", 0x80046980},
++{"linux/i8k.h", "I8K_MACHINE_ID", 0x80046981},
++{"linux/i8k.h", "I8K_POWER_STATUS", 0x80046982},
++{"linux/i8k.h", "I8K_FN_STATUS", 0x80046983},
++{"linux/i8k.h", "I8K_GET_TEMP", 0x80046984},
++{"linux/joystick.h", "JSIOCGVERSION", 0x80046a01},
++{"linux/udf_fs_i.h", "UDF_GETEASIZE", 0x80046c40},
++{"linux/udf_fs_i.h", "UDF_GETEABLOCK", 0x80046c41},
++{"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x80046c42},
++{"linux/mmtimer.h", "MMTIMER_GETRES", 0x80046d01},
++{"linux/mmtimer.h", "MMTIMER_GETFREQ", 0x80046d02},
++{"linux/mtio.h", "MTIOCPOS", 0x80046d03},
++{"linux/mmtimer.h", "MMTIMER_GETCOUNTER", 0x80046d09},
++{"linux/zftape.h", "MTIOC_ZFTAPE_GETBLKSZ", 0x80046d68},
++{"linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", 0x80046e06},
++{"linux/ncp_fs.h", "NCP_IOC_SETDENTRYTTL", 0x80046e0c},
++{"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_CONNECTION", 0x80046ef8},
++{"linux/matroxfb.h", "MATROXFB_GET_AVAILABLE_OUTPUTS", 0x80046ef9},
++{"linux/matroxfb.h", "MATROXFB_GET_ALL_OUTPUTS", 0x80046efb},
++{"linux/rtc.h", "RTC_IRQP_READ", 0x8004700b},
++{"linux/rtc.h", "RTC_EPOCH_READ", 0x8004700d},
++{"linux/ppdev.h", "PPCLRIRQ", 0x80047093},
++{"linux/ppdev.h", "PPGETMODES", 0x80047097},
++{"linux/ppdev.h", "PPGETMODE", 0x80047098},
++{"linux/ppdev.h", "PPGETPHASE", 0x80047099},
++{"linux/ppdev.h", "PPGETFLAGS", 0x8004709a},
++{"linux/telephony.h", "PHONE_CAPABILITIES_LIST", 0x80047181},
++{"linux/telephony.h", "PHONE_DTMF_READY", 0x80047196},
++{"linux/telephony.h", "PHONE_GET_DTMF", 0x80047197},
++{"linux/telephony.h", "PHONE_GET_DTMF_ASCII", 0x80047198},
++{"linux/telephony.h", "PHONE_EXCEPTION", 0x8004719a},
++{"linux/ixjuser.h", "IXJCTL_CARDTYPE", 0x800471c1},
++{"linux/ixjuser.h", "IXJCTL_SERIAL", 0x800471c2},
++{"linux/ixjuser.h", "IXJCTL_DSP_TYPE", 0x800471c3},
++{"linux/ixjuser.h", "IXJCTL_DSP_VERSION", 0x800471c4},
++{"linux/ixjuser.h", "IXJCTL_CID", 0x800471d4},
++{"linux/ixjuser.h", "IXJCTL_VMWI", 0x800471d8},
++{"linux/ixjuser.h", "IXJCTL_VERSION", 0x800471da},
++{"linux/ixjuser.h", "IXJCTL_FRAMES_READ", 0x800471e2},
++{"linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", 0x800471e3},
++{"linux/ixjuser.h", "IXJCTL_READ_WAIT", 0x800471e4},
++{"linux/ixjuser.h", "IXJCTL_WRITE_WAIT", 0x800471e5},
++{"linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", 0x800471e6},
++{"linux/msdos_fs.h", "FAT_IOCTL_GET_ATTRIBUTES", 0x80047210},
++{"linux/if_ppp.h", "PPPIOCGCHAN", 0x80047437},
++{"linux/if_ppp.h", "PPPIOCGDEBUG", 0x80047441},
++{"linux/if_ppp.h", "PPPIOCGMRU", 0x80047453},
++{"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x80047455},
++{"linux/if_ppp.h", "PPPIOCGUNIT", 0x80047456},
++{"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x80047458},
++{"linux/if_ppp.h", "PPPIOCGFLAGS", 0x8004745a},
++{"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x80047482},
++{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID32", 0x80047503},
++{"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x80047601},
++{"linux/ext3_fs.h", "EXT3_IOC_GETVERSION_OLD", 0x80047601},
++{"linux/videodev.h", "VIDIOCGFREQ", 0x8004760e},
++{"linux/meye.h", "MEYEIOC_STILLJCAPT", 0x800476c5},
++{"linux/dn.h", "SIOCGNETADDR", 0x800489e1},
++{"linux/dn.h", "OSIOCGNETADDR", 0x800489e1},
++{"linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", 0x80049363},
++{"linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", 0x80049367},
++{"linux/auto_fs4.h", "AUTOFS_IOC_ASKREGHOST", 0x80049368},
++{"linux/auto_fs4.h", "AUTOFS_IOC_TOGGLEREGHOST", 0x80049369},
++{"linux/auto_fs4.h", "AUTOFS_IOC_ASKUMOUNT", 0x80049370},
++{"linux/sonet.h", "SONET_GETFRSENSE", 0x80066117},
++{"linux/meye.h", "MEYEIOC_G_PARAMS", 0x800676c0},
++{"linux/cciss_ioctl.h", "CCISS_GETPCIINFO", 0x80084201},
++{"linux/cciss_ioctl.h", "CCISS_GETINTINFO", 0x80084202},
++{"linux/input.h", "EVIOCGID", 0x80084502},
++{"linux/input.h", "EVIOCGREP", 0x80084503},
++{"linux/input.h", "EVIOCGKEYCODE", 0x80084504},
++{"linux/random.h", "RNDGETPOOL", 0x80085202},
++{"linux/videodev2.h", "VIDIOC_G_STD", 0x80085617},
++{"linux/videodev2.h", "VIDIOC_QUERYSTD", 0x8008563f},
++{"linux/i2o-dev.h", "I2OPASSTHRU", 0x8008690c},
++{"linux/i2o-dev.h", "I2OPASSTHRU32", 0x8008690c},
++{"linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", 0x80086916},
++{"linux/ipmi.h", "IPMICTL_GET_TIMING_PARMS_CMD", 0x80086917},
++{"linux/mtio.h", "MTIOCGETSIZE", 0x80086d09},
++{"linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", 0x80086e0a},
++{"linux/ppdev.h", "PPGETTIME", 0x80087095},
++{"linux/if_ppp.h", "PPPIOCGIDLE", 0x8008743f},
++{"linux/cciss_ioctl.h", "CCISS_GETLUNINFO", 0x800c4211},
++{"mtd/mtd-abi.h", "OTPLOCK", 0x800c4d10},
++{"linux/video_decoder.h", "DECODER_GET_CAPABILITIES", 0x800c6401},
++{"linux/video_encoder.h", "ENCODER_GET_CAPABILITIES", 0x800c6501},
++{"linux/hpet.h", "HPET_INFO", 0x800c6803},
++{"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x800c6e01},
++{"linux/ncp_fs.h", "NCP_IOC_SETROOT", 0x800c6e08},
++{"linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", 0x800c6e09},
++{"linux/videodev.h", "VIDIOCKEY", 0x800c760d},
++{"linux/videodev.h", "VIDIOCGPICT", 0x800e7606},
++{"linux/fd.h", "FDGETDRVTYP", 0x8010020f},
++{"linux/cciss_ioctl.h", "CCISS_GETNODENAME", 0x80104204},
++{"mtd/mtd-abi.h", "ECCGETSTATS", 0x80104d12},
++{"linux/synclink.h", "MGSL_IOCGGPIO", 0x80106d11},
++{"linux/isdn_ppp.h", "PPPIOCGIFNAME", 0x80107488},
++{"linux/videotext.h", "VTXIOCGETINFO", 0x80108101},
++{"linux/fd.h", "FDGETMAXERRS", 0x8014020e},
++{"linux/chio.h", "CHIOGPARAMS", 0x80146306},
++{"linux/ipmi.h", "IPMICTL_SEND_COMMAND", 0x8014690d},
++{"linux/mtio.h", "MTIOCVOLINFO", 0x80146d08},
++{"linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", 0x80146e07},
++{"linux/videodev.h", "VIDIOCGFBUF", 0x8014760b},
++{"linux/videodev.h", "VIDIOCGUNIT", 0x80147615},
++{"linux/videodev.h", "VIDIOCGCAPTURE", 0x80147616},
++{"linux/fd.h", "FDWERRORGET", 0x80180217},
++{"linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", 0x80186e05},
++{"linux/fd.h", "FDGETPRM", 0x801c0204},
++{"linux/hiddev.h", "HIDIOCGDEVINFO", 0x801c4803},
++{"linux/ipmi.h", "IPMICTL_SEND_COMMAND_SETTIME", 0x801c6915},
++{"linux/mtio.h", "MTIOCGET", 0x801c6d02},
++{"linux/rtc.h", "RTC_PLL_GET", 0x801c7011},
++{"linux/fd.h", "FDGETFDCSTAT", 0x80200215},
++{"linux/fb.h", "FBIOGET_VBLANK", 0x80204612},
++{"mtd/mtd-abi.h", "MEMGETINFO", 0x80204d01},
++{"linux/i2o-dev.h", "I2OGETIOPS", 0x80206900},
++{"linux/synclink.h", "MGSL_IOCGPARAMS", 0x80206d01},
++{"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x80207450},
++{"linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", 0x80207486},
++{"linux/videodev.h", "VIDIOCGWIN", 0x80207609},
++{"linux/videodev.h", "VIDIOCGVBIFMT", 0x8020761c},
++{"linux/sonet.h", "SONET_GETSTAT", 0x80246110},
++{"linux/sonet.h", "SONET_GETSTATZ", 0x80246111},
++{"linux/joystick.h", "JSIOCGCORR", 0x80246a22},
++{"linux/rtc.h", "RTC_ALM_READ", 0x80247008},
++{"linux/rtc.h", "RTC_RD_TIME", 0x80247009},
++{"linux/watchdog.h", "WDIOC_GETSUPPORT", 0x80285700},
++{"linux/rtc.h", "RTC_WKALM_RD", 0x80287010},
++{"linux/videodev.h", "VIDIOCGAUDIO", 0x80287610},
++{"linux/ncp_fs.h", "NCP_IOC_SETCHARSETS", 0x802a6e0b},
++{"linux/videodev2.h", "VIDIOC_G_FBUF", 0x802c560a},
++{"linux/videodev2.h", "VIDIOC_CROPCAP_OLD", 0x802c563a},
++{"linux/fd.h", "FDGETDRVSTAT", 0x80340212},
++{"linux/fd.h", "FDPOLLDRVSTAT", 0x80340213},
++{"linux/videodev2.h", "VIDIOC_G_AUDIO", 0x80345621},
++{"linux/videodev2.h", "VIDIOC_G_AUDOUT", 0x80345631},
++{"linux/videodev.h", "VIDIOCGCAP", 0x803c7601},
++{"linux/joystick.h", "JSIOCGAXMAP", 0x80406a32},
++{"linux/fd.h", "FDGETDRVPRM", 0x80580211},
++{"linux/videodev2.h", "VIDIOC_QUERYCAP", 0x80685600},
++{"linux/i2o-dev.h", "I2OEVTGET", 0x8068690b},
++{"linux/chio.h", "CHIOGVPARAMS", 0x80706313},
++{"linux/videodev2.h", "VIDIOC_G_SLICED_VBI_CAP", 0x80745645},
++{"linux/videodev.h", "VIDIOCGMBUF", 0x80887614},
++{"linux/videodev2.h", "VIDIOC_G_JPEGCOMP", 0x808c563d},
++{"mtd/mtd-abi.h", "MEMGETOOBSEL", 0x80c84d0a},
++{"linux/hiddev.h", "HIDIOCGSTRING", 0x81044804},
++{"linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", 0x810c9365},
++{"linux/videodev.h", "VIDIOCGPLAYINFO", 0x8118761a},
++{"mtd/mtd-abi.h", "ECCGETLAYOUT", 0x81484d11},
++{"linux/joystick.h", "JSIOCGBTNMAP", 0x82006a34},
++{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x82187201},
++{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x82187202},
++{"linux/agpgart.h", "AGPIOC_ALLOCATE", 0xc0044106},
++{"linux/capi.h", "CAPI_GET_MANUFACTURER", 0xc0044306},
++{"linux/capi.h", "CAPI_GET_SERIAL", 0xc0044308},
++{"linux/gigaset_dev.h", "GIGASET_REDIR", 0xc0044700},
++{"linux/gigaset_dev.h", "GIGASET_CONFIG", 0xc0044701},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_VOLUME", 0xc0044d00},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_BASS", 0xc0044d01},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_TREBLE", 0xc0044d02},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_SYNTH", 0xc0044d03},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_PCM", 0xc0044d04},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_SPEAKER", 0xc0044d05},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE", 0xc0044d06},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_MIC", 0xc0044d07},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_CD", 0xc0044d08},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_IMIX", 0xc0044d09},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_ALTPCM", 0xc0044d0a},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECLEV", 0xc0044d0b},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_IGAIN", 0xc0044d0c},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_OGAIN", 0xc0044d0d},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE1", 0xc0044d0e},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE2", 0xc0044d0f},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE3", 0xc0044d10},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_ENHANCE", 0xc0044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LOUD", 0xc0044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_MUTE", 0xc0044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECSRC", 0xc0044dff},
++{"linux/videodev2.h", "VIDIOC_OVERLAY_OLD", 0xc004560e},
++{"linux/videodev2.h", "VIDIOC_S_INPUT", 0xc0045627},
++{"linux/videodev2.h", "VIDIOC_S_OUTPUT", 0xc004562f},
++{"linux/watchdog.h", "WDIOC_SETTIMEOUT", 0xc0045706},
++{"linux/watchdog.h", "WDIOC_SETPRETIMEOUT", 0xc0045708},
++{"linux/sonet.h", "SONET_SETDIAG", 0xc0046112},
++{"linux/sonet.h", "SONET_CLRDIAG", 0xc0046113},
++{"linux/cm4000_cs.h", "CM_IOCGATR", 0xc0046301},
++{"linux/coda.h", "CIOC_KERNEL_VERSION", 0xc004630a},
++{"linux/i8k.h", "I8K_GET_SPEED", 0xc0046985},
++{"linux/i8k.h", "I8K_GET_FAN", 0xc0046986},
++{"linux/i8k.h", "I8K_SET_FAN", 0xc0046987},
++{"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0xc0046c43},
++{"linux/synclink.h", "MGSL_IOCWAITEVENT", 0xc0046d08},
++{"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_MODE", 0xc0046efa},
++{"linux/telephony.h", "PHONE_QUERY_CODEC", 0xc00471a7},
++{"linux/if_ppp.h", "PPPIOCNEWUNIT", 0xc004743e},
++{"linux/toshiba.h", "TOSH_SMM", 0xc0047490},
++{"linux/meye.h", "MEYEIOC_SYNC", 0xc00476c3},
++{"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", 0xc0049364},
++{"linux/capi.h", "CAPI_MANUFACTURER_CMD", 0xc0084320},
++{"linux/videodev2.h", "VIDIOC_G_CTRL", 0xc008561b},
++{"linux/videodev2.h", "VIDIOC_S_CTRL", 0xc008561c},
++{"linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", 0xc0086e0a},
++{"linux/if_ppp.h", "PPPIOCGNPMODE", 0xc008744c},
++{"linux/hiddev.h", "HIDIOCGREPORTINFO", 0xc00c4809},
++{"mtd/mtd-abi.h", "MEMWRITEOOB", 0xc00c4d03},
++{"mtd/mtd-abi.h", "MEMREADOOB", 0xc00c4d04},
++{"linux/uinput.h", "UI_BEGIN_FF_ERASE", 0xc00c55ca},
++{"linux/ite_gpio.h", "ITE_GPIO_IN", 0xc00c5a00},
++{"linux/atm_nicstar.h", "NS_GETPSTAT", 0xc00c6161},
++{"linux/i2o-dev.h", "I2OHRTGET", 0xc00c6901},
++{"linux/i2o-dev.h", "I2OLCTGET", 0xc00c6902},
++{"linux/mtio.h", "MTIOCFTFORMAT", 0xc00c6d0a},
++{"linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", 0xc00c6e09},
++{"linux/capi.h", "CAPI_GET_VERSION", 0xc0104307},
++{"linux/gigaset_dev.h", "GIGASET_VERSION", 0xc0104703},
++{"linux/hiddev.h", "HIDIOCGCOLLECTIONINFO", 0xc0104811},
++{"mtd/mtd-abi.h", "MEMGETREGIONINFO", 0xc0104d08},
++{"linux/videodev2.h", "VIDIOC_REQBUFS", 0xc0105608},
++{"linux/mtio.h", "MTIOCRDFTSEG", 0xc0106d06},
++{"linux/mtio.h", "MTIOCWRFTSEG", 0xc0106d07},
++{"linux/synclink.h", "MGSL_IOCWAITGPIO", 0xc0106d12},
++{"linux/videodev2.h", "VIDIOC_G_CROP", 0xc014563b},
++{"linux/hiddev.h", "HIDIOCGUSAGE", 0xc018480b},
++{"linux/hiddev.h", "HIDIOCGUCODE", 0xc018480d},
++{"linux/videodev2.h", "VIDIOC_G_EXT_CTRLS", 0xc0185647},
++{"linux/videodev2.h", "VIDIOC_S_EXT_CTRLS", 0xc0185648},
++{"linux/videodev2.h", "VIDIOC_TRY_EXT_CTRLS", 0xc0185649},
++{"linux/pktcdvd.h", "PACKET_CTRL_CMD", 0xc0185801},
++{"linux/i2o-dev.h", "I2OPARMSET", 0xc0186903},
++{"linux/i2o-dev.h", "I2OPARMGET", 0xc0186904},
++{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG_TRUNC", 0xc018690b},
++{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG", 0xc018690c},
++{"linux/i2o-dev.h", "I2OSWDL", 0xc01c6905},
++{"linux/i2o-dev.h", "I2OSWUL", 0xc01c6906},
++{"linux/i2o-dev.h", "I2OSWDEL", 0xc01c6907},
++{"linux/i2o-dev.h", "I2OHTML", 0xc01c6909},
++{"linux/mtio.h", "MTIOCFTCMD", 0xc0206d0b},
++{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO_V2", 0xc0246e04},
++{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0xc0286e04},
++{"linux/ncp_fs.h", "NCP_IOC_GETCHARSETS", 0xc02a6e0b},
++{"linux/videodev2.h", "VIDIOC_QUERYMENU", 0xc02c5625},
++{"linux/videodev2.h", "VIDIOC_G_FREQUENCY", 0xc02c5638},
++{"linux/videodev2.h", "VIDIOC_CROPCAP", 0xc02c563a},
++{"linux/videodev.h", "VIDIOCGCHAN", 0xc0307602},
++{"linux/uinput.h", "UI_BEGIN_FF_UPLOAD", 0xc03455c8},
++{"linux/videodev2.h", "VIDIOC_G_AUDIO_OLD", 0xc0345621},
++{"linux/videodev2.h", "VIDIOC_G_AUDOUT_OLD", 0xc0345631},
++{"linux/videodev2.h", "VIDIOC_ENUMAUDIO", 0xc0345641},
++{"linux/videodev2.h", "VIDIOC_ENUMAUDOUT", 0xc0345642},
++{"linux/videodev.h", "VIDIOCGTUNER", 0xc0347604},
++{"linux/hiddev.h", "HIDIOCGFIELDINFO", 0xc038480a},
++{"linux/capi.h", "CAPI_GET_PROFILE", 0xc0404309},
++{"linux/videodev2.h", "VIDIOC_ENUM_FMT", 0xc0405602},
++{"linux/videodev2.h", "VIDIOC_ENUMSTD", 0xc0405619},
++{"linux/videodev2.h", "VIDIOC_QUERYBUF", 0xc0445609},
++{"linux/videodev2.h", "VIDIOC_QBUF", 0xc044560f},
++{"linux/videodev2.h", "VIDIOC_DQBUF", 0xc0445611},
++{"linux/videodev2.h", "VIDIOC_QUERYCTRL", 0xc0445624},
++{"linux/videodev2.h", "VIDIOC_G_MODULATOR", 0xc0445636},
++{"linux/fb.h", "FBIO_CURSOR", 0xc0484608},
++{"linux/videodev2.h", "VIDIOC_ENUMOUTPUT", 0xc0485630},
++{"linux/videodev2.h", "VIDIOC_ENUMINPUT", 0xc04c561a},
++{"linux/cciss_ioctl.h", "CCISS_PASSTHRU", 0xc054420b},
++{"linux/videodev2.h", "VIDIOC_G_TUNER", 0xc054561d},
++{"linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU", 0xc0584212},
++{"linux/isdn_ppp.h", "PPPIOCGCALLINFO", 0xc0887480},
++{"linux/videodev2.h", "VIDIOC_G_FMT", 0xc0cc5604},
++{"linux/videodev2.h", "VIDIOC_S_FMT", 0xc0cc5605},
++{"linux/videodev2.h", "VIDIOC_G_PARM", 0xc0cc5615},
++{"linux/videodev2.h", "VIDIOC_S_PARM", 0xc0cc5616},
++{"linux/videodev2.h", "VIDIOC_TRY_FMT", 0xc0cc5640},
++{"linux/dm-ioctl.h", "DM_VERSION", 0xc134fd00},
++{"linux/dm-ioctl.h", "DM_VERSION_32", 0xc134fd00},
++{"linux/dm-ioctl.h", "DM_REMOVE_ALL_32", 0xc134fd01},
++{"linux/dm-ioctl.h", "DM_REMOVE_ALL", 0xc134fd01},
++{"linux/dm-ioctl.h", "DM_LIST_DEVICES_32", 0xc134fd02},
++{"linux/dm-ioctl.h", "DM_LIST_DEVICES", 0xc134fd02},
++{"linux/dm-ioctl.h", "DM_DEV_CREATE_32", 0xc134fd03},
++{"linux/dm-ioctl.h", "DM_DEV_CREATE", 0xc134fd03},
++{"linux/dm-ioctl.h", "DM_DEV_REMOVE", 0xc134fd04},
++{"linux/dm-ioctl.h", "DM_DEV_REMOVE_32", 0xc134fd04},
++{"linux/dm-ioctl.h", "DM_DEV_RENAME_32", 0xc134fd05},
++{"linux/dm-ioctl.h", "DM_DEV_RENAME", 0xc134fd05},
++{"linux/dm-ioctl.h", "DM_DEV_SUSPEND_32", 0xc134fd06},
++{"linux/dm-ioctl.h", "DM_DEV_SUSPEND", 0xc134fd06},
++{"linux/dm-ioctl.h", "DM_DEV_STATUS", 0xc134fd07},
++{"linux/dm-ioctl.h", "DM_DEV_STATUS_32", 0xc134fd07},
++{"linux/dm-ioctl.h", "DM_DEV_WAIT", 0xc134fd08},
++{"linux/dm-ioctl.h", "DM_DEV_WAIT_32", 0xc134fd08},
++{"linux/dm-ioctl.h", "DM_TABLE_LOAD", 0xc134fd09},
++{"linux/dm-ioctl.h", "DM_TABLE_LOAD_32", 0xc134fd09},
++{"linux/dm-ioctl.h", "DM_TABLE_CLEAR_32", 0xc134fd0a},
++{"linux/dm-ioctl.h", "DM_TABLE_CLEAR", 0xc134fd0a},
++{"linux/dm-ioctl.h", "DM_TABLE_DEPS_32", 0xc134fd0b},
++{"linux/dm-ioctl.h", "DM_TABLE_DEPS", 0xc134fd0b},
++{"linux/dm-ioctl.h", "DM_TABLE_STATUS", 0xc134fd0c},
++{"linux/dm-ioctl.h", "DM_TABLE_STATUS_32", 0xc134fd0c},
++{"linux/dm-ioctl.h", "DM_LIST_VERSIONS", 0xc134fd0d},
++{"linux/dm-ioctl.h", "DM_LIST_VERSIONS_32", 0xc134fd0d},
++{"linux/dm-ioctl.h", "DM_TARGET_MSG", 0xc134fd0e},
++{"linux/dm-ioctl.h", "DM_TARGET_MSG_32", 0xc134fd0e},
++{"linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY_32", 0xc134fd0f},
++{"linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY", 0xc134fd0f},
++{"linux/hiddev.h", "HIDIOCGUSAGES", 0xd01c4813},
+Index: strace-4.5.14-avr32/linux/avr32/ioctlent.sh
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ strace-4.5.14-avr32/linux/avr32/ioctlent.sh 2006-09-21 14:45:12.000000000 +0200
+@@ -0,0 +1,124 @@
++#!/bin/sh
++# Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
++# All rights reserved.
++#
++# Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
++# All rights reserved.
++#
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions
++# are met:
++# 1. Redistributions of source code must retain the above copyright
++# notice, this list of conditions and the following disclaimer.
++# 2. Redistributions in binary form must reproduce the above copyright
++# notice, this list of conditions and the following disclaimer in the
++# documentation and/or other materials provided with the distribution.
++# 3. The name of the author may not be used to endorse or promote products
++# derived from this software without specific prior written permission.
++#
++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++
++# Files to find.
++file_find='asm/*.h linux/*.h scsi/*.h mtd/*.h'
++
++# Files to stop.
++file_stop='asm/byteorder.h linux/config.h linux/elf-em.h linux/pci_ids.h linux/xd.h linux/reiserfs_fs.h linux/usbdevice_fs.h'
++
++# Defs to find.
++# Work on the kernel source to convert all to df_iowr.
++# Don't know how to find low-numbered ioctls in linux/mc146818rtc.h.
++df_name='^[ ]*#[ ]*define[ ]+[A-Z_][A-Z0-9_]*[ ]+'
++df_iowr='_IO|_IOR|_IOW|_IOWR'
++df_NNNN='0[Xx](03|06|22|46|4B|4C|53|54|56|89|90)[0-9A-Fa-f][0-9A-Fa-f]'
++df_4359='0[Xx]4359[0-9A-Fa-f][0-9A-Fa-f]' # linux/cyclades.h
++df_470N='470[0-9]' # linux/fs.h (only in 1.2.13)
++df_smix='MIXER_READ|MIXER_WRITE' # linux/soundcard.h
++df_12NN='12[3-4][0-9]' # linux/umsdos_fs.h (only in 1.2.13)
++df_tail='([() ]|$)'
++def_find="$df_name($df_iowr|$df_NNNN|$df_4359|$df_470N|$df_smix|$df_12NN)$df_tail"
++
++# Defs to stop.
++ds_tail='_MAGIC|_PATCH'
++ds_fdmp='FD(DEF|GET|SET)MEDIAPRM' # linux/fd.h aliases (only in 1.2.13)
++ds_mtio='MTIOC(GET|SET)CONFIG' # linux/mtio.h needs config (only in 1.2.13)
++ds_soundcard='_SIO(RW?|W)?'
++def_stop="$ds_tail|$ds_fdmp|$ds_mtio|$ds_soundcard"
++
++# Validate arg count.
++if [ $# -ne 1 ]
++then
++ echo "usage: $0 include-directory" >&2
++ exit 1
++fi
++
++# Grep through the files.
++(
++ # Construct list: find files minus stop files.
++ cd $1 || exit
++ file_list=`(ls $file_find $file_stop $file_stop 2>/dev/null) | sort | uniq -u`
++
++ # Grep matching #define lines.
++ # Transform to C structure form.
++ # Filter out stop list.
++ egrep "$def_find" $file_list |
++ sed -n -e 's/^\(.*\):#[ ]*define[ ]*\([A-Z_][A-Z0-9_]*\).*$/ { "\1", "\2", \2 },/p' |
++ egrep -v "$def_stop"
++) > ioctlent.tmp
++
++# Generate the output file.
++echo '/* This file is automatically generated by ioctlent.sh */'
++echo
++echo '#include <sys/types.h>'
++echo '#include <sys/socket.h>'
++echo '#include <stdint.h>'
++echo
++echo '/* Needed for <linux/baycom.h> */'
++echo '#define BAYCOM_DEBUG'
++echo
++echo '/* Needed for <linux/dm-ioctl.h> */'
++echo '#define CONFIG_COMPAT'
++echo
++echo '/* Needed for <linux/ext3_fs.h> */'
++echo '#define CONFIG_JBD_DEBUG'
++echo
++echo '/* Needed for <linux/lp.h> */'
++echo '#define LP_STATS'
++echo
++echo '/* Needed for <linux/videodev2.h> */'
++echo '#define __OLD_VIDIOC_'
++echo
++echo '/* Needed for <linux/zftape.h> */'
++echo '#define ZFT_OBSOLETE'
++echo
++echo '/* Needed for <linux/auto_fs.h> */'
++echo '#include <linux/limits.h>'
++echo
++echo '/* Needed for <linux/cyclades.h> */'
++echo '#include <linux/termios.h>'
++#echo '#include <linux/tqueue.h>'
++echo
++echo '/* Needed for <linux/if_ppp.h> */'
++echo '#include <linux/ppp_defs.h>'
++echo '#include <linux/filter.h>'
++echo
++echo '/* Needed for <linux/msdos_fs.h> */'
++echo '#include <linux/dirent.h>'
++echo
++awk '{ print "#include <" substr($2, 2, length($2) - 3) ">" }' ioctlent.tmp | sort -u
++echo
++echo 'struct ioctlent ioctlent [] ='
++echo '{'
++cat ioctlent.tmp
++echo '};'
++
++# Clean up.
++rm -f ioctlent.tmp
diff --git a/packages/strace/strace-4.5.15/.mtn2git_empty b/packages/strace/strace-4.5.15/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/strace/strace-4.5.15/.mtn2git_empty
diff --git a/packages/strace/strace-4.5.15/strace-4.5.15.atmel.1.patch b/packages/strace/strace-4.5.15/strace-4.5.15.atmel.1.patch
new file mode 100644
index 0000000000..57f836eaf7
--- /dev/null
+++ b/packages/strace/strace-4.5.15/strace-4.5.15.atmel.1.patch
@@ -0,0 +1,14842 @@
+diff --git a/Makefile.am b/Makefile.am
+index a9972fe..8e4ecac 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -29,6 +29,7 @@ EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
+ linux/alpha/errnoent.h linux/alpha/ioctlent.h \
+ linux/alpha/signalent.h linux/alpha/syscallent.h \
+ linux/arm/syscallent.h \
++ linux/avr32/syscallent.h \
+ linux/hppa/errnoent.h linux/hppa/ioctlent.h \
+ linux/hppa/signalent.h linux/hppa/syscallent.h \
+ linux/ia64/syscallent.h linux/ia64/errnoent.h \
+diff --git a/Makefile.in b/Makefile.in
+index bb0f8b1..d8e618b 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -121,6 +121,7 @@ EGREP = @EGREP@
+ EXEEXT = @EXEEXT@
+ FREEBSD_FALSE = @FREEBSD_FALSE@
+ FREEBSD_TRUE = @FREEBSD_TRUE@
++GREP = @GREP@
+ I386_FALSE = @I386_FALSE@
+ I386_TRUE = @I386_TRUE@
+ INSTALL_DATA = @INSTALL_DATA@
+@@ -158,7 +159,6 @@ WARNFLAGS = @WARNFLAGS@
+ X86_64_FALSE = @X86_64_FALSE@
+ X86_64_TRUE = @X86_64_TRUE@
+ ac_ct_CC = @ac_ct_CC@
+-ac_ct_STRIP = @ac_ct_STRIP@
+ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+ am__include = @am__include@
+@@ -174,24 +174,31 @@ build_cpu = @build_cpu@
+ build_os = @build_os@
+ build_vendor = @build_vendor@
+ datadir = @datadir@
++datarootdir = @datarootdir@
++docdir = @docdir@
++dvidir = @dvidir@
+ exec_prefix = @exec_prefix@
+ host = @host@
+ host_alias = @host_alias@
+ host_cpu = @host_cpu@
+ host_os = @host_os@
+ host_vendor = @host_vendor@
++htmldir = @htmldir@
+ includedir = @includedir@
+ infodir = @infodir@
+ install_sh = @install_sh@
+ libdir = @libdir@
+ libexecdir = @libexecdir@
++localedir = @localedir@
+ localstatedir = @localstatedir@
+ mandir = @mandir@
+ mkdir_p = @mkdir_p@
+ oldincludedir = @oldincludedir@
+ opsys = @opsys@
++pdfdir = @pdfdir@
+ prefix = @prefix@
+ program_transform_name = @program_transform_name@
++psdir = @psdir@
+ sbindir = @sbindir@
+ sharedstatedir = @sharedstatedir@
+ sysconfdir = @sysconfdir@
+@@ -222,6 +229,7 @@ EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
+ linux/alpha/errnoent.h linux/alpha/ioctlent.h \
+ linux/alpha/signalent.h linux/alpha/syscallent.h \
+ linux/arm/syscallent.h \
++ linux/avr32/syscallent.h \
+ linux/hppa/errnoent.h linux/hppa/ioctlent.h \
+ linux/hppa/signalent.h linux/hppa/syscallent.h \
+ linux/ia64/syscallent.h linux/ia64/errnoent.h \
+@@ -522,7 +530,7 @@ distdir: $(DISTFILES)
+ esac
+ $(am__remove_distdir)
+ mkdir $(distdir)
+- $(mkdir_p) $(distdir)/debian $(distdir)/freebsd $(distdir)/freebsd/i386 $(distdir)/linux $(distdir)/linux/alpha $(distdir)/linux/arm $(distdir)/linux/hppa $(distdir)/linux/ia64 $(distdir)/linux/m68k $(distdir)/linux/mips $(distdir)/linux/powerpc $(distdir)/linux/s390 $(distdir)/linux/s390x $(distdir)/linux/sh $(distdir)/linux/sh64 $(distdir)/linux/sparc $(distdir)/linux/sparc64 $(distdir)/linux/x86_64 $(distdir)/sunos4 $(distdir)/svr4
++ $(mkdir_p) $(distdir)/debian $(distdir)/freebsd $(distdir)/freebsd/i386 $(distdir)/linux $(distdir)/linux/alpha $(distdir)/linux/arm $(distdir)/linux/avr32 $(distdir)/linux/hppa $(distdir)/linux/ia64 $(distdir)/linux/m68k $(distdir)/linux/mips $(distdir)/linux/powerpc $(distdir)/linux/s390 $(distdir)/linux/s390x $(distdir)/linux/sh $(distdir)/linux/sh64 $(distdir)/linux/sparc $(distdir)/linux/sparc64 $(distdir)/linux/x86_64 $(distdir)/sunos4 $(distdir)/svr4
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+ list='$(DISTFILES)'; for file in $$list; do \
+diff --git a/config.guess b/config.guess
+old mode 100755
+new mode 100644
+index 8229471..951383e
+--- a/config.guess
++++ b/config.guess
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Attempt to guess a canonical system name.
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
++# Inc.
+
+-timestamp='2004-11-12'
++timestamp='2007-05-17'
+
+ # This file is free software; you can redistribute it and/or modify it
+ # under the terms of the GNU General Public License as published by
+@@ -17,13 +18,15 @@ timestamp='2004-11-12'
+ #
+ # 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.
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, USA.
+ #
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+ # the same distribution terms that you use for the rest of that program.
+
++
+ # Originally written by Per Bothner <per@bothner.com>.
+ # Please send patches to <config-patches@gnu.org>. Submit a context
+ # diff and a properly formatted ChangeLog entry.
+@@ -53,7 +56,7 @@ version="\
+ GNU config.guess ($timestamp)
+
+ Originally written by Per Bothner.
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+@@ -66,11 +69,11 @@ Try \`$me --help' for more information."
+ while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+- echo "$timestamp" ; exit 0 ;;
++ echo "$timestamp" ; exit ;;
+ --version | -v )
+- echo "$version" ; exit 0 ;;
++ echo "$version" ; exit ;;
+ --help | --h* | -h )
+- echo "$usage"; exit 0 ;;
++ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+@@ -104,7 +107,7 @@ set_cc_for_build='
+ trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+ : ${TMPDIR=/tmp} ;
+- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
++ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+@@ -123,7 +126,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+-esac ;'
++esac ; set_cc_for_build= ;'
+
+ # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+ # (ghazi@noc.rutgers.edu 1994-08-24)
+@@ -158,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
++ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+@@ -196,55 +200,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+- exit 0 ;;
+- amd64:OpenBSD:*:*)
+- echo x86_64-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- amiga:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- cats:OpenBSD:*:*)
+- echo arm-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- hp300:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- luna88k:OpenBSD:*:*)
+- echo m88k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mac68k:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- macppc:OpenBSD:*:*)
+- echo powerpc-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mvme68k:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mvme88k:OpenBSD:*:*)
+- echo m88k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- mvmeppc:OpenBSD:*:*)
+- echo powerpc-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- sgi:OpenBSD:*:*)
+- echo mips64-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
+- sun3:OpenBSD:*:*)
+- echo m68k-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:OpenBSD:*:*)
+- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+- exit 0 ;;
++ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
++ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
++ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
++ *:SolidBSD:*:*)
++ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
++ exit ;;
+ macppc:MirBSD:*:*)
+- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+- exit 0 ;;
++ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
++ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+@@ -297,40 +269,43 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+- exit 0 ;;
++ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+- exit 0 ;;
++ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+- exit 0 ;;
++ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+- exit 0;;
++ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+- exit 0 ;;
++ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+- exit 0 ;;
++ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+- exit 0 ;;
++ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+- exit 0 ;;
++ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+- exit 0 ;;
++ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+- exit 0;;
++ exit ;;
++ arm:riscos:*:*|arm:RISCOS:*:*)
++ echo arm-unknown-riscos
++ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+- exit 0;;
++ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+@@ -338,32 +313,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ else
+ echo pyramid-pyramid-bsd
+ fi
+- exit 0 ;;
++ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+- exit 0 ;;
++ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+- exit 0 ;;
++ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+- sparc) echo sparc-icl-nx7 && exit 0 ;;
++ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
++ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
+- i86pc:SunOS:5.*:*)
++ exit ;;
++ i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
++ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
++ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+@@ -372,10 +347,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+- exit 0 ;;
++ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+@@ -387,10 +362,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+- exit 0 ;;
++ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+@@ -401,40 +376,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+- exit 0 ;;
++ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -458,32 +433,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ exit (-1);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c \
+- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+- && exit 0
++ $CC_FOR_BUILD -o $dummy $dummy.c &&
++ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
++ SYSTEM_NAME=`$dummy $dummyarg` &&
++ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+- exit 0 ;;
++ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+- exit 0 ;;
++ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+- exit 0 ;;
++ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+- exit 0 ;;
++ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+- exit 0 ;;
++ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+- exit 0 ;;
++ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+- exit 0 ;;
++ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+@@ -499,29 +475,29 @@ EOF
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+- exit 0 ;;
++ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+- exit 0 ;;
++ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+- exit 0 ;;
++ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+- exit 0 ;;
++ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+- exit 0 ;;
++ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+- exit 0 ;;
++ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
++ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
++ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+- exit 0 ;;
++ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+@@ -529,7 +505,7 @@ EOF
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+- exit 0 ;;
++ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+@@ -544,14 +520,18 @@ EOF
+ exit(0);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+- echo rs6000-ibm-aix3.2.5
++ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
++ then
++ echo "$SYSTEM_NAME"
++ else
++ echo rs6000-ibm-aix3.2.5
++ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+- exit 0 ;;
++ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+@@ -565,28 +545,28 @@ EOF
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+- exit 0 ;;
++ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+- exit 0 ;;
++ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+- exit 0 ;;
++ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+- exit 0 ;; # report: romp-ibm BSD 4.3
++ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+- exit 0 ;;
++ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+- exit 0 ;;
++ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+- exit 0 ;;
++ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+- exit 0 ;;
++ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+@@ -648,9 +628,19 @@ EOF
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+- # avoid double evaluation of $set_cc_for_build
+- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
++ eval $set_cc_for_build
++
++ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
++ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
++ # generating 64-bit code. GNU and HP use different nomenclature:
++ #
++ # $ CC_FOR_BUILD=cc ./config.guess
++ # => hppa2.0w-hp-hpux11.23
++ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
++ # => hppa64-hp-hpux11.23
++
++ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
++ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+@@ -658,11 +648,11 @@ EOF
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+- exit 0 ;;
++ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+- exit 0 ;;
++ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -690,158 +680,182 @@ EOF
+ exit (0);
+ }
+ EOF
+- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
++ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
++ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+- exit 0 ;;
++ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+- exit 0 ;;
++ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+- exit 0 ;;
++ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+- exit 0 ;;
++ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+- exit 0 ;;
++ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+- exit 0 ;;
++ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+- exit 0 ;;
++ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+- exit 0 ;;
++ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+- exit 0 ;;
++ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+- exit 0 ;;
++ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+- exit 0 ;;
++ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+- exit 0 ;;
++ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+- exit 0 ;;
++ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+- exit 0 ;;
++ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+- exit 0 ;;
++ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+- exit 0 ;;
++ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:FreeBSD:*:*)
+- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+- exit 0 ;;
++ case ${UNAME_MACHINE} in
++ pc98)
++ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ amd64)
++ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ *)
++ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
++ esac
++ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+- exit 0 ;;
+- i*:MINGW*:*)
++ exit ;;
++ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+- exit 0 ;;
++ exit ;;
++ i*:windows32*:*)
++ # uname -m includes "-pc" on this system.
++ echo ${UNAME_MACHINE}-mingw32
++ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+- exit 0 ;;
+- x86:Interix*:[34]*)
+- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+- exit 0 ;;
++ exit ;;
++ *:Interix*:[3456]*)
++ case ${UNAME_MACHINE} in
++ x86)
++ echo i586-pc-interix${UNAME_RELEASE}
++ exit ;;
++ EM64T | authenticamd)
++ echo x86_64-unknown-interix${UNAME_RELEASE}
++ exit ;;
++ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+- exit 0 ;;
++ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+- exit 0 ;;
++ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+- exit 0 ;;
++ exit ;;
++ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
++ echo x86_64-unknown-cygwin
++ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+- exit 0 ;;
++ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+- exit 0 ;;
++ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+- exit 0 ;;
++ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+- exit 0 ;;
++ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+- exit 0 ;;
++ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
++ avr32*:Linux:*:*)
++ echo ${UNAME_MACHINE}-unknown-linux-gnu
++ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+- exit 0 ;;
++ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+- exit 0 ;;
++ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+@@ -858,8 +872,12 @@ EOF
+ #endif
+ #endif
+ EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^CPU/{
++ s: ::g
++ p
++ }'`"
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -877,15 +895,22 @@ EOF
+ #endif
+ #endif
+ EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^CPU/{
++ s: ::g
++ p
++ }'`"
++ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
++ or32:Linux:*:*)
++ echo or32-unknown-linux-gnu
++ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+@@ -899,7 +924,7 @@ EOF
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+- exit 0 ;;
++ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+@@ -907,25 +932,31 @@ EOF
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+- exit 0 ;;
++ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+- exit 0 ;;
++ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
++ vax:Linux:*:*)
++ echo ${UNAME_MACHINE}-dec-linux-gnu
++ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+- exit 0 ;;
++ exit ;;
++ xtensa:Linux:*:*)
++ echo xtensa-unknown-linux-gnu
++ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+@@ -943,15 +974,15 @@ EOF
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+- exit 0 ;;
++ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+- exit 0 ;;
++ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+- exit 0 ;;
++ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+@@ -968,7 +999,7 @@ EOF
+ LIBC=gnulibc1
+ # endif
+ #else
+- #ifdef __INTEL_COMPILER
++ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+@@ -978,16 +1009,23 @@ EOF
+ LIBC=dietlibc
+ #endif
+ EOF
+- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
++ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
++ /^LIBC/{
++ s: ::g
++ p
++ }'`"
++ test x"${LIBC}" != x && {
++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
++ exit
++ }
++ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+- exit 0 ;;
++ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+@@ -995,27 +1033,27 @@ EOF
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+- exit 0 ;;
++ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+- exit 0 ;;
++ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+- exit 0 ;;
++ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+- exit 0 ;;
+- i*86:syllable:*:*)
++ exit ;;
++ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+- exit 0 ;;
++ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+- exit 0 ;;
++ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+@@ -1023,15 +1061,16 @@ EOF
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+- exit 0 ;;
+- i*86:*:5:[78]*)
++ exit ;;
++ i*86:*:5:[678]*)
++ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+- exit 0 ;;
++ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+@@ -1049,73 +1088,73 @@ EOF
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+- exit 0 ;;
++ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+- exit 0 ;;
++ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+- exit 0 ;;
++ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+- exit 0 ;;
++ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+- exit 0 ;;
++ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+- exit 0 ;;
++ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+- exit 0 ;;
++ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+- exit 0 ;;
++ exit ;;
+ M68*:*:R3V[5678]*:*)
+- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
++ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
++ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
++ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+- && echo i486-ncr-sysv4 && exit 0 ;;
++ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+- exit 0 ;;
++ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+- exit 0 ;;
++ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+- exit 0 ;;
++ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+@@ -1123,69 +1162,81 @@ EOF
+ else
+ echo ns32k-sni-sysv
+ fi
+- exit 0 ;;
++ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+- exit 0 ;;
++ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+- exit 0 ;;
++ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+- exit 0 ;;
++ exit ;;
++ i*86:VOS:*:*)
++ # From Paul.Green@stratus.com.
++ echo ${UNAME_MACHINE}-stratus-vos
++ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+- exit 0 ;;
++ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+- exit 0 ;;
++ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+- exit 0 ;;
++ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+- exit 0 ;;
++ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+- exit 0 ;;
++ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+- exit 0 ;;
++ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
++ SX-7:SUPER-UX:*:*)
++ echo sx7-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-8:SUPER-UX:*:*)
++ echo sx8-nec-superux${UNAME_RELEASE}
++ exit ;;
++ SX-8R:SUPER-UX:*:*)
++ echo sx8r-nec-superux${UNAME_RELEASE}
++ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+- *86) UNAME_PROCESSOR=i686 ;;
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+@@ -1193,22 +1244,25 @@ EOF
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+- exit 0 ;;
++ exit ;;
++ NSE-?:NONSTOP_KERNEL:*:*)
++ echo nse-tandem-nsk${UNAME_RELEASE}
++ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+- exit 0 ;;
++ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+- exit 0 ;;
++ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+@@ -1219,41 +1273,47 @@ EOF
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+- exit 0 ;;
++ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+- exit 0 ;;
++ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+- exit 0 ;;
++ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+- exit 0 ;;
++ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+- exit 0 ;;
++ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+- exit 0 ;;
++ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+- exit 0 ;;
++ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+- exit 0 ;;
++ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+- exit 0 ;;
++ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+- A*) echo alpha-dec-vms && exit 0 ;;
+- I*) echo ia64-dec-vms && exit 0 ;;
+- V*) echo vax-dec-vms && exit 0 ;;
++ A*) echo alpha-dec-vms ; exit ;;
++ I*) echo ia64-dec-vms ; exit ;;
++ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+- exit 0 ;;
++ exit ;;
++ i*86:skyos:*:*)
++ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
++ exit ;;
++ i*86:rdos:*:*)
++ echo ${UNAME_MACHINE}-pc-rdos
++ exit ;;
+ esac
+
+ #echo '(No uname command or uname output not recognized.)' 1>&2
+@@ -1285,7 +1345,7 @@ main ()
+ #endif
+
+ #if defined (__arm) && defined (__acorn) && defined (__unix)
+- printf ("arm-acorn-riscix"); exit (0);
++ printf ("arm-acorn-riscix\n"); exit (0);
+ #endif
+
+ #if defined (hp300) && !defined (hpux)
+@@ -1374,11 +1434,12 @@ main ()
+ }
+ EOF
+
+-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
++$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
++ { echo "$SYSTEM_NAME"; exit; }
+
+ # Apollos put the system type in the environment.
+
+-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
++test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+ # Convex versions that predate uname can use getsysinfo(1)
+
+@@ -1387,22 +1448,22 @@ then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+- exit 0 ;;
++ exit ;;
+ c34*)
+ echo c34-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c38*)
+ echo c38-convex-bsd
+- exit 0 ;;
++ exit ;;
+ c4*)
+ echo c4-convex-bsd
+- exit 0 ;;
++ exit ;;
+ esac
+ fi
+
+@@ -1413,7 +1474,9 @@ This script, last modified $timestamp, has failed to recognize
+ the operating system you are using. It is advised that you
+ download the most up to date version of the config scripts from
+
+- ftp://ftp.gnu.org/pub/gnu/config/
++ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
++and
++ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+ If the version you run ($0) is already up to date, please
+ send the following data and any information you think might be
+diff --git a/config.h.in b/config.h.in
+index a2aeb2e..5778dc8 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -6,6 +6,9 @@
+ /* Define for the ARM architecture. */
+ #undef ARM
+
++/* Define for the AVR32 architecture. */
++#undef AVR32
++
+ /* Define for the FreeBSD operating system. */
+ #undef FREEBSD
+
+diff --git a/config.sub b/config.sub
+old mode 100755
+new mode 100644
+index 987b17d..c060f44
+--- a/config.sub
++++ b/config.sub
+@@ -1,9 +1,10 @@
+ #! /bin/sh
+ # Configuration validation subroutine script.
+ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+-# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
++# Inc.
+
+-timestamp='2004-11-30'
++timestamp='2007-04-29'
+
+ # This file is (in principle) common to ALL GNU software.
+ # The presence of a machine in this file suggests that SOME GNU software
+@@ -21,14 +22,15 @@ timestamp='2004-11-30'
+ #
+ # 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.
+-
++# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
++# 02110-1301, USA.
++#
+ # As a special exception to the GNU General Public License, if you
+ # distribute this file as part of a program that contains a
+ # configuration script generated by Autoconf, you may include it under
+ # the same distribution terms that you use for the rest of that program.
+
++
+ # Please send patches to <config-patches@gnu.org>. Submit a context
+ # diff and a properly formatted ChangeLog entry.
+ #
+@@ -70,7 +72,7 @@ Report bugs and patches to <config-patches@gnu.org>."
+ version="\
+ GNU config.sub ($timestamp)
+
+-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Free Software Foundation, Inc.
+
+ This is free software; see the source for copying conditions. There is NO
+@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
+ while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+- echo "$timestamp" ; exit 0 ;;
++ echo "$timestamp" ; exit ;;
+ --version | -v )
+- echo "$version" ; exit 0 ;;
++ echo "$version" ; exit ;;
+ --help | --h* | -h )
+- echo "$usage"; exit 0 ;;
++ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+@@ -99,7 +101,7 @@ while test $# -gt 0 ; do
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+- exit 0;;
++ exit ;;
+
+ * )
+ break ;;
+@@ -118,8 +120,9 @@ esac
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
++ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
++ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
++ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+@@ -170,6 +173,10 @@ case $os in
+ -hiux*)
+ os=-hiuxwe2
+ ;;
++ -sco6)
++ os=-sco5v6
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+@@ -186,6 +193,10 @@ case $os in
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
++ -sco5v6*)
++ # Don't forget version if it is 3.2v4 or newer.
++ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
++ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+@@ -230,14 +241,16 @@ case $basic_machine in
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
++ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+- | fr30 | frv \
++ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
++ | m32c | m32r | m32rle | m68000 | m68k | m88k \
++ | maxq | mb | microblaze | mcore | mep \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+@@ -246,6 +259,7 @@ case $basic_machine in
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
++ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+@@ -254,20 +268,24 @@ case $basic_machine in
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
++ | mt \
+ | msp430 \
++ | nios | nios2 \
+ | ns16k | ns32k \
+- | openrisc | or32 \
++ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
++ | score \
++ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+- | strongarm \
++ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
++ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
++ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
++ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+@@ -278,6 +296,9 @@ case $basic_machine in
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
++ ms1)
++ basic_machine=mt-unknown
++ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+@@ -297,18 +318,18 @@ case $basic_machine in
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+- | avr-* \
+- | bs2000-* \
++ | avr-* | avr32-* \
++ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
++ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+- | m32r-* | m32rle-* \
++ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+@@ -319,6 +340,7 @@ case $basic_machine in
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
++ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+@@ -327,23 +349,26 @@ case $basic_machine in
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
++ | mt-* \
+ | msp430-* \
++ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
++ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
++ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
++ | sparclite-* \
++ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
++ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+@@ -658,6 +683,10 @@ case $basic_machine in
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
++ mingw32ce)
++ basic_machine=arm-unknown
++ os=-mingw32ce
++ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+@@ -683,6 +712,9 @@ case $basic_machine in
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
++ ms1-*)
++ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
++ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+@@ -758,9 +790,8 @@ case $basic_machine in
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+- or32 | or32-*)
++ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+- os=-coff
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+@@ -791,6 +822,12 @@ case $basic_machine in
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
++ pc98)
++ basic_machine=i386-pc
++ ;;
++ pc98-*)
++ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
++ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+@@ -847,6 +884,10 @@ case $basic_machine in
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
++ rdos)
++ basic_machine=i386-pc
++ os=-rdos
++ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+@@ -873,6 +914,10 @@ case $basic_machine in
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
++ sde)
++ basic_machine=mipsisa32-sde
++ os=-elf
++ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+@@ -884,6 +929,9 @@ case $basic_machine in
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
++ sh5el)
++ basic_machine=sh5le-unknown
++ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+@@ -1086,13 +1134,10 @@ case $basic_machine in
+ we32k)
+ basic_machine=we32k-att
+ ;;
+- sh3 | sh4 | 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
+ ;;
+- sh64)
+- basic_machine=sh64-unknown
+- ;;
+- sparc | sparcv8 | sparcv9 | sparcv9b)
++ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+@@ -1165,20 +1210,23 @@ case $os in
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
++ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
++ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
++ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
++ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
++ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+@@ -1196,7 +1244,7 @@ case $os in
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+@@ -1330,6 +1378,12 @@ else
+ # system, and we'll never get to this point.
+
+ case $basic_machine in
++ score-*)
++ os=-elf
++ ;;
++ spu-*)
++ os=-elf
++ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+@@ -1339,9 +1393,9 @@ case $basic_machine in
+ arm*-semi)
+ os=-aout
+ ;;
+- c4x-* | tic4x-*)
+- os=-coff
+- ;;
++ c4x-* | tic4x-*)
++ os=-coff
++ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+@@ -1367,6 +1421,9 @@ case $basic_machine in
+ m68*-cisco)
+ os=-aout
+ ;;
++ mep-*)
++ os=-elf
++ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+@@ -1385,6 +1442,9 @@ case $basic_machine in
+ *-be)
+ os=-beos
+ ;;
++ *-haiku)
++ os=-haiku
++ ;;
+ *-ibm)
+ os=-aix
+ ;;
+@@ -1556,7 +1616,7 @@ case $basic_machine in
+ esac
+
+ echo $basic_machine$os
+-exit 0
++exit
+
+ # Local variables:
+ # eval: (add-hook 'write-file-hooks 'time-stamp)
+diff --git a/configure b/configure
+index e269669..37a9eff 100755
+--- a/configure
++++ b/configure
+@@ -1,25 +1,54 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.59 for strace 4.5.15.
++# Generated by GNU Autoconf 2.61 for strace 4.5.15.
+ #
+-# Copyright (C) 2003 Free Software Foundation, Inc.
++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
+ ## --------------------- ##
+ ## M4sh Initialization. ##
+ ## --------------------- ##
+
+-# Be Bourne compatible
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+- set -o posix
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in
++ *posix*) set -o posix ;;
++esac
++
++fi
++
++
++
++
++# PATH needs CR
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
+ fi
+-DUALCASE=1; export DUALCASE # for MKS sh
+
+ # Support unset when possible.
+ if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+@@ -29,8 +58,43 @@ else
+ fi
+
+
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++as_nl='
++'
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ { (exit 1); exit 1; }
++fi
++
+ # Work around bugs in pre-3.0 UWIN ksh.
+-$as_unset ENV MAIL MAILPATH
++for as_var in ENV MAIL MAILPATH
++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++done
+ PS1='$ '
+ PS2='> '
+ PS4='+ '
+@@ -44,18 +108,19 @@ do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+- $as_unset $as_var
++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+ done
+
+ # Required to use basename.
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+ else
+ as_basename=false
+@@ -63,157 +128,388 @@ fi
+
+
+ # Name of the executable.
+-as_me=`$as_basename "$0" ||
++as_me=`$as_basename -- "$0" ||
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+- X"$0" : 'X\(/\)$' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X/"$0" |
+- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+- /^X\/\(\/\/\)$/{ s//\1/; q; }
+- /^X\/\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+
++# CDPATH.
++$as_unset CDPATH
+
+-# PATH needs CR, and LINENO needs CR and PATH.
+-# Avoid depending upon Character Ranges.
+-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+-as_cr_digits='0123456789'
+-as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+-# The user is always right.
+-if test "${PATH_SEPARATOR+set}" != set; then
+- echo "#! /bin/sh" >conf$$.sh
+- echo "exit 0" >>conf$$.sh
+- chmod +x conf$$.sh
+- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+- PATH_SEPARATOR=';'
+- else
+- PATH_SEPARATOR=:
+- fi
+- rm -f conf$$.sh
++if test "x$CONFIG_SHELL" = x; then
++ if (eval ":") 2>/dev/null; then
++ as_have_required=yes
++else
++ as_have_required=no
+ fi
+
++ if test $as_have_required = yes && (eval ":
++(as_func_return () {
++ (exit \$1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
+
+- as_lineno_1=$LINENO
+- as_lineno_2=$LINENO
+- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+- test "x$as_lineno_1" != "x$as_lineno_2" &&
+- test "x$as_lineno_3" = "x$as_lineno_2" || {
+- # Find who we are. Look in the path if we contain no path at all
+- # relative or not.
+- case $0 in
+- *[\\/]* ) as_myself=$0 ;;
+- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+-done
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
+
+- ;;
+- esac
+- # We did not find ourselves, most probably we were run as `sh COMMAND'
+- # in which case we are not to be found in the path.
+- if test "x$as_myself" = x; then
+- as_myself=$0
+- fi
+- if test ! -f "$as_myself"; then
+- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+- { (exit 1); exit 1; }; }
+- fi
+- case $CONFIG_SHELL in
+- '')
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test \$exitcode = 0) || { (exit 1); exit 1; }
++
++(
++ as_lineno_1=\$LINENO
++ as_lineno_2=\$LINENO
++ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
++ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
++") 2> /dev/null; then
++ :
++else
++ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+- for as_base in sh bash ksh sh5; do
+- case $as_dir in
++ case $as_dir in
+ /*)
+- if ("$as_dir/$as_base" -c '
++ for as_base in sh bash ksh sh5; do
++ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
++ done;;
++ esac
++done
++IFS=$as_save_IFS
++
++
++ for as_shell in $as_candidate_shells $SHELL; do
++ # Try only shells that exist, to save several forks.
++ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
++ { ("$as_shell") 2> /dev/null <<\_ASEOF
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in
++ *posix*) set -o posix ;;
++esac
++
++fi
++
++
++:
++_ASEOF
++}; then
++ CONFIG_SHELL=$as_shell
++ as_have_required=yes
++ if { "$as_shell" 2> /dev/null <<\_ASEOF
++if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
++ emulate sh
++ NULLCMD=:
++ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
++ # is contrary to our usage. Disable this feature.
++ alias -g '${1+"$@"}'='"$@"'
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in
++ *posix*) set -o posix ;;
++esac
++
++fi
++
++
++:
++(as_func_return () {
++ (exit $1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = "$1" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test $exitcode = 0) || { (exit 1); exit 1; }
++
++(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+- CONFIG_SHELL=$as_dir/$as_base
+- export CONFIG_SHELL
+- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+- fi;;
+- esac
+- done
+-done
+-;;
+- esac
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
++
++_ASEOF
++}; then
++ break
++fi
++
++fi
++
++ done
++
++ if test "x$CONFIG_SHELL" != x; then
++ for as_var in BASH_ENV ENV
++ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++ done
++ export CONFIG_SHELL
++ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
++fi
++
++
++ if test $as_have_required = no; then
++ echo This script requires a shell more modern than all the
++ echo shells that I found on your system. Please install a
++ echo modern shell, or manually run the script under such a
++ echo shell if you do have one.
++ { (exit 1); exit 1; }
++fi
++
++
++fi
++
++fi
++
++
++
++(eval "as_func_return () {
++ (exit \$1)
++}
++as_func_success () {
++ as_func_return 0
++}
++as_func_failure () {
++ as_func_return 1
++}
++as_func_ret_success () {
++ return 0
++}
++as_func_ret_failure () {
++ return 1
++}
++
++exitcode=0
++if as_func_success; then
++ :
++else
++ exitcode=1
++ echo as_func_success failed.
++fi
++
++if as_func_failure; then
++ exitcode=1
++ echo as_func_failure succeeded.
++fi
++
++if as_func_ret_success; then
++ :
++else
++ exitcode=1
++ echo as_func_ret_success failed.
++fi
++
++if as_func_ret_failure; then
++ exitcode=1
++ echo as_func_ret_failure succeeded.
++fi
++
++if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
++ :
++else
++ exitcode=1
++ echo positional parameters were not saved.
++fi
++
++test \$exitcode = 0") || {
++ echo No shell found that supports shell functions.
++ echo Please tell autoconf@gnu.org about your system,
++ echo including any error possibly output before this
++ echo message
++}
++
++
++
++ as_lineno_1=$LINENO
++ as_lineno_2=$LINENO
++ test "x$as_lineno_1" != "x$as_lineno_2" &&
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+- # line-number line before each line; the second 'sed' does the real
+- # work. The second script uses 'N' to pair each line-number line
+- # with the numbered line, and appends trailing '-' during
+- # substitution so that $LINENO is not a special case at line end.
++ # line-number line after each line using $LINENO; the second 'sed'
++ # does the real work. The second script uses 'N' to pair each
++ # line-number line with the line containing $LINENO, and appends
++ # trailing '-' during substitution so that $LINENO is not a special
++ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+- sed '=' <$as_myself |
++ # scripts with optimization help from Paolo Bonzini. Blame Lee
++ # E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
+ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
+ N
+- s,$,-,
+- : loop
+- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+- s,-$,,
+- s,^['$as_cr_digits']*\n,,
++ s/-\n.*//
+ ' >$as_me.lineno &&
+- chmod +x $as_me.lineno ||
++ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+- # original and so on. Autoconf is especially sensible to this).
+- . ./$as_me.lineno
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+ }
+
+
+-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+- *c*,-n*) ECHO_N= ECHO_C='
+-' ECHO_T=' ' ;;
+- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in
++-n*)
++ case `echo 'x\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ *) ECHO_C='\c';;
++ esac;;
++*)
++ ECHO_N='-n';;
+ esac
+
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+ rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir
++fi
+ echo >conf$$.file
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+- # We could just check for DJGPP; but this test a) works b) is more generic
+- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+- if test -f conf$$.exe; then
+- # Don't use ln at all; we don't have any links
++ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+- else
+- as_ln_s='ln -s'
+- fi
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+-rm -f conf$$ conf$$.exe conf$$.file
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
+
+ if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+@@ -222,7 +518,28 @@ else
+ as_mkdir_p=false
+ fi
+
+-as_executable_p="test -f"
++if test -x / >/dev/null 2>&1; then
++ as_test_x='test -x'
++else
++ if ls -dL / >/dev/null 2>&1; then
++ as_ls_L_option=L
++ else
++ as_ls_L_option=
++ fi
++ as_test_x='
++ eval sh -c '\''
++ if test -d "$1"; then
++ test -d "$1/.";
++ else
++ case $1 in
++ -*)set "./$1";;
++ esac;
++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
++ ???[sx]*):;;*)false;;esac;fi
++ '\'' sh
++ '
++fi
++as_executable_p=$as_test_x
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -231,39 +548,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+-# IFS
+-# We need space, tab and new line, in precisely that order.
+-as_nl='
+-'
+-IFS=" $as_nl"
+-
+-# CDPATH.
+-$as_unset CDPATH
+
++exec 7<&0 </dev/null 6>&1
+
+ # Name of the host.
+ # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+ # so uname gets run too.
+ ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+-exec 6>&1
+-
+ #
+ # Initializations.
+ #
+ ac_default_prefix=/usr/local
++ac_clean_files=
+ ac_config_libobj_dir=.
++LIBOBJS=
+ cross_compiling=no
+ subdirs=
+ MFLAGS=
+ MAKEFLAGS=
+ SHELL=${CONFIG_SHELL-/bin/sh}
+
+-# Maximum number of lines to put in a shell here document.
+-# This variable seems obsolete. It should probably be removed, and
+-# only ac_max_sed_lines should be used.
+-: ${ac_max_here_lines=38}
+-
+ # Identity of this package.
+ PACKAGE_NAME='strace'
+ PACKAGE_TARNAME='strace'
+@@ -275,42 +580,156 @@ ac_unique_file="strace.c"
+ # Factoring default headers for most tests.
+ ac_includes_default="\
+ #include <stdio.h>
+-#if HAVE_SYS_TYPES_H
++#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+-#if HAVE_SYS_STAT_H
++#ifdef HAVE_SYS_STAT_H
+ # include <sys/stat.h>
+ #endif
+-#if STDC_HEADERS
++#ifdef STDC_HEADERS
+ # include <stdlib.h>
+ # include <stddef.h>
+ #else
+-# if HAVE_STDLIB_H
++# ifdef HAVE_STDLIB_H
+ # include <stdlib.h>
+ # endif
+ #endif
+-#if HAVE_STRING_H
+-# if !STDC_HEADERS && HAVE_MEMORY_H
++#ifdef HAVE_STRING_H
++# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+ # include <memory.h>
+ # endif
+ # include <string.h>
+ #endif
+-#if HAVE_STRINGS_H
++#ifdef HAVE_STRINGS_H
+ # include <strings.h>
+ #endif
+-#if HAVE_INTTYPES_H
++#ifdef HAVE_INTTYPES_H
+ # include <inttypes.h>
+-#else
+-# if HAVE_STDINT_H
+-# include <stdint.h>
+-# endif
+ #endif
+-#if HAVE_UNISTD_H
++#ifdef HAVE_STDINT_H
++# include <stdint.h>
++#endif
++#ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif"
+
+-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os opsys arch LINUX_TRUE LINUX_FALSE I386_TRUE I386_FALSE X86_64_TRUE X86_64_FALSE SUNOS4_TRUE SUNOS4_FALSE SVR4_TRUE SVR4_FALSE FREEBSD_TRUE FREEBSD_FALSE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE WARNFLAGS CPP EGREP PERL LIBOBJS LTLIBOBJS'
++ac_subst_vars='SHELL
++PATH_SEPARATOR
++PACKAGE_NAME
++PACKAGE_TARNAME
++PACKAGE_VERSION
++PACKAGE_STRING
++PACKAGE_BUGREPORT
++exec_prefix
++prefix
++program_transform_name
++bindir
++sbindir
++libexecdir
++datarootdir
++datadir
++sysconfdir
++sharedstatedir
++localstatedir
++includedir
++oldincludedir
++docdir
++infodir
++htmldir
++dvidir
++pdfdir
++psdir
++libdir
++localedir
++mandir
++DEFS
++ECHO_C
++ECHO_N
++ECHO_T
++LIBS
++build_alias
++host_alias
++target_alias
++INSTALL_PROGRAM
++INSTALL_SCRIPT
++INSTALL_DATA
++CYGPATH_W
++PACKAGE
++VERSION
++ACLOCAL
++AUTOCONF
++AUTOMAKE
++AUTOHEADER
++MAKEINFO
++install_sh
++STRIP
++INSTALL_STRIP_PROGRAM
++mkdir_p
++AWK
++SET_MAKE
++am__leading_dot
++AMTAR
++am__tar
++am__untar
++MAINTAINER_MODE_TRUE
++MAINTAINER_MODE_FALSE
++MAINT
++build
++build_cpu
++build_vendor
++build_os
++host
++host_cpu
++host_vendor
++host_os
++opsys
++arch
++LINUX_TRUE
++LINUX_FALSE
++I386_TRUE
++I386_FALSE
++X86_64_TRUE
++X86_64_FALSE
++SUNOS4_TRUE
++SUNOS4_FALSE
++SVR4_TRUE
++SVR4_FALSE
++FREEBSD_TRUE
++FREEBSD_FALSE
++CC
++CFLAGS
++LDFLAGS
++CPPFLAGS
++ac_ct_CC
++EXEEXT
++OBJEXT
++DEPDIR
++am__include
++am__quote
++AMDEP_TRUE
++AMDEP_FALSE
++AMDEPBACKSLASH
++CCDEPMODE
++am__fastdepCC_TRUE
++am__fastdepCC_FALSE
++WARNFLAGS
++CPP
++GREP
++EGREP
++PERL
++LIBOBJS
++LTLIBOBJS'
+ ac_subst_files=''
++ ac_precious_vars='build_alias
++host_alias
++target_alias
++CC
++CFLAGS
++LDFLAGS
++LIBS
++CPPFLAGS
++CPP'
++
+
+ # Initialize some variables set by options.
+ ac_init_help=
+@@ -337,34 +756,48 @@ x_libraries=NONE
+ # and all the variables that are supposed to be based on exec_prefix
+ # by default will actually change.
+ # Use braces instead of parens because sh, perl, etc. also accept them.
++# (The list follows the same order as the GNU Coding Standards.)
+ bindir='${exec_prefix}/bin'
+ sbindir='${exec_prefix}/sbin'
+ libexecdir='${exec_prefix}/libexec'
+-datadir='${prefix}/share'
++datarootdir='${prefix}/share'
++datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
+-libdir='${exec_prefix}/lib'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+-infodir='${prefix}/info'
+-mandir='${prefix}/man'
++docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
++infodir='${datarootdir}/info'
++htmldir='${docdir}'
++dvidir='${docdir}'
++pdfdir='${docdir}'
++psdir='${docdir}'
++libdir='${exec_prefix}/lib'
++localedir='${datarootdir}/locale'
++mandir='${datarootdir}/man'
+
+ ac_prev=
++ac_dashdash=
+ for ac_option
+ do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+- eval "$ac_prev=\$ac_option"
++ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
++ case $ac_option in
++ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
++ *) ac_optarg=yes ;;
++ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+- case $ac_option in
++ case $ac_dashdash$ac_option in
++ --)
++ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+@@ -386,33 +819,45 @@ do
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
++ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+- | --da=*)
++ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
++ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
++ | --dataroo | --dataro | --datar)
++ ac_prev=datarootdir ;;
++ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
++ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
++ datarootdir=$ac_optarg ;;
++
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+- eval "enable_$ac_feature=no" ;;
++ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
++ eval enable_$ac_feature=no ;;
++
++ -docdir | --docdir | --docdi | --doc | --do)
++ ac_prev=docdir ;;
++ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
++ docdir=$ac_optarg ;;
++
++ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
++ ac_prev=dvidir ;;
++ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
++ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+- case $ac_option in
+- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+- *) ac_optarg=yes ;;
+- esac
+- eval "enable_$ac_feature='$ac_optarg'" ;;
++ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
++ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+@@ -439,6 +884,12 @@ do
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
++ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
++ ac_prev=htmldir ;;
++ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
++ | --ht=*)
++ htmldir=$ac_optarg ;;
++
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+@@ -463,13 +914,16 @@ do
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
++ -localedir | --localedir | --localedi | --localed | --locale)
++ ac_prev=localedir ;;
++ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
++ localedir=$ac_optarg ;;
++
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+- | --localstate | --localstat | --localsta | --localst \
+- | --locals | --local | --loca | --loc | --lo)
++ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
++ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+@@ -534,6 +988,16 @@ do
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
++ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
++ ac_prev=pdfdir ;;
++ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
++ pdfdir=$ac_optarg ;;
++
++ -psdir | --psdir | --psdi | --psd | --ps)
++ ac_prev=psdir ;;
++ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
++ psdir=$ac_optarg ;;
++
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+@@ -586,24 +1050,20 @@ do
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+- ac_package=`echo $ac_package| sed 's/-/_/g'`
+- case $ac_option in
+- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+- *) ac_optarg=yes ;;
+- esac
+- eval "with_$ac_package='$ac_optarg'" ;;
++ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
++ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
++ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+- ac_package=`echo $ac_package | sed 's/-/_/g'`
+- eval "with_$ac_package=no" ;;
++ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
++ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+@@ -634,8 +1094,7 @@ Try \`$0 --help' for more information." >&2
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+- eval "$ac_envvar='$ac_optarg'"
++ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+@@ -655,27 +1114,19 @@ if test -n "$ac_prev"; then
+ { (exit 1); exit 1; }; }
+ fi
+
+-# Be sure to have absolute paths.
+-for ac_var in exec_prefix prefix
++# Be sure to have absolute directory names.
++for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
++ datadir sysconfdir sharedstatedir localstatedir includedir \
++ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
++ libdir localedir mandir
+ do
+- eval ac_val=$`echo $ac_var`
++ eval ac_val=\$$ac_var
+ case $ac_val in
+- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+- { (exit 1); exit 1; }; };;
+- esac
+-done
+-
+-# Be sure to have absolute paths.
+-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+- localstatedir libdir includedir oldincludedir infodir mandir
+-do
+- eval ac_val=$`echo $ac_var`
+- case $ac_val in
+- [\\/$]* | ?:[\\/]* ) ;;
+- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+- { (exit 1); exit 1; }; };;
++ [\\/$]* | ?:[\\/]* ) continue;;
++ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
++ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
++ { (exit 1); exit 1; }; }
+ done
+
+ # There might be people who depend on the old broken behavior: `$host'
+@@ -702,74 +1153,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
+ test "$silent" = yes && exec 6>/dev/null
+
+
++ac_pwd=`pwd` && test -n "$ac_pwd" &&
++ac_ls_di=`ls -di .` &&
++ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
++ { echo "$as_me: error: Working directory cannot be determined" >&2
++ { (exit 1); exit 1; }; }
++test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
++ { echo "$as_me: error: pwd does not report name of working directory" >&2
++ { (exit 1); exit 1; }; }
++
++
+ # Find the source files, if location was not specified.
+ if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+- # Try the directory containing this script, then its parent.
+- ac_confdir=`(dirname "$0") 2>/dev/null ||
++ # Try the directory containing this script, then the parent directory.
++ ac_confdir=`$as_dirname -- "$0" ||
+ $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+- X"$0" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$0" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+ srcdir=$ac_confdir
+- if test ! -r $srcdir/$ac_unique_file; then
++ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+ else
+ ac_srcdir_defaulted=no
+ fi
+-if test ! -r $srcdir/$ac_unique_file; then
+- if test "$ac_srcdir_defaulted" = yes; then
+- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
++if test ! -r "$srcdir/$ac_unique_file"; then
++ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
++ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+- else
+- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+- { (exit 1); exit 1; }; }
+- fi
+ fi
+-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
++ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
++ac_abs_confdir=`(
++ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+-ac_env_build_alias_set=${build_alias+set}
+-ac_env_build_alias_value=$build_alias
+-ac_cv_env_build_alias_set=${build_alias+set}
+-ac_cv_env_build_alias_value=$build_alias
+-ac_env_host_alias_set=${host_alias+set}
+-ac_env_host_alias_value=$host_alias
+-ac_cv_env_host_alias_set=${host_alias+set}
+-ac_cv_env_host_alias_value=$host_alias
+-ac_env_target_alias_set=${target_alias+set}
+-ac_env_target_alias_value=$target_alias
+-ac_cv_env_target_alias_set=${target_alias+set}
+-ac_cv_env_target_alias_value=$target_alias
+-ac_env_CC_set=${CC+set}
+-ac_env_CC_value=$CC
+-ac_cv_env_CC_set=${CC+set}
+-ac_cv_env_CC_value=$CC
+-ac_env_CFLAGS_set=${CFLAGS+set}
+-ac_env_CFLAGS_value=$CFLAGS
+-ac_cv_env_CFLAGS_set=${CFLAGS+set}
+-ac_cv_env_CFLAGS_value=$CFLAGS
+-ac_env_LDFLAGS_set=${LDFLAGS+set}
+-ac_env_LDFLAGS_value=$LDFLAGS
+-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+-ac_cv_env_LDFLAGS_value=$LDFLAGS
+-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+-ac_env_CPPFLAGS_value=$CPPFLAGS
+-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+-ac_env_CPP_set=${CPP+set}
+-ac_env_CPP_value=$CPP
+-ac_cv_env_CPP_set=${CPP+set}
+-ac_cv_env_CPP_value=$CPP
++ pwd)`
++# When building in place, set srcdir=.
++if test "$ac_abs_confdir" = "$ac_pwd"; then
++ srcdir=.
++fi
++# Remove unnecessary trailing slashes from srcdir.
++# Double slashes in file names in object file debugging info
++# mess up M-x gdb in Emacs.
++case $srcdir in
++*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
++esac
++for ac_var in $ac_precious_vars; do
++ eval ac_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_env_${ac_var}_value=\$${ac_var}
++ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
++ eval ac_cv_env_${ac_var}_value=\$${ac_var}
++done
+
+ #
+ # Report the --help message.
+@@ -798,9 +1251,6 @@ Configuration:
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+-_ACEOF
+-
+- cat <<_ACEOF
+ Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+@@ -818,15 +1268,22 @@ Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+- --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+- --infodir=DIR info documentation [PREFIX/info]
+- --mandir=DIR man documentation [PREFIX/man]
++ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
++ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
++ --infodir=DIR info documentation [DATAROOTDIR/info]
++ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
++ --mandir=DIR man documentation [DATAROOTDIR/man]
++ --docdir=DIR documentation root [DATAROOTDIR/doc/strace]
++ --htmldir=DIR html documentation [DOCDIR]
++ --dvidir=DIR dvi documentation [DOCDIR]
++ --pdfdir=DIR pdf documentation [DOCDIR]
++ --psdir=DIR ps documentation [DOCDIR]
+ _ACEOF
+
+ cat <<\_ACEOF
+@@ -861,128 +1318,95 @@ Some influential environment variables:
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+- headers in a nonstandard directory <include dir>
++ LIBS libraries to pass to the linker, e.g. -l<library>
++ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
++ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+ Use these variables to override the choices made by `configure' or to help
+ it to find libraries and programs with nonstandard names/locations.
+
+ _ACEOF
++ac_status=$?
+ fi
+
+ if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+- ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+- test -d $ac_dir || continue
++ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+-if test "$ac_dir" != .; then
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+- # A "../" for each directory in $ac_dir_suffix.
+- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+-else
+- ac_dir_suffix= ac_top_builddir=
+-fi
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
+
+ case $srcdir in
+- .) # No --srcdir option. We are building in place.
++ .) # We are building in place.
+ ac_srcdir=.
+- if test -z "$ac_top_builddir"; then
+- ac_top_srcdir=.
+- else
+- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+- fi ;;
+- [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+- ac_top_srcdir=$srcdir ;;
+- *) # Relative path.
+- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+- ac_top_srcdir=$ac_top_builddir$srcdir ;;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ esac
+-
+-# Do not use `cd foo && pwd` to compute absolute paths, because
+-# the directories may not exist.
+-case `pwd` in
+-.) ac_abs_builddir="$ac_dir";;
+-*)
+- case "$ac_dir" in
+- .) ac_abs_builddir=`pwd`;;
+- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+- *) ac_abs_builddir=`pwd`/"$ac_dir";;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_builddir=${ac_top_builddir}.;;
+-*)
+- case ${ac_top_builddir}. in
+- .) ac_abs_top_builddir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_srcdir=$ac_srcdir;;
+-*)
+- case $ac_srcdir in
+- .) ac_abs_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_srcdir=$ac_top_srcdir;;
+-*)
+- case $ac_top_srcdir in
+- .) ac_abs_top_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+- esac;;
+-esac
+-
+- cd $ac_dir
+- # Check for guested configure; otherwise get Cygnus style configure.
+- if test -f $ac_srcdir/configure.gnu; then
+- echo
+- $SHELL $ac_srcdir/configure.gnu --help=recursive
+- elif test -f $ac_srcdir/configure; then
+- echo
+- $SHELL $ac_srcdir/configure --help=recursive
+- elif test -f $ac_srcdir/configure.ac ||
+- test -f $ac_srcdir/configure.in; then
+- echo
+- $ac_configure --help
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
++
++ cd "$ac_dir" || { ac_status=$?; continue; }
++ # Check for guested configure.
++ if test -f "$ac_srcdir/configure.gnu"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
++ elif test -f "$ac_srcdir/configure"; then
++ echo &&
++ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+- fi
+- cd $ac_popdir
++ fi || ac_status=$?
++ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+ fi
+
+-test -n "$ac_init_help" && exit 0
++test -n "$ac_init_help" && exit $ac_status
+ if $ac_init_version; then
+ cat <<\_ACEOF
+ strace configure 4.5.15
+-generated by GNU Autoconf 2.59
++generated by GNU Autoconf 2.61
+
+-Copyright (C) 2003 Free Software Foundation, Inc.
++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
++2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+- exit 0
++ exit
+ fi
+-exec 5>config.log
+-cat >&5 <<_ACEOF
++cat >config.log <<_ACEOF
+ This file contains any messages produced by compilers while
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by strace $as_me 4.5.15, which was
+-generated by GNU Autoconf 2.59. Invocation command line was
++generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+ _ACEOF
++exec 5>>config.log
+ {
+ cat <<_ASUNAME
+ ## --------- ##
+@@ -1001,7 +1425,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
+ /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+ /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+ /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
++/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+ /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+ /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+ /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+@@ -1015,6 +1439,7 @@ do
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+ done
++IFS=$as_save_IFS
+
+ } >&5
+
+@@ -1036,7 +1461,6 @@ _ACEOF
+ ac_configure_args=
+ ac_configure_args0=
+ ac_configure_args1=
+-ac_sep=
+ ac_must_keep_next=false
+ for ac_pass in 1 2
+ do
+@@ -1047,7 +1471,7 @@ do
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
++ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+@@ -1069,9 +1493,7 @@ do
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+- # Get rid of the leading space.
+- ac_sep=" "
++ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+@@ -1082,8 +1504,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_
+ # When interrupted or exit'd, cleanup temporary files, and complete
+ # config.log. We remove comments because anyway the quotes in there
+ # would cause problems or look ugly.
+-# WARNING: Be sure not to use single quotes in there, as some shells,
+-# such as our DU 5.0 friend, will then `close' the trap.
++# WARNING: Use '\'' to represent an apostrophe within the trap.
++# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+ trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+@@ -1096,20 +1518,34 @@ trap 'exit_status=$?
+ _ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+-{
++(
++ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ *) $as_unset $ac_var ;;
++ esac ;;
++ esac
++ done
+ (set) 2>&1 |
+- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+- *ac_space=\ *)
++ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
+ sed -n \
+- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+- ;;
++ "s/'\''/'\''\\\\'\'''\''/g;
++ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
++ ;; #(
+ *)
+- sed -n \
+- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+- esac;
+-}
++ esac |
++ sort
++)
+ echo
+
+ cat <<\_ASBOX
+@@ -1120,22 +1556,28 @@ _ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+- eval ac_val=$`echo $ac_var`
+- echo "$ac_var='"'"'$ac_val'"'"'"
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+-## ------------- ##
+-## Output files. ##
+-## ------------- ##
++## ------------------- ##
++## File substitutions. ##
++## ------------------- ##
+ _ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+- eval ac_val=$`echo $ac_var`
+- echo "$ac_var='"'"'$ac_val'"'"'"
++ eval ac_val=\$$ac_var
++ case $ac_val in
++ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
++ esac
++ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+@@ -1147,26 +1589,24 @@ _ASBOX
+ ## ----------- ##
+ _ASBOX
+ echo
+- sed "/^$/d" confdefs.h | sort
++ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+- rm -f core *.core &&
+- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
++ rm -f core *.core core.conftest.* &&
++ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+- ' 0
++' 0
+ for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+ done
+ ac_signal=0
+
+ # confdefs.h avoids OS command line length limits that DEFS can exceed.
+-rm -rf conftest* confdefs.h
+-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+-echo >confdefs.h
++rm -f -r conftest* confdefs.h
+
+ # Predefined preprocessor variables.
+
+@@ -1197,14 +1637,17 @@ _ACEOF
+
+ # Let the site file select an alternate cache file if it wants to.
+ # Prefer explicitly selected file to automatically selected ones.
+-if test -z "$CONFIG_SITE"; then
+- if test "x$prefix" != xNONE; then
+- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+- else
+- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+- fi
++if test -n "$CONFIG_SITE"; then
++ set x "$CONFIG_SITE"
++elif test "x$prefix" != xNONE; then
++ set x "$prefix/share/config.site" "$prefix/etc/config.site"
++else
++ set x "$ac_default_prefix/share/config.site" \
++ "$ac_default_prefix/etc/config.site"
+ fi
+-for ac_site_file in $CONFIG_SITE; do
++shift
++for ac_site_file
++do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+ echo "$as_me: loading site script $ac_site_file" >&6;}
+@@ -1220,8 +1663,8 @@ if test -r "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+ echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+- [\\/]* | ?:[\\/]* ) . $cache_file;;
+- *) . ./$cache_file;;
++ [\\/]* | ?:[\\/]* ) . "$cache_file";;
++ *) . "./$cache_file";;
+ esac
+ fi
+ else
+@@ -1233,12 +1676,11 @@ fi
+ # Check that the precious variables saved in the cache have kept the same
+ # value.
+ ac_cache_corrupted=false
+-for ac_var in `(set) 2>&1 |
+- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
++for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+- eval ac_new_val="\$ac_env_${ac_var}_value"
++ eval ac_old_val=\$ac_cv_env_${ac_var}_value
++ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+@@ -1263,8 +1705,7 @@ echo "$as_me: current value: $ac_new_val" >&2;}
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
++ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+@@ -1281,12 +1722,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov
+ { (exit 1); exit 1; }; }
+ fi
+
+-ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
+-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-
+
+
+
+@@ -1311,36 +1746,47 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
++ac_ext=c
++ac_cpp='$CPP $CPPFLAGS'
++ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
++ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+- ac_config_headers="$ac_config_headers config.h"
++ac_config_headers="$ac_config_headers config.h"
+
+ am__api_version="1.9"
+ ac_aux_dir=
+-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+- if test -f $ac_dir/install-sh; then
++for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
++ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+- elif test -f $ac_dir/install.sh; then
++ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+- elif test -f $ac_dir/shtool; then
++ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+ done
+ if test -z "$ac_aux_dir"; then
+- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+-echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
++ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
++echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
++
++# These three variables are undocumented and unsupported,
++# and are intended to be withdrawn in a future Autoconf release.
++# They can cause serious problems if a builder's source tree is in a directory
++# whose full name contains unusual characters.
++ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
++ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
++ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
++
+
+ # Find a good install program. We prefer a C program (faster),
+ # so one script is as good as another. But avoid the broken or
+@@ -1355,8 +1801,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # OS/2's system install, which has a completely different semantic
+ # ./install, which can be erroneously created by make from ./install.sh.
+-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+ if test -z "$INSTALL"; then
+ if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -1378,7 +1824,7 @@ case $as_dir/ in
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+@@ -1397,21 +1843,22 @@ case $as_dir/ in
+ ;;
+ esac
+ done
++IFS=$as_save_IFS
+
+
+ fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+- # As a last resort, use the slow shell script. We don't cache a
+- # path for INSTALL within a source directory, because that will
++ # As a last resort, use the slow shell script. Don't cache a
++ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+- # removed, or if the path is relative.
++ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $INSTALL" >&5
+-echo "${ECHO_T}$INSTALL" >&6
++{ echo "$as_me:$LINENO: result: $INSTALL" >&5
++echo "${ECHO_T}$INSTALL" >&6; }
+
+ # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+ # It thinks the first close brace ends the variable substitution.
+@@ -1421,8 +1868,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
++echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+ # Just in case
+ sleep 1
+ echo timestamp > conftest.file
+@@ -1464,20 +1911,20 @@ echo "$as_me: error: newly created file is older than distributed files!
+ Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+-echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++{ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+ test "$program_prefix" != NONE &&
+- program_transform_name="s,^,$program_prefix,;$program_transform_name"
++ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+ # Use a double $ so make ignores it.
+ test "$program_suffix" != NONE &&
+- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
++ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+ # Double any \ or $. echo might interpret backslashes.
+ # By default was `s,x,x', remove it if useless.
+ cat <<\_ACEOF >conftest.sed
+ s/[\\$]/&&/g;s/;s,x,x,$//
+ _ACEOF
+ program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+-rm conftest.sed
++rm -f conftest.sed
+
+ # expand $ac_aux_dir to an absolute path
+ am_aux_dir=`cd $ac_aux_dir && pwd`
+@@ -1529,8 +1976,8 @@ for ac_prog in gawk mawk nawk awk
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1543,54 +1990,57 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ AWK=$ac_cv_prog_AWK
+ if test -n "$AWK"; then
+- echo "$as_me:$LINENO: result: $AWK" >&5
+-echo "${ECHO_T}$AWK" >&6
++ { echo "$as_me:$LINENO: result: $AWK" >&5
++echo "${ECHO_T}$AWK" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$AWK" && break
+ done
+
+-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
++echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
++set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
++if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.make <<\_ACEOF
++SHELL = /bin/sh
+ all:
+- @echo 'ac_maketemp="$(MAKE)"'
++ @echo '@@@%%%=$(MAKE)=@@@%%%'
+ _ACEOF
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+-if test -n "$ac_maketemp"; then
+- eval ac_cv_prog_make_${ac_make}_set=yes
+-else
+- eval ac_cv_prog_make_${ac_make}_set=no
+-fi
++case `${MAKE-make} -f conftest.make 2>/dev/null` in
++ *@@@%%%=?*=@@@%%%*)
++ eval ac_cv_prog_make_${ac_make}_set=yes;;
++ *)
++ eval ac_cv_prog_make_${ac_make}_set=no;;
++esac
+ rm -f conftest.make
+ fi
+-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+ SET_MAKE=
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+ fi
+
+@@ -1661,8 +2111,8 @@ if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}strip; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1675,32 +2125,34 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ STRIP=$ac_cv_prog_STRIP
+ if test -n "$STRIP"; then
+- echo "$as_me:$LINENO: result: $STRIP" >&5
+-echo "${ECHO_T}$STRIP" >&6
++ { echo "$as_me:$LINENO: result: $STRIP" >&5
++echo "${ECHO_T}$STRIP" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ fi
+ if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+ set dummy strip; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -1713,27 +2165,41 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+ fi
+ fi
+ ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+ if test -n "$ac_ct_STRIP"; then
+- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+-echo "${ECHO_T}$ac_ct_STRIP" >&6
++ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
++echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
+- STRIP=$ac_ct_STRIP
++ if test "x$ac_ct_STRIP" = x; then
++ STRIP=":"
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf@gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf@gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ STRIP=$ac_ct_STRIP
++ fi
+ else
+ STRIP="$ac_cv_prog_STRIP"
+ fi
+@@ -1753,17 +2219,17 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
++{ echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
++echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; }
++ # Check whether --enable-maintainer-mode was given.
+ if test "${enable_maintainer_mode+set}" = set; then
+- enableval="$enable_maintainer_mode"
+- USE_MAINTAINER_MODE=$enableval
++ enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+ else
+ USE_MAINTAINER_MODE=no
+-fi;
+- echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
++fi
++
++ { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
++echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; }
+
+
+ if test $USE_MAINTAINER_MODE = yes; then
+@@ -1778,62 +2244,91 @@ fi
+
+
+ # Make sure we can run config.sub.
+-$ac_config_sub sun4 >/dev/null 2>&1 ||
+- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
++$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
++ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
++echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+-echo "$as_me:$LINENO: checking build system type" >&5
+-echo $ECHO_N "checking build system type... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking build system type" >&5
++echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+ if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_cv_build_alias=$build_alias
+-test -z "$ac_cv_build_alias" &&
+- ac_cv_build_alias=`$ac_config_guess`
+-test -z "$ac_cv_build_alias" &&
++ ac_build_alias=$build_alias
++test "x$ac_build_alias" = x &&
++ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
++test "x$ac_build_alias" = x &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+ echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
++ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+-echo "${ECHO_T}$ac_cv_build" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
++echo "${ECHO_T}$ac_cv_build" >&6; }
++case $ac_cv_build in
++*-*-*) ;;
++*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
++echo "$as_me: error: invalid value of canonical build" >&2;}
++ { (exit 1); exit 1; }; };;
++esac
+ build=$ac_cv_build
+-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+-
+-
+-echo "$as_me:$LINENO: checking host system type" >&5
+-echo $ECHO_N "checking host system type... $ECHO_C" >&6
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_build
++shift
++build_cpu=$1
++build_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++build_os=$*
++IFS=$ac_save_IFS
++case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
++
++
++{ echo "$as_me:$LINENO: checking host system type" >&5
++echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+ if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_cv_host_alias=$host_alias
+-test -z "$ac_cv_host_alias" &&
+- ac_cv_host_alias=$ac_cv_build_alias
+-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
++ if test "x$host_alias" = x; then
++ ac_cv_host=$ac_cv_build
++else
++ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
++ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
++echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
++fi
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+-echo "${ECHO_T}$ac_cv_host" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
++echo "${ECHO_T}$ac_cv_host" >&6; }
++case $ac_cv_host in
++*-*-*) ;;
++*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
++echo "$as_me: error: invalid value of canonical host" >&2;}
++ { (exit 1); exit 1; }; };;
++esac
+ host=$ac_cv_host
+-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+-
+-
+-
+-echo "$as_me:$LINENO: checking for supported operating system" >&5
+-echo $ECHO_N "checking for supported operating system... $ECHO_C" >&6
++ac_save_IFS=$IFS; IFS='-'
++set x $ac_cv_host
++shift
++host_cpu=$1
++host_vendor=$2
++shift; shift
++# Remember, the first character of IFS is used to create $*,
++# except with old shells:
++host_os=$*
++IFS=$ac_save_IFS
++case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
++
++
++
++{ echo "$as_me:$LINENO: checking for supported operating system" >&5
++echo $ECHO_N "checking for supported operating system... $ECHO_C" >&6; }
+ case "$host_os" in
+ linux*)
+ opsys=linux
+@@ -1884,18 +2379,18 @@ _ACEOF
+
+ ;;
+ *)
+- echo "$as_me:$LINENO: result: NO!" >&5
+-echo "${ECHO_T}NO!" >&6
++ { echo "$as_me:$LINENO: result: NO!" >&5
++echo "${ECHO_T}NO!" >&6; }
+ { { echo "$as_me:$LINENO: error: operating system $host_os is not supported by strace" >&5
+ echo "$as_me: error: operating system $host_os is not supported by strace" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+-echo "$as_me:$LINENO: result: $opsys" >&5
+-echo "${ECHO_T}$opsys" >&6
++{ echo "$as_me:$LINENO: result: $opsys" >&5
++echo "${ECHO_T}$opsys" >&6; }
+
+-echo "$as_me:$LINENO: checking for supported architecture" >&5
+-echo $ECHO_N "checking for supported architecture... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for supported architecture" >&5
++echo $ECHO_N "checking for supported architecture... $ECHO_C" >&6; }
+ case "$host_cpu" in
+ i[3456]86|pentium)
+ arch=i386
+@@ -2017,16 +2512,24 @@ cat >>confdefs.h <<\_ACEOF
+ _ACEOF
+
+ ;;
++avr32*)
++ arch=avr32
++
++cat >>confdefs.h <<\_ACEOF
++#define AVR32 1
++_ACEOF
++
++ ;;
+ *)
+- echo "$as_me:$LINENO: result: NO!" >&5
+-echo "${ECHO_T}NO!" >&6
++ { echo "$as_me:$LINENO: result: NO!" >&5
++echo "${ECHO_T}NO!" >&6; }
+ { { echo "$as_me:$LINENO: error: architecture $host_cpu is not supported by strace" >&5
+ echo "$as_me: error: architecture $host_cpu is not supported by strace" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+-echo "$as_me:$LINENO: result: $arch" >&5
+-echo "${ECHO_T}$arch" >&6
++{ echo "$as_me:$LINENO: result: $arch" >&5
++echo "${ECHO_T}$arch" >&6; }
+
+
+
+@@ -2100,8 +2603,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}gcc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2114,32 +2617,34 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ fi
+ if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+ set dummy gcc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2152,36 +2657,51 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
+- CC=$ac_ct_CC
++ if test "x$ac_ct_CC" = x; then
++ CC=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf@gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf@gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ CC=$ac_ct_CC
++ fi
+ else
+ CC="$ac_cv_prog_CC"
+ fi
+
+ if test -z "$CC"; then
+- if test -n "$ac_tool_prefix"; then
+- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
++ if test -n "$ac_tool_prefix"; then
++ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}cc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2194,74 +2714,34 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
+-else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
+-fi
+-
+-fi
+-if test -z "$ac_cv_prog_CC"; then
+- ac_ct_CC=$CC
+- # Extract the first word of "cc", so it can be a program name with args.
+-set dummy cc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+- echo $ECHO_N "(cached) $ECHO_C" >&6
+-else
+- if test -n "$ac_ct_CC"; then
+- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+-else
+-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+- ac_cv_prog_ac_ct_CC="cc"
+- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+- break 2
+- fi
+-done
+-done
+-
+-fi
+-fi
+-ac_ct_CC=$ac_cv_prog_ac_ct_CC
+-if test -n "$ac_ct_CC"; then
+- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
+- CC=$ac_ct_CC
+-else
+- CC="$ac_cv_prog_CC"
+-fi
+
++ fi
+ fi
+ if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+ set dummy cc; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2275,7 +2755,7 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+@@ -2286,6 +2766,7 @@ do
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+@@ -2303,22 +2784,23 @@ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ fi
+ if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+- for ac_prog in cl
++ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+ set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2331,36 +2813,38 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ CC=$ac_cv_prog_CC
+ if test -n "$CC"; then
+- echo "$as_me:$LINENO: result: $CC" >&5
+-echo "${ECHO_T}$CC" >&6
++ { echo "$as_me:$LINENO: result: $CC" >&5
++echo "${ECHO_T}$CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$CC" && break
+ done
+ fi
+ if test -z "$CC"; then
+ ac_ct_CC=$CC
+- for ac_prog in cl
++ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2373,29 +2857,45 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ fi
+ fi
+ ac_ct_CC=$ac_cv_prog_ac_ct_CC
+ if test -n "$ac_ct_CC"; then
+- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+-echo "${ECHO_T}$ac_ct_CC" >&6
++ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
++echo "${ECHO_T}$ac_ct_CC" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
++
+ test -n "$ac_ct_CC" && break
+ done
+
+- CC=$ac_ct_CC
++ if test "x$ac_ct_CC" = x; then
++ CC=""
++ else
++ case $cross_compiling:$ac_tool_warned in
++yes:)
++{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf@gnu.org." >&5
++echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
++whose name does not start with the host triplet. If you think this
++configuration is useful to you, please write to autoconf@gnu.org." >&2;}
++ac_tool_warned=yes ;;
++esac
++ CC=$ac_ct_CC
++ fi
+ fi
+
+ fi
+@@ -2408,21 +2908,35 @@ See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Provide some information about the compiler.
+-echo "$as_me:$LINENO:" \
+- "checking for C compiler version" >&5
++echo "$as_me:$LINENO: checking for C compiler version" >&5
+ ac_compiler=`set X $ac_compile; echo $2`
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+- (eval $ac_compiler --version </dev/null >&5) 2>&5
++{ (ac_try="$ac_compiler --version >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+- (eval $ac_compiler -v </dev/null >&5) 2>&5
++{ (ac_try="$ac_compiler -v >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+- (eval $ac_compiler -V </dev/null >&5) 2>&5
++{ (ac_try="$ac_compiler -V >&5"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+@@ -2447,47 +2961,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ # Try to create an executable without -o first, disregard a.out.
+ # It will help us diagnose broken compilers, and finding out an intuition
+ # of exeext.
+-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
++echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+- (eval $ac_link_default) 2>&5
++#
++# List of possible output files, starting from the most likely.
++# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
++# only as a last resort. b.out is created by i960 compilers.
++ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
++#
++# The IRIX 6 linker writes into existing files which may not be
++# executable, retaining their permissions. Remove them first so a
++# subsequent execution test works.
++ac_rmfiles=
++for ac_file in $ac_files
++do
++ case $ac_file in
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
++ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
++ esac
++done
++rm -f $ac_rmfiles
++
++if { (ac_try="$ac_link_default"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+- # Find the output, starting from the most likely. This scheme is
+-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+-# resort.
+-
+-# Be careful to initialize this variable, since it used to be cached.
+-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+-ac_cv_exeext=
+-# b.out is created by i960 compilers.
+-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
++ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
++# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
++# in a Makefile. We should not override ac_cv_exeext if it was cached,
++# so that the user can short-circuit this test for compilers unknown to
++# Autoconf.
++for ac_file in $ac_files ''
+ do
+ test -f "$ac_file" || continue
+ case $ac_file in
+- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+- ;;
+- conftest.$ac_ext )
+- # This is the source file.
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+- # FIXME: I believe we export ac_cv_exeext for Libtool,
+- # but it would be cool to find out if it's true. Does anybody
+- # maintain Libtool? --akim.
+- export ac_cv_exeext
++ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
++ then :; else
++ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
++ fi
++ # We set ac_cv_exeext here because the later test for it is not
++ # safe: cross compilers may not add the suffix if given an `-o'
++ # argument, so we may need to know it at that point already.
++ # Even if this section looks crufty: it has the advantage of
++ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+ done
++test "$ac_cv_exeext" = no && ac_cv_exeext=
++
+ else
++ ac_file=''
++fi
++
++{ echo "$as_me:$LINENO: result: $ac_file" >&5
++echo "${ECHO_T}$ac_file" >&6; }
++if test -z "$ac_file"; then
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+@@ -2499,19 +3043,21 @@ See \`config.log' for more details." >&2;}
+ fi
+
+ ac_exeext=$ac_cv_exeext
+-echo "$as_me:$LINENO: result: $ac_file" >&5
+-echo "${ECHO_T}$ac_file" >&6
+
+-# Check the compiler produces executables we can run. If not, either
++# Check that the compiler produces executables we can run. If not, either
+ # the compiler is broken, or we cross compile.
+-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
++echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+ # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+ # If not cross compiling, check that we can run a simple program.
+ if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -2530,22 +3076,27 @@ See \`config.log' for more details." >&2;}
+ fi
+ fi
+ fi
+-echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++{ echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+
+ rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ ac_clean_files=$ac_clean_files_save
+-# Check the compiler produces executables we can run. If not, either
++# Check that the compiler produces executables we can run. If not, either
+ # the compiler is broken, or we cross compile.
+-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+-echo "$as_me:$LINENO: result: $cross_compiling" >&5
+-echo "${ECHO_T}$cross_compiling" >&6
+-
+-echo "$as_me:$LINENO: checking for suffix of executables" >&5
+-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
++echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
++{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
++echo "${ECHO_T}$cross_compiling" >&6; }
++
++{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
++echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+@@ -2556,9 +3107,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+- export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+@@ -2572,14 +3122,14 @@ See \`config.log' for more details." >&2;}
+ fi
+
+ rm -f conftest$ac_cv_exeext
+-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+-echo "${ECHO_T}$ac_cv_exeext" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
++echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+ rm -f conftest.$ac_ext
+ EXEEXT=$ac_cv_exeext
+ ac_exeext=$EXEEXT
+-echo "$as_me:$LINENO: checking for suffix of object files" >&5
+-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
++echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+ if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2599,14 +3149,20 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.o conftest.obj
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>&5
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
++ for ac_file in conftest.o conftest.obj conftest.*; do
++ test -f "$ac_file" || continue;
+ case $ac_file in
+- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
++ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+@@ -2624,12 +3180,12 @@ fi
+
+ rm -f conftest.$ac_cv_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+-echo "${ECHO_T}$ac_cv_objext" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
++echo "${ECHO_T}$ac_cv_objext" >&6; }
+ OBJEXT=$ac_cv_objext
+ ac_objext=$OBJEXT
+-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
++echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+ if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -2652,50 +3208,49 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_compiler_gnu=no
++ ac_compiler_gnu=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
++echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+ GCC=`test $ac_compiler_gnu = yes && echo yes`
+ ac_test_CFLAGS=${CFLAGS+set}
+ ac_save_CFLAGS=$CFLAGS
+-CFLAGS="-g"
+-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
++echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- cat >conftest.$ac_ext <<_ACEOF
++ ac_save_c_werror_flag=$ac_c_werror_flag
++ ac_c_werror_flag=yes
++ ac_cv_prog_cc_g=no
++ CFLAGS="-g"
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -2711,38 +3266,118 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
++ ac_cv_prog_cc_g=yes
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ CFLAGS=""
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
++ :
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_c_werror_flag=$ac_save_c_werror_flag
++ CFLAGS="-g"
++ cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++
++int
++main ()
++{
++
++ ;
++ return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_prog_cc_g=no
++
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++ ac_c_werror_flag=$ac_save_c_werror_flag
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+ elif test $ac_cv_prog_cc_g = yes; then
+@@ -2758,12 +3393,12 @@ else
+ CFLAGS=
+ fi
+ fi
+-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+-if test "${ac_cv_prog_cc_stdc+set}" = set; then
++{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
++echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
++if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- ac_cv_prog_cc_stdc=no
++ ac_cv_prog_cc_c89=no
+ ac_save_CC=$CC
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -2797,12 +3432,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
+ /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+- as 'x'. The following induces an error, until -std1 is added to get
++ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+- that's true only with -std1. */
++ that's true only with -std. */
+ int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
++/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
++ inside strings and character constants. */
++#define FOO(x) 'x'
++int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
++
+ int test (int i, double x);
+ struct s1 {int (*f) (int a);};
+ struct s2 {int (*f) (double a);};
+@@ -2817,205 +3457,57 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ return 0;
+ }
+ _ACEOF
+-# Don't try gcc -ansi; that turns off useful extensions and
+-# breaks some systems' header files.
+-# AIX -qlanglvl=ansi
+-# Ultrix and OSF/1 -std1
+-# HP-UX 10.20 and later -Ae
+-# HP-UX older versions -Aa -D_HPUX_SOURCE
+-# SVR4 -Xc -D__EXTENSIONS__
+-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
++for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
++ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+ do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_prog_cc_stdc=$ac_arg
+-break
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
++ ac_cv_prog_cc_c89=$ac_arg
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
++
+ fi
+-rm -f conftest.err conftest.$ac_objext
++
++rm -f core conftest.err conftest.$ac_objext
++ test "x$ac_cv_prog_cc_c89" != "xno" && break
+ done
+-rm -f conftest.$ac_ext conftest.$ac_objext
++rm -f conftest.$ac_ext
+ CC=$ac_save_CC
+
+ fi
+-
+-case "x$ac_cv_prog_cc_stdc" in
+- x|xno)
+- echo "$as_me:$LINENO: result: none needed" >&5
+-echo "${ECHO_T}none needed" >&6 ;;
++# AC_CACHE_VAL
++case "x$ac_cv_prog_cc_c89" in
++ x)
++ { echo "$as_me:$LINENO: result: none needed" >&5
++echo "${ECHO_T}none needed" >&6; } ;;
++ xno)
++ { echo "$as_me:$LINENO: result: unsupported" >&5
++echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+- CC="$CC $ac_cv_prog_cc_stdc" ;;
++ CC="$CC $ac_cv_prog_cc_c89"
++ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
++echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+ esac
+
+-# Some people use a C++ compiler to compile C. Since we use `exit',
+-# in C++ we need to declare it. In case someone uses the same compiler
+-# for both compiling C and C++ we need to have the C++ compiler decide
+-# the declaration of exit, since it's the most demanding environment.
+-cat >conftest.$ac_ext <<_ACEOF
+-#ifndef __cplusplus
+- choke me
+-#endif
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- for ac_declaration in \
+- '' \
+- 'extern "C" void std::exit (int) throw (); using std::exit;' \
+- 'extern "C" void std::exit (int); using std::exit;' \
+- 'extern "C" void exit (int) throw ();' \
+- 'extern "C" void exit (int);' \
+- 'void exit (int);'
+-do
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-$ac_declaration
+-#include <stdlib.h>
+-int
+-main ()
+-{
+-exit (42);
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- :
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-continue
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-$ac_declaration
+-int
+-main ()
+-{
+-exit (42);
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- break
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-done
+-rm -f conftest*
+-if test -n "$ac_declaration"; then
+- echo '#ifdef __cplusplus' >>confdefs.h
+- echo $ac_declaration >>confdefs.h
+- echo '#endif' >>confdefs.h
+-fi
+-
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+
+-fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -3023,7 +3515,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ DEPDIR="${am__leading_dot}deps"
+
+- ac_config_commands="$ac_config_commands depfiles"
++ac_config_commands="$ac_config_commands depfiles"
+
+
+ am_make=${MAKE-make}
+@@ -3033,8 +3525,8 @@ am__doit:
+ .PHONY: am__doit
+ END
+ # If we don't find an include directive, just comment out the code.
+-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
++echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+ am__include="#"
+ am__quote=
+ _am_result=none
+@@ -3061,15 +3553,15 @@ if test "$am__include" = "#"; then
+ fi
+
+
+-echo "$as_me:$LINENO: result: $_am_result" >&5
+-echo "${ECHO_T}$_am_result" >&6
++{ echo "$as_me:$LINENO: result: $_am_result" >&5
++echo "${ECHO_T}$_am_result" >&6; }
+ rm -f confinc confmf
+
+-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
++# Check whether --enable-dependency-tracking was given.
+ if test "${enable_dependency_tracking+set}" = set; then
+- enableval="$enable_dependency_tracking"
++ enableval=$enable_dependency_tracking;
++fi
+
+-fi;
+ if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+@@ -3089,8 +3581,8 @@ fi
+
+ depcc="$CC" am_compiler_list=
+
+-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
++echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+ if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3179,8 +3671,8 @@ else
+ fi
+
+ fi
+-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
++{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
++echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+ CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+@@ -3204,8 +3696,8 @@ _ACEOF
+
+
+
+-echo "$as_me:$LINENO: checking for primary include directory" >&5
+-echo $ECHO_N "checking for primary include directory... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for primary include directory" >&5
++echo $ECHO_N "checking for primary include directory... $ECHO_C" >&6; }
+ includedir=/usr/include
+ if test -n "$GCC"
+ then
+@@ -3222,28 +3714,28 @@ then
+ includedir=$new_includedir
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $includedir" >&5
+-echo "${ECHO_T}$includedir" >&6
++{ echo "$as_me:$LINENO: result: $includedir" >&5
++echo "${ECHO_T}$includedir" >&6; }
+
+
+ if test "x$opsys" = "xsunos4" && test "x$arch" = "xsparc"
+ then
+- echo "$as_me:$LINENO: checking for valid machine include directory" >&5
+-echo $ECHO_N "checking for valid machine include directory... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for valid machine include directory" >&5
++echo $ECHO_N "checking for valid machine include directory... $ECHO_C" >&6; }
+ if test -d "$includedir/sun4"
+ then
+ rm -f machine
+ ln -s $includedir/sun4 machine
+- echo "$as_me:$LINENO: result: yes" >&5
+-echo "${ECHO_T}yes" >&6
++ { echo "$as_me:$LINENO: result: yes" >&5
++echo "${ECHO_T}yes" >&6; }
+
+ cat >>confdefs.h <<\_ACEOF
+ #define SUNOS4_KERNEL_ARCH_KLUDGE 1
+ _ACEOF
+
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+ fi
+
+@@ -3271,8 +3763,8 @@ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
++echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+ # On Suns, sometimes $CPP names a directory.
+ if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+@@ -3306,24 +3798,22 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #endif
+ Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } >/dev/null; then
+- if test -s conftest.err; then
+- ac_cpp_err=$ac_c_preproc_warn_flag
+- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+- else
+- ac_cpp_err=
+- fi
+-else
+- ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++ (exit $ac_status); } >/dev/null && {
++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ }; then
+ :
+ else
+ echo "$as_me: failed program was:" >&5
+@@ -3332,9 +3822,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+ continue
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+- # OK, works on sane cases. Now check whether non-existent headers
++ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -3344,24 +3835,22 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } >/dev/null; then
+- if test -s conftest.err; then
+- ac_cpp_err=$ac_c_preproc_warn_flag
+- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+- else
+- ac_cpp_err=
+- fi
+-else
+- ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++ (exit $ac_status); } >/dev/null && {
++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ }; then
+ # Broken: success on invalid input.
+ continue
+ else
+@@ -3372,6 +3861,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ac_preproc_ok=:
+ break
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+ done
+@@ -3389,8 +3879,8 @@ fi
+ else
+ ac_cv_prog_CPP=$CPP
+ fi
+-echo "$as_me:$LINENO: result: $CPP" >&5
+-echo "${ECHO_T}$CPP" >&6
++{ echo "$as_me:$LINENO: result: $CPP" >&5
++echo "${ECHO_T}$CPP" >&6; }
+ ac_preproc_ok=false
+ for ac_c_preproc_warn_flag in '' yes
+ do
+@@ -3413,24 +3903,22 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #endif
+ Syntax error
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } >/dev/null; then
+- if test -s conftest.err; then
+- ac_cpp_err=$ac_c_preproc_warn_flag
+- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+- else
+- ac_cpp_err=
+- fi
+-else
+- ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++ (exit $ac_status); } >/dev/null && {
++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ }; then
+ :
+ else
+ echo "$as_me: failed program was:" >&5
+@@ -3439,9 +3927,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ # Broken: fails on valid input.
+ continue
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+- # OK, works on sane cases. Now check whether non-existent headers
++ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -3451,24 +3940,22 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <ac_nonexistent.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } >/dev/null; then
+- if test -s conftest.err; then
+- ac_cpp_err=$ac_c_preproc_warn_flag
+- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+- else
+- ac_cpp_err=
+- fi
+-else
+- ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++ (exit $ac_status); } >/dev/null && {
++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ }; then
+ # Broken: success on invalid input.
+ continue
+ else
+@@ -3479,6 +3966,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ac_preproc_ok=:
+ break
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+
+ done
+@@ -3502,24 +3990,171 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+-echo "$as_me:$LINENO: checking for egrep" >&5
+-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+-if test "${ac_cv_prog_egrep+set}" = set; then
++{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
++echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
++if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+- then ac_cv_prog_egrep='grep -E'
+- else ac_cv_prog_egrep='egrep'
++ # Extract the first word of "grep ggrep" to use in msg output
++if test -z "$GREP"; then
++set dummy grep ggrep; ac_prog_name=$2
++if test "${ac_cv_path_GREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_path_GREP_found=false
++# Loop through the user's path and test for each of PROGNAME-LIST
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in grep ggrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
++ # Check for GNU ac_path_GREP and select it if it is found.
++ # Check for GNU $ac_path_GREP
++case `"$ac_path_GREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
++*)
++ ac_count=0
++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ echo 'GREP' >> "conftest.nl"
++ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ ac_count=`expr $ac_count + 1`
++ if test $ac_count -gt ${ac_path_GREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_GREP="$ac_path_GREP"
++ ac_path_GREP_max=$ac_count
+ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++
++ $ac_path_GREP_found && break 3
++ done
++done
++
++done
++IFS=$as_save_IFS
++
++
++fi
++
++GREP="$ac_cv_path_GREP"
++if test -z "$GREP"; then
++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++else
++ ac_cv_path_GREP=$GREP
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+- EGREP=$ac_cv_prog_egrep
++
++
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
++echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
++ GREP="$ac_cv_path_GREP"
++
++
++{ echo "$as_me:$LINENO: checking for egrep" >&5
++echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
++if test "${ac_cv_path_EGREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
++ then ac_cv_path_EGREP="$GREP -E"
++ else
++ # Extract the first word of "egrep" to use in msg output
++if test -z "$EGREP"; then
++set dummy egrep; ac_prog_name=$2
++if test "${ac_cv_path_EGREP+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ ac_path_EGREP_found=false
++# Loop through the user's path and test for each of PROGNAME-LIST
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_prog in egrep; do
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
++ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
++ # Check for GNU ac_path_EGREP and select it if it is found.
++ # Check for GNU $ac_path_EGREP
++case `"$ac_path_EGREP" --version 2>&1` in
++*GNU*)
++ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
++*)
++ ac_count=0
++ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
++ while :
++ do
++ cat "conftest.in" "conftest.in" >"conftest.tmp"
++ mv "conftest.tmp" "conftest.in"
++ cp "conftest.in" "conftest.nl"
++ echo 'EGREP' >> "conftest.nl"
++ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
++ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
++ ac_count=`expr $ac_count + 1`
++ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
++ # Best one so far, save it but keep looking for a better one
++ ac_cv_path_EGREP="$ac_path_EGREP"
++ ac_path_EGREP_max=$ac_count
++ fi
++ # 10*(2^10) chars as input seems more than enough
++ test $ac_count -gt 10 && break
++ done
++ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
++esac
++
++
++ $ac_path_EGREP_found && break 3
++ done
++done
++
++done
++IFS=$as_save_IFS
++
++
++fi
++
++EGREP="$ac_cv_path_EGREP"
++if test -z "$EGREP"; then
++ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
++echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++else
++ ac_cv_path_EGREP=$EGREP
++fi
++
++
++ fi
++fi
++{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
++echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
++ EGREP="$ac_cv_path_EGREP"
+
+
+ if test $ac_cv_c_compiler_gnu = yes; then
+- echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+-echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
++echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6; }
+ if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3560,8 +4195,8 @@ rm -f conftest*
+
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+-echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
++echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6; }
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+@@ -3580,8 +4215,8 @@ fi
+ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+ # OS/2's system install, which has a completely different semantic
+ # ./install, which can be erroneously created by make from ./install.sh.
+-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
++echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+ if test -z "$INSTALL"; then
+ if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+@@ -3603,7 +4238,7 @@ case $as_dir/ in
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+@@ -3622,21 +4257,22 @@ case $as_dir/ in
+ ;;
+ esac
+ done
++IFS=$as_save_IFS
+
+
+ fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+- # As a last resort, use the slow shell script. We don't cache a
+- # path for INSTALL within a source directory, because that will
++ # As a last resort, use the slow shell script. Don't cache a
++ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+- # removed, or if the path is relative.
++ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $INSTALL" >&5
+-echo "${ECHO_T}$INSTALL" >&6
++{ echo "$as_me:$LINENO: result: $INSTALL" >&5
++echo "${ECHO_T}$INSTALL" >&6; }
+
+ # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+ # It thinks the first close brace ends the variable substitution.
+@@ -3646,8 +4282,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
++echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
+ if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3665,10 +4301,10 @@ main ()
+ #ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+- const charset x;
++ const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+- char const *const *ccp;
+- char **p;
++ char const *const *pcpcc;
++ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+@@ -3677,16 +4313,17 @@ main ()
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+- ccp = &g + (g ? g-g : 0);
++ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+- ++ccp;
+- p = (char**) ccp;
+- ccp = (char const *const *) p;
++ ++pcpcc;
++ ppc = (char**) pcpcc;
++ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
++ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+@@ -3705,7 +4342,9 @@ main ()
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
++ if (!foo) return 0;
+ }
++ return !cs[0] && !zero.x;
+ #endif
+
+ ;
+@@ -3713,38 +4352,34 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_c_const=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_c_const=no
++ ac_cv_c_const=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+-echo "${ECHO_T}$ac_cv_c_const" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
++echo "${ECHO_T}$ac_cv_c_const" >&6; }
+ if test $ac_cv_c_const = no; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -3753,8 +4388,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
++echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+ if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -3778,35 +4413,31 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_header_stdc=no
++ ac_cv_header_stdc=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+@@ -3862,6 +4493,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <ctype.h>
++#include <stdlib.h>
+ #if ((' ' & 0x0FF) == 0x020)
+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+@@ -3881,18 +4513,27 @@ main ()
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+- exit(2);
+- exit (0);
++ return 2;
++ return 0;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -3905,12 +4546,14 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ( exit $ac_status )
+ ac_cv_header_stdc=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+-echo "${ECHO_T}$ac_cv_header_stdc" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
++echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+ if test $ac_cv_header_stdc = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -3927,9 +4570,9 @@ fi
+ ac_header_dirent=no
+ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+-echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
++echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -3951,38 +4594,35 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_Header=no"
++ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+@@ -3994,13 +4634,12 @@ fi
+ done
+ # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+ if test $ac_header_dirent = dirent.h; then
+- echo "$as_me:$LINENO: checking for library containing opendir" >&5
+-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
+ if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+-ac_cv_search_opendir=no
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -4008,126 +4647,83 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char opendir ();
+ int
+ main ()
+ {
+-opendir ();
++return opendir ();
+ ;
+ return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++for ac_lib in '' dir; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_opendir="none required"
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest$ac_exeext &&
++ $as_test_x conftest$ac_exeext; then
++ ac_cv_search_opendir=$ac_res
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-if test "$ac_cv_search_opendir" = no; then
+- for ac_lib in dir; do
+- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char opendir ();
+-int
+-main ()
+-{
+-opendir ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_opendir="-l$ac_lib"
+-break
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++fi
+
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++ conftest$ac_exeext
++ if test "${ac_cv_search_opendir+set}" = set; then
++ break
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+- done
++done
++if test "${ac_cv_search_opendir+set}" = set; then
++ :
++else
++ ac_cv_search_opendir=no
+ fi
++rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+-echo "${ECHO_T}$ac_cv_search_opendir" >&6
+-if test "$ac_cv_search_opendir" != no; then
+- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+ fi
+
+ else
+- echo "$as_me:$LINENO: checking for library containing opendir" >&5
+-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
++echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
+ if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_func_search_save_LIBS=$LIBS
+-ac_cv_search_opendir=no
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -4135,122 +4731,80 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char opendir ();
+ int
+ main ()
+ {
+-opendir ();
++return opendir ();
+ ;
+ return 0;
+ }
+ _ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++for ac_lib in '' x; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ rm -f conftest.$ac_objext conftest$ac_exeext
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_opendir="none required"
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest$ac_exeext &&
++ $as_test_x conftest$ac_exeext; then
++ ac_cv_search_opendir=$ac_res
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+-if test "$ac_cv_search_opendir" = no; then
+- for ac_lib in x; do
+- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+
+-/* Override any gcc2 internal prototype to avoid an error. */
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+-char opendir ();
+-int
+-main ()
+-{
+-opendir ();
+- ;
+- return 0;
+-}
+-_ACEOF
+-rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
+- ac_status=$?
+- grep -v '^ *+' conftest.er1 >conftest.err
+- rm -f conftest.er1
+- cat conftest.err >&5
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_search_opendir="-l$ac_lib"
+-break
+-else
+- echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
++fi
+
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
++ conftest$ac_exeext
++ if test "${ac_cv_search_opendir+set}" = set; then
++ break
+ fi
+-rm -f conftest.err conftest.$ac_objext \
+- conftest$ac_exeext conftest.$ac_ext
+- done
++done
++if test "${ac_cv_search_opendir+set}" = set; then
++ :
++else
++ ac_cv_search_opendir=no
+ fi
++rm conftest.$ac_ext
+ LIBS=$ac_func_search_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+-echo "${ECHO_T}$ac_cv_search_opendir" >&6
+-if test "$ac_cv_search_opendir" != no; then
+- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
++{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
++echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
++ac_res=$ac_cv_search_opendir
++if test "$ac_res" != no; then
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+ fi
+
+ fi
+
+-echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
+-echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
++echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; }
+ if test "${ac_cv_header_stat_broken+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4263,42 +4817,52 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
+-#if defined(S_ISBLK) && defined(S_IFDIR)
+-# if S_ISBLK (S_IFDIR)
+-You lose.
+-# endif
++#if defined S_ISBLK && defined S_IFDIR
++extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+ #endif
+
+-#if defined(S_ISBLK) && defined(S_IFCHR)
+-# if S_ISBLK (S_IFCHR)
+-You lose.
+-# endif
++#if defined S_ISBLK && defined S_IFCHR
++extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+ #endif
+
+-#if defined(S_ISLNK) && defined(S_IFREG)
+-# if S_ISLNK (S_IFREG)
+-You lose.
+-# endif
++#if defined S_ISLNK && defined S_IFREG
++extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+ #endif
+
+-#if defined(S_ISSOCK) && defined(S_IFREG)
+-# if S_ISSOCK (S_IFREG)
+-You lose.
+-# endif
++#if defined S_ISSOCK && defined S_IFREG
++extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+ #endif
+
+ _ACEOF
+-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+- $EGREP "You lose" >/dev/null 2>&1; then
+- ac_cv_header_stat_broken=yes
+-else
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stat_broken=no
++else
++ echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_cv_header_stat_broken=yes
+ fi
+-rm -f conftest*
+
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
+-echo "${ECHO_T}$ac_cv_header_stat_broken" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
++echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; }
+ if test $ac_cv_header_stat_broken = yes; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -4321,9 +4885,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -4337,38 +4901,35 @@ $ac_includes_default
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_Header=no"
++ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+@@ -4379,8 +4940,8 @@ fi
+ done
+
+
+-echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
+-echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
++echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4402,33 +4963,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_blksize=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4446,40 +5002,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_blksize=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_stat_st_blksize=no
++ ac_cv_member_struct_stat_st_blksize=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
+ if test $ac_cv_member_struct_stat_st_blksize = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -4488,8 +5041,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
+-echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
++echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4511,33 +5064,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_blocks=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4555,40 +5103,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_blocks=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_stat_st_blocks=no
++ ac_cv_member_struct_stat_st_blocks=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
+ if test $ac_cv_member_struct_stat_st_blocks = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -4597,8 +5142,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct stat.st_aclcnt" >&5
+-echo $ECHO_N "checking for struct stat.st_aclcnt... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct stat.st_aclcnt" >&5
++echo $ECHO_N "checking for struct stat.st_aclcnt... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_stat_st_aclcnt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4620,33 +5165,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_aclcnt=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4664,40 +5204,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_aclcnt=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_stat_st_aclcnt=no
++ ac_cv_member_struct_stat_st_aclcnt=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_aclcnt" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_stat_st_aclcnt" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_aclcnt" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_aclcnt" >&6; }
+ if test $ac_cv_member_struct_stat_st_aclcnt = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -4706,8 +5243,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
+-echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
++echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4729,33 +5266,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_flags=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4773,40 +5305,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_flags=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_stat_st_flags=no
++ ac_cv_member_struct_stat_st_flags=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
+ if test $ac_cv_member_struct_stat_st_flags = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -4815,8 +5344,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct stat.st_fstype" >&5
+-echo $ECHO_N "checking for struct stat.st_fstype... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct stat.st_fstype" >&5
++echo $ECHO_N "checking for struct stat.st_fstype... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_stat_st_fstype+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4838,33 +5367,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_fstype=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4882,40 +5406,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_fstype=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_stat_st_fstype=no
++ ac_cv_member_struct_stat_st_fstype=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_fstype" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_stat_st_fstype" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_fstype" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_fstype" >&6; }
+ if test $ac_cv_member_struct_stat_st_fstype = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -4924,8 +5445,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
+-echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
++echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -4947,33 +5468,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_gen=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -4991,40 +5507,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_gen=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_stat_st_gen=no
++ ac_cv_member_struct_stat_st_gen=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
+ if test $ac_cv_member_struct_stat_st_gen = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -5033,8 +5546,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct stat.st_level" >&5
+-echo $ECHO_N "checking for struct stat.st_level... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct stat.st_level" >&5
++echo $ECHO_N "checking for struct stat.st_level... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_stat_st_level+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5056,33 +5569,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_level=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5100,40 +5608,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_level=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_stat_st_level=no
++ ac_cv_member_struct_stat_st_level=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_level" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_stat_st_level" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_level" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_level" >&6; }
+ if test $ac_cv_member_struct_stat_st_level = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -5142,8 +5647,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
+-echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
++echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5165,33 +5670,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_rdev=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -5209,40 +5709,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_rdev=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_stat_st_rdev=no
++ ac_cv_member_struct_stat_st_rdev=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
++echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
+ if test $ac_cv_member_struct_stat_st_rdev = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -5252,8 +5749,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for stat64 in (asm|sys)/stat.h" >&5
+-echo $ECHO_N "checking for stat64 in (asm|sys)/stat.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for stat64 in (asm|sys)/stat.h" >&5
++echo $ECHO_N "checking for stat64 in (asm|sys)/stat.h... $ECHO_C" >&6; }
+ if test "${ac_cv_type_stat64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5278,39 +5775,35 @@ struct stat64 st;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_stat64=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_stat64=no
++ ac_cv_type_stat64=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+-echo "$as_me:$LINENO: result: $ac_cv_type_stat64" >&5
+-echo "${ECHO_T}$ac_cv_type_stat64" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_stat64" >&5
++echo "${ECHO_T}$ac_cv_type_stat64" >&6; }
+ if test "$ac_cv_type_stat64" = yes
+ then
+
+@@ -5321,8 +5814,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
++echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
+ if test "${ac_cv_type_signal+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5334,64 +5827,52 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <sys/types.h>
+ #include <signal.h>
+-#ifdef signal
+-# undef signal
+-#endif
+-#ifdef __cplusplus
+-extern "C" void (*signal (int, void (*)(int)))(int);
+-#else
+-void (*signal ()) ();
+-#endif
+
+ int
+ main ()
+ {
+-int i;
++return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- ac_cv_type_signal=void
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
++ ac_cv_type_signal=int
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_signal=int
++ ac_cv_type_signal=void
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+-echo "${ECHO_T}$ac_cv_type_signal" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
++echo "${ECHO_T}$ac_cv_type_signal" >&6; }
+
+ cat >>confdefs.h <<_ACEOF
+ #define RETSIGTYPE $ac_cv_type_signal
+ _ACEOF
+
+
+-echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+-echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
++echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
+ if test "${ac_cv_type_uid_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5413,8 +5894,8 @@ fi
+ rm -f conftest*
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+-echo "${ECHO_T}$ac_cv_type_uid_t" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
++echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
+ if test $ac_cv_type_uid_t = no; then
+
+ cat >>confdefs.h <<\_ACEOF
+@@ -5428,8 +5909,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for mode_t" >&5
+-echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for mode_t" >&5
++echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_mode_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5440,50 +5921,47 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++typedef mode_t ac__type_new_;
+ int
+ main ()
+ {
+-if ((mode_t *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (mode_t))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_mode_t=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_mode_t=no
++ ac_cv_type_mode_t=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
+-echo "${ECHO_T}$ac_cv_type_mode_t" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
++echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
+ if test $ac_cv_type_mode_t = yes; then
+ :
+ else
+@@ -5494,8 +5972,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
+-echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
++echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6; }
+ if test "${ac_cv_type_getgroups+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5509,7 +5987,7 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ /* Thanks to Mike Rendell for this test. */
+-#include <sys/types.h>
++$ac_includes_default
+ #define NGID 256
+ #undef MAX
+ #define MAX(x, y) ((x) > (y) ? (x) : (y))
+@@ -5519,7 +5997,7 @@ main ()
+ {
+ gid_t gidset[NGID];
+ int i, n;
+- union { gid_t gval; long lval; } val;
++ union { gid_t gval; long int lval; } val;
+
+ val.lval = -1;
+ for (i = 0; i < NGID; i++)
+@@ -5527,18 +6005,28 @@ main ()
+ n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
+ gidset);
+ /* Exit non-zero if getgroups seems to require an array of ints. This
+- happens when gid_t is short but getgroups modifies an array of ints. */
+- exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
++ happens when gid_t is short int but getgroups modifies an array
++ of ints. */
++ return n > 0 && gidset[n] != val.gval;
+ }
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -5551,8 +6039,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ( exit $ac_status )
+ ac_cv_type_getgroups=int
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ if test $ac_cv_type_getgroups = cross; then
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -5573,16 +6063,16 @@ rm -f conftest*
+
+ fi
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
+-echo "${ECHO_T}$ac_cv_type_getgroups" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
++echo "${ECHO_T}$ac_cv_type_getgroups" >&6; }
+
+ cat >>confdefs.h <<_ACEOF
+ #define GETGROUPS_T $ac_cv_type_getgroups
+ _ACEOF
+
+
+-echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
+-echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
++echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5602,54 +6092,51 @@ return makedev(0, 0);
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest$ac_exeext &&
++ $as_test_x conftest$ac_exeext; then
+ ac_cv_header_sys_types_h_makedev=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_header_sys_types_h_makedev=no
++ ac_cv_header_sys_types_h_makedev=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
++echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
+
+ if test $ac_cv_header_sys_types_h_makedev = no; then
+ if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
+-echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
++echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
+-echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
++echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -5660,41 +6147,37 @@ $ac_includes_default
+ #include <sys/mkdev.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
+-echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
++echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -5703,24 +6186,22 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <sys/mkdev.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } >/dev/null; then
+- if test -s conftest.err; then
+- ac_cpp_err=$ac_c_preproc_warn_flag
+- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+- else
+- ac_cpp_err=
+- fi
+-else
+- ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++ (exit $ac_status); } >/dev/null && {
++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ }; then
+ ac_header_preproc=yes
+ else
+ echo "$as_me: failed program was:" >&5
+@@ -5728,9 +6209,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -5754,25 +6236,18 @@ echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled
+ echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## --------------------------------- ##
+-## Report this to the strace lists. ##
+-## --------------------------------- ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
+-echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
++echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_sys_mkdev_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
+
+ fi
+ if test $ac_cv_header_sys_mkdev_h = yes; then
+@@ -5787,17 +6262,17 @@ fi
+
+ if test $ac_cv_header_sys_mkdev_h = no; then
+ if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
+- echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
+-echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
++ { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
++echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
+-echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
++echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -5808,41 +6283,37 @@ $ac_includes_default
+ #include <sys/sysmacros.h>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
+-echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
++echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -5851,24 +6322,22 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <sys/sysmacros.h>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } >/dev/null; then
+- if test -s conftest.err; then
+- ac_cpp_err=$ac_c_preproc_warn_flag
+- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+- else
+- ac_cpp_err=
+- fi
+-else
+- ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++ (exit $ac_status); } >/dev/null && {
++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ }; then
+ ac_header_preproc=yes
+ else
+ echo "$as_me: failed program was:" >&5
+@@ -5876,9 +6345,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -5902,25 +6372,18 @@ echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Comp
+ echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## --------------------------------- ##
+-## Report this to the strace lists. ##
+-## --------------------------------- ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
+-echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
++echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
+ if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_cv_header_sys_sysmacros_h=$ac_header_preproc
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
+-echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
++echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
+
+ fi
+ if test $ac_cv_header_sys_sysmacros_h = yes; then
+@@ -5935,8 +6398,8 @@ fi
+ fi
+ fi
+
+-echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
+-echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
++echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_sig_atomic_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -5948,50 +6411,47 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <signal.h>
+
++typedef sig_atomic_t ac__type_new_;
+ int
+ main ()
+ {
+-if ((sig_atomic_t *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (sig_atomic_t))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_sig_atomic_t=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_sig_atomic_t=no
++ ac_cv_type_sig_atomic_t=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
+-echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
++echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
+ if test $ac_cv_type_sig_atomic_t = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -6000,8 +6460,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for siginfo_t" >&5
+-echo $ECHO_N "checking for siginfo_t... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for siginfo_t" >&5
++echo $ECHO_N "checking for siginfo_t... $ECHO_C" >&6; }
+ if test "${ac_cv_type_siginfo_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6013,50 +6473,47 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <signal.h>
+
++typedef siginfo_t ac__type_new_;
+ int
+ main ()
+ {
+-if ((siginfo_t *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (siginfo_t))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_siginfo_t=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_siginfo_t=no
++ ac_cv_type_siginfo_t=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_siginfo_t" >&5
+-echo "${ECHO_T}$ac_cv_type_siginfo_t" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_siginfo_t" >&5
++echo "${ECHO_T}$ac_cv_type_siginfo_t" >&6; }
+ if test $ac_cv_type_siginfo_t = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -6066,8 +6523,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5
+-echo $ECHO_N "checking for struct sockaddr_in6.sin6_scope_id... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5
++echo $ECHO_N "checking for struct sockaddr_in6.sin6_scope_id... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_sockaddr_in6_sin6_scope_id+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6092,33 +6549,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -6139,40 +6591,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no
++ ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5
++echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6; }
+ if test $ac_cv_member_struct_sockaddr_in6_sin6_scope_id = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -6182,8 +6631,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for long long" >&5
+-echo $ECHO_N "checking for long long... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for long long" >&5
++echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
+ if test "${ac_cv_type_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6194,50 +6643,47 @@ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ $ac_includes_default
++typedef long long ac__type_new_;
+ int
+ main ()
+ {
+-if ((long long *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (long long))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_long_long=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_long_long=no
++ ac_cv_type_long_long=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
+-echo "${ECHO_T}$ac_cv_type_long_long" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
++echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
+ if test $ac_cv_type_long_long = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -6247,8 +6693,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for little endian long long" >&5
+-echo $ECHO_N "checking for little endian long long... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for little endian long long" >&5
++echo $ECHO_N "checking for little endian long long... $ECHO_C" >&6; }
+ if test "${ac_cv_have_little_endian_long_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6277,13 +6723,22 @@ int main () {
+
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6296,12 +6751,14 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ( exit $ac_status )
+ ac_cv_have_little_endian_long_long=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+
+-echo "$as_me:$LINENO: result: $ac_cv_have_little_endian_long_long" >&5
+-echo "${ECHO_T}$ac_cv_have_little_endian_long_long" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_have_little_endian_long_long" >&5
++echo "${ECHO_T}$ac_cv_have_little_endian_long_long" >&6; }
+ if test "$ac_cv_have_little_endian_long_long" = yes
+ then
+
+@@ -6311,8 +6768,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for long long off_t" >&5
+-echo $ECHO_N "checking for long long off_t... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for long long off_t" >&5
++echo $ECHO_N "checking for long long off_t... $ECHO_C" >&6; }
+ if test "${ac_cv_have_long_long_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6337,13 +6794,22 @@ main () {
+
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6356,12 +6822,14 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ( exit $ac_status )
+ ac_cv_have_long_long_off_t=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+
+-echo "$as_me:$LINENO: result: $ac_cv_have_long_long_off_t" >&5
+-echo "${ECHO_T}$ac_cv_have_long_long_off_t" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_have_long_long_off_t" >&5
++echo "${ECHO_T}$ac_cv_have_long_long_off_t" >&6; }
+ if test "$ac_cv_have_long_long_off_t" = yes
+ then
+
+@@ -6371,8 +6839,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for long long rlim_t" >&5
+-echo $ECHO_N "checking for long long rlim_t... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for long long rlim_t" >&5
++echo $ECHO_N "checking for long long rlim_t... $ECHO_C" >&6; }
+ if test "${ac_cv_have_long_long_rlim_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6399,13 +6867,22 @@ main () {
+
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -6418,12 +6895,14 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ( exit $ac_status )
+ ac_cv_have_long_long_rlim_t=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+
+-echo "$as_me:$LINENO: result: $ac_cv_have_long_long_rlim_t" >&5
+-echo "${ECHO_T}$ac_cv_have_long_long_rlim_t" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_have_long_long_rlim_t" >&5
++echo "${ECHO_T}$ac_cv_have_long_long_rlim_t" >&6; }
+ if test "$ac_cv_have_long_long_rlim_t" = yes
+ then
+
+@@ -6433,8 +6912,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for struct opthdr" >&5
+-echo $ECHO_N "checking for struct opthdr... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct opthdr" >&5
++echo $ECHO_N "checking for struct opthdr... $ECHO_C" >&6; }
+ if test "${ac_cv_type_struct_opthdr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6446,50 +6925,47 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <sys/socket.h>
+
++typedef struct opthdr ac__type_new_;
+ int
+ main ()
+ {
+-if ((struct opthdr *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (struct opthdr))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct_opthdr=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_struct_opthdr=no
++ ac_cv_type_struct_opthdr=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_struct_opthdr" >&5
+-echo "${ECHO_T}$ac_cv_type_struct_opthdr" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_opthdr" >&5
++echo "${ECHO_T}$ac_cv_type_struct_opthdr" >&6; }
+ if test $ac_cv_type_struct_opthdr = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -6499,8 +6975,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for struct t_opthdr" >&5
+-echo $ECHO_N "checking for struct t_opthdr... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct t_opthdr" >&5
++echo $ECHO_N "checking for struct t_opthdr... $ECHO_C" >&6; }
+ if test "${ac_cv_type_struct_t_opthdr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6512,50 +6988,47 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <sys/tiuser.h>
+
++typedef struct t_opthdr ac__type_new_;
+ int
+ main ()
+ {
+-if ((struct t_opthdr *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (struct t_opthdr))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct_t_opthdr=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_struct_t_opthdr=no
++ ac_cv_type_struct_t_opthdr=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_struct_t_opthdr" >&5
+-echo "${ECHO_T}$ac_cv_type_struct_t_opthdr" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_t_opthdr" >&5
++echo "${ECHO_T}$ac_cv_type_struct_t_opthdr" >&6; }
+ if test $ac_cv_type_struct_t_opthdr = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -6568,8 +7041,8 @@ fi
+
+ if test x$opsys != xlinux; then
+
+-echo "$as_me:$LINENO: checking for main in -lnsl" >&5
+-echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for main in -lnsl" >&5
++echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6; }
+ if test "${ac_cv_lib_nsl_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -6586,46 +7059,43 @@ cat >>conftest.$ac_ext <<_ACEOF
+ int
+ main ()
+ {
+-main ();
++return main ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest$ac_exeext &&
++ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_nsl_main=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_lib_nsl_main=no
++ ac_cv_lib_nsl_main=no
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
+-echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5
++echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6; }
+ if test $ac_cv_lib_nsl_main = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBNSL 1
+@@ -6652,9 +7122,9 @@ fi
+ for ac_func in sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl prctl sendmsg inet_ntop if_indextoname
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_func" >&5
+-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_var+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_func" >&5
++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
++if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -6680,68 +7150,60 @@ cat >>conftest.$ac_ext <<_ACEOF
+
+ #undef $ac_func
+
+-/* Override any gcc2 internal prototype to avoid an error. */
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
+ #ifdef __cplusplus
+ extern "C"
+-{
+ #endif
+-/* We use char because int might match the return type of a gcc2
+- builtin and then its argument prototype would still apply. */
+ char $ac_func ();
+ /* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++#if defined __stub_$ac_func || defined __stub___$ac_func
+ choke me
+-#else
+-char (*f) () = $ac_func;
+-#endif
+-#ifdef __cplusplus
+-}
+ #endif
+
+ int
+ main ()
+ {
+-return f != $ac_func;
++return $ac_func ();
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>conftest.er1
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest$ac_exeext &&
++ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_var=no"
++ eval "$as_ac_var=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext \
++
++rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
++ac_res=`eval echo '${'$as_ac_var'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+@@ -6782,18 +7244,19 @@ done
+ for ac_header in sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h sys/uio.h sys/aio.h poll.h sys/poll.h sys/vfs.h asm/sysmips.h linux/utsname.h sys/nscsys.h mqueue.h sys/epoll.h libaio.h inttypes.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+- echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ else
+ # Is the header compilable?
+-echo "$as_me:$LINENO: checking $ac_header usability" >&5
+-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
++echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -6804,41 +7267,37 @@ $ac_includes_default
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_header_compiler=no
++ ac_header_compiler=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+-echo "${ECHO_T}$ac_header_compiler" >&6
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+ # Is the header present?
+-echo "$as_me:$LINENO: checking $ac_header presence" >&5
+-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
++echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+@@ -6847,24 +7306,22 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <$ac_header>
+ _ACEOF
+-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } >/dev/null; then
+- if test -s conftest.err; then
+- ac_cpp_err=$ac_c_preproc_warn_flag
+- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+- else
+- ac_cpp_err=
+- fi
+-else
+- ac_cpp_err=yes
+-fi
+-if test -z "$ac_cpp_err"; then
++ (exit $ac_status); } >/dev/null && {
++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ }; then
+ ac_header_preproc=yes
+ else
+ echo "$as_me: failed program was:" >&5
+@@ -6872,9 +7329,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+ fi
++
+ rm -f conftest.err conftest.$ac_ext
+-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+-echo "${ECHO_T}$ac_header_preproc" >&6
++{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+ # So? What about this header?
+ case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+@@ -6898,25 +7356,19 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
+ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+ echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+- (
+- cat <<\_ASBOX
+-## --------------------------------- ##
+-## Report this to the strace lists. ##
+-## --------------------------------- ##
+-_ASBOX
+- ) |
+- sed "s/^/$as_me: WARNING: /" >&2
++
+ ;;
+ esac
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ eval "$as_ac_Header=\$ac_header_preproc"
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+
+ fi
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+@@ -6935,9 +7387,9 @@ done
+ for ac_header in linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -6951,38 +7403,35 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_Header=no"
++ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+@@ -6996,9 +7445,9 @@ done
+ for ac_header in asm/sigcontext.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -7012,38 +7461,35 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_Header=no"
++ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+@@ -7058,9 +7504,9 @@ done
+ for ac_header in netinet/tcp.h netinet/udp.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+-echo "$as_me:$LINENO: checking for $ac_header" >&5
+-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+-if eval "test \"\${$as_ac_Header+set}\" = set"; then
++{ echo "$as_me:$LINENO: checking for $ac_header" >&5
++echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+@@ -7074,38 +7520,35 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #include <$ac_header>
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-eval "$as_ac_Header=no"
++ eval "$as_ac_Header=no"
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
++ac_res=`eval echo '${'$as_ac_Header'}'`
++ { echo "$as_me:$LINENO: result: $ac_res" >&5
++echo "${ECHO_T}$ac_res" >&6; }
+ if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+ #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+@@ -7116,8 +7559,8 @@ fi
+ done
+
+
+-echo "$as_me:$LINENO: checking for MP procfs" >&5
+-echo $ECHO_N "checking for MP procfs... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for MP procfs" >&5
++echo $ECHO_N "checking for MP procfs... $ECHO_C" >&6; }
+ if test "${ac_cv_mp_procfs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7178,13 +7621,22 @@ fail:
+
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7197,12 +7649,14 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ( exit $ac_status )
+ ac_cv_mp_procfs=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+
+-echo "$as_me:$LINENO: result: $ac_cv_mp_procfs" >&5
+-echo "${ECHO_T}$ac_cv_mp_procfs" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_mp_procfs" >&5
++echo "${ECHO_T}$ac_cv_mp_procfs" >&6; }
+ if test "$ac_cv_mp_procfs" = yes
+ then
+
+@@ -7212,8 +7666,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for pollable procfs" >&5
+-echo $ECHO_N "checking for pollable procfs... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for pollable procfs" >&5
++echo $ECHO_N "checking for pollable procfs... $ECHO_C" >&6; }
+ if test "${ac_cv_pollable_procfs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7289,13 +7743,22 @@ fail:
+
+ _ACEOF
+ rm -f conftest$ac_exeext
+-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+- (eval $ac_link) 2>&5
++if { (ac_try="$ac_link"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
++ { (case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+@@ -7308,12 +7771,14 @@ sed 's/^/| /' conftest.$ac_ext >&5
+ ( exit $ac_status )
+ ac_cv_pollable_procfs=no
+ fi
+-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ fi
++
++
+ fi
+
+-echo "$as_me:$LINENO: result: $ac_cv_pollable_procfs" >&5
+-echo "${ECHO_T}$ac_cv_pollable_procfs" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_pollable_procfs" >&5
++echo "${ECHO_T}$ac_cv_pollable_procfs" >&6; }
+ if test "$ac_cv_pollable_procfs" = yes
+ then
+
+@@ -7324,8 +7789,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
+-echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct msghdr.msg_control" >&5
++echo $ECHO_N "checking for struct msghdr.msg_control... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_msghdr_msg_control+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7348,33 +7813,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_msghdr_msg_control=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7393,40 +7853,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_msghdr_msg_control=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_msghdr_msg_control=no
++ ac_cv_member_struct_msghdr_msg_control=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_msghdr_msg_control" >&5
++echo "${ECHO_T}$ac_cv_member_struct_msghdr_msg_control" >&6; }
+ if test $ac_cv_member_struct_msghdr_msg_control = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -7436,8 +7893,8 @@ _ACEOF
+
+ fi
+
+-echo "$as_me:$LINENO: checking for pr_syscall in struct prstatus" >&5
+-echo $ECHO_N "checking for pr_syscall in struct prstatus... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for pr_syscall in struct prstatus" >&5
++echo $ECHO_N "checking for pr_syscall in struct prstatus... $ECHO_C" >&6; }
+ if test "${ac_cv_struct_pr_syscall+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7463,39 +7920,35 @@ s.pr_syscall
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_struct_pr_syscall=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_struct_pr_syscall=no
++ ac_cv_struct_pr_syscall=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+-echo "$as_me:$LINENO: result: $ac_cv_struct_pr_syscall" >&5
+-echo "${ECHO_T}$ac_cv_struct_pr_syscall" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_struct_pr_syscall" >&5
++echo "${ECHO_T}$ac_cv_struct_pr_syscall" >&6; }
+ if test "$ac_cv_struct_pr_syscall" = yes
+ then
+
+@@ -7506,8 +7959,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking for struct T_conn_res.QUEUE_ptr" >&5
+-echo $ECHO_N "checking for struct T_conn_res.QUEUE_ptr... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct T_conn_res.QUEUE_ptr" >&5
++echo $ECHO_N "checking for struct T_conn_res.QUEUE_ptr... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_T_conn_res_QUEUE_ptr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7531,33 +7984,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_T_conn_res_QUEUE_ptr=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7577,40 +8025,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_T_conn_res_QUEUE_ptr=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_T_conn_res_QUEUE_ptr=no
++ ac_cv_member_struct_T_conn_res_QUEUE_ptr=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_T_conn_res_QUEUE_ptr" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_T_conn_res_QUEUE_ptr" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_T_conn_res_QUEUE_ptr" >&5
++echo "${ECHO_T}$ac_cv_member_struct_T_conn_res_QUEUE_ptr" >&6; }
+ if test $ac_cv_member_struct_T_conn_res_QUEUE_ptr = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -7619,8 +8064,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct T_conn_res.ACCEPTOR_id" >&5
+-echo $ECHO_N "checking for struct T_conn_res.ACCEPTOR_id... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct T_conn_res.ACCEPTOR_id" >&5
++echo $ECHO_N "checking for struct T_conn_res.ACCEPTOR_id... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_T_conn_res_ACCEPTOR_id+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7644,33 +8089,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_T_conn_res_ACCEPTOR_id=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -7690,40 +8130,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_T_conn_res_ACCEPTOR_id=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_T_conn_res_ACCEPTOR_id=no
++ ac_cv_member_struct_T_conn_res_ACCEPTOR_id=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_T_conn_res_ACCEPTOR_id" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_T_conn_res_ACCEPTOR_id" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_T_conn_res_ACCEPTOR_id" >&5
++echo "${ECHO_T}$ac_cv_member_struct_T_conn_res_ACCEPTOR_id" >&6; }
+ if test $ac_cv_member_struct_T_conn_res_ACCEPTOR_id = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -7734,8 +8171,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking for struct __old_kernel_stat" >&5
+-echo $ECHO_N "checking for struct __old_kernel_stat... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct __old_kernel_stat" >&5
++echo $ECHO_N "checking for struct __old_kernel_stat... $ECHO_C" >&6; }
+ if test "${ac_cv_type_struct___old_kernel_stat+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7747,50 +8184,47 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <asm/stat.h>
+
++typedef struct __old_kernel_stat ac__type_new_;
+ int
+ main ()
+ {
+-if ((struct __old_kernel_stat *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (struct __old_kernel_stat))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct___old_kernel_stat=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_struct___old_kernel_stat=no
++ ac_cv_type_struct___old_kernel_stat=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_struct___old_kernel_stat" >&5
+-echo "${ECHO_T}$ac_cv_type_struct___old_kernel_stat" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_struct___old_kernel_stat" >&5
++echo "${ECHO_T}$ac_cv_type_struct___old_kernel_stat" >&6; }
+ if test $ac_cv_type_struct___old_kernel_stat = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -7801,8 +8235,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking for struct pt_all_user_regs" >&5
+-echo $ECHO_N "checking for struct pt_all_user_regs... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct pt_all_user_regs" >&5
++echo $ECHO_N "checking for struct pt_all_user_regs... $ECHO_C" >&6; }
+ if test "${ac_cv_type_struct_pt_all_user_regs+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7814,50 +8248,47 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <sys/ptrace.h>
+
++typedef struct pt_all_user_regs ac__type_new_;
+ int
+ main ()
+ {
+-if ((struct pt_all_user_regs *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (struct pt_all_user_regs))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct_pt_all_user_regs=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_struct_pt_all_user_regs=no
++ ac_cv_type_struct_pt_all_user_regs=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_struct_pt_all_user_regs" >&5
+-echo "${ECHO_T}$ac_cv_type_struct_pt_all_user_regs" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_pt_all_user_regs" >&5
++echo "${ECHO_T}$ac_cv_type_struct_pt_all_user_regs" >&6; }
+ if test $ac_cv_type_struct_pt_all_user_regs = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -7866,8 +8297,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking for struct ia64_fpreg" >&5
+-echo $ECHO_N "checking for struct ia64_fpreg... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct ia64_fpreg" >&5
++echo $ECHO_N "checking for struct ia64_fpreg... $ECHO_C" >&6; }
+ if test "${ac_cv_type_struct_ia64_fpreg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7879,50 +8310,47 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <sys/ptrace.h>
+
++typedef struct ia64_fpreg ac__type_new_;
+ int
+ main ()
+ {
+-if ((struct ia64_fpreg *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (struct ia64_fpreg))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct_ia64_fpreg=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_struct_ia64_fpreg=no
++ ac_cv_type_struct_ia64_fpreg=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_struct_ia64_fpreg" >&5
+-echo "${ECHO_T}$ac_cv_type_struct_ia64_fpreg" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_ia64_fpreg" >&5
++echo "${ECHO_T}$ac_cv_type_struct_ia64_fpreg" >&6; }
+ if test $ac_cv_type_struct_ia64_fpreg = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -7933,8 +8361,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking for struct user_desc" >&5
+-echo $ECHO_N "checking for struct user_desc... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct user_desc" >&5
++echo $ECHO_N "checking for struct user_desc... $ECHO_C" >&6; }
+ if test "${ac_cv_type_struct_user_desc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -7946,50 +8374,47 @@ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <asm/ldt.h>
+
++typedef struct user_desc ac__type_new_;
+ int
+ main ()
+ {
+-if ((struct user_desc *) 0)
++if ((ac__type_new_ *) 0)
+ return 0;
+-if (sizeof (struct user_desc))
++if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct_user_desc=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_type_struct_user_desc=no
++ ac_cv_type_struct_user_desc=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_type_struct_user_desc" >&5
+-echo "${ECHO_T}$ac_cv_type_struct_user_desc" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_user_desc" >&5
++echo "${ECHO_T}$ac_cv_type_struct_user_desc" >&6; }
+ if test $ac_cv_type_struct_user_desc = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -8000,8 +8425,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking for struct dqblk.dqb_curblocks" >&5
+-echo $ECHO_N "checking for struct dqblk.dqb_curblocks... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for struct dqblk.dqb_curblocks" >&5
++echo $ECHO_N "checking for struct dqblk.dqb_curblocks... $ECHO_C" >&6; }
+ if test "${ac_cv_member_struct_dqblk_dqb_curblocks+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8024,33 +8449,28 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_dqblk_dqb_curblocks=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-cat >conftest.$ac_ext <<_ACEOF
++ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+ _ACEOF
+ cat confdefs.h >>conftest.$ac_ext
+@@ -8069,40 +8489,37 @@ return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_dqblk_dqb_curblocks=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_member_struct_dqblk_dqb_curblocks=no
++ ac_cv_member_struct_dqblk_dqb_curblocks=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_member_struct_dqblk_dqb_curblocks" >&5
+-echo "${ECHO_T}$ac_cv_member_struct_dqblk_dqb_curblocks" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_dqblk_dqb_curblocks" >&5
++echo "${ECHO_T}$ac_cv_member_struct_dqblk_dqb_curblocks" >&6; }
+ if test $ac_cv_member_struct_dqblk_dqb_curblocks = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -8113,8 +8530,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking whether sys_errlist is declared" >&5
+-echo $ECHO_N "checking whether sys_errlist is declared... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether sys_errlist is declared" >&5
++echo $ECHO_N "checking whether sys_errlist is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl_sys_errlist+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8129,7 +8546,7 @@ int
+ main ()
+ {
+ #ifndef sys_errlist
+- char *p = (char *) sys_errlist;
++ (void) sys_errlist;
+ #endif
+
+ ;
+@@ -8137,38 +8554,34 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_sys_errlist=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_have_decl_sys_errlist=no
++ ac_cv_have_decl_sys_errlist=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_errlist" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_sys_errlist" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_errlist" >&5
++echo "${ECHO_T}$ac_cv_have_decl_sys_errlist" >&6; }
+ if test $ac_cv_have_decl_sys_errlist = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -8185,8 +8598,8 @@ _ACEOF
+ fi
+
+
+-echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
+-echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
++echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8202,7 +8615,7 @@ int
+ main ()
+ {
+ #ifndef sys_siglist
+- char *p = (char *) sys_siglist;
++ (void) sys_siglist;
+ #endif
+
+ ;
+@@ -8210,38 +8623,34 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_sys_siglist=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_have_decl_sys_siglist=no
++ ac_cv_have_decl_sys_siglist=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
+-echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
++echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
+ if test $ac_cv_have_decl_sys_siglist = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -8256,8 +8665,8 @@ _ACEOF
+
+
+ fi
+-echo "$as_me:$LINENO: checking whether _sys_siglist is declared" >&5
+-echo $ECHO_N "checking whether _sys_siglist is declared... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking whether _sys_siglist is declared" >&5
++echo $ECHO_N "checking whether _sys_siglist is declared... $ECHO_C" >&6; }
+ if test "${ac_cv_have_decl__sys_siglist+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8273,7 +8682,7 @@ int
+ main ()
+ {
+ #ifndef _sys_siglist
+- char *p = (char *) _sys_siglist;
++ (void) _sys_siglist;
+ #endif
+
+ ;
+@@ -8281,38 +8690,34 @@ main ()
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext
+-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+- (eval $ac_compile) 2>conftest.er1
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
++ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } &&
+- { ac_try='test -z "$ac_c_werror_flag"
+- || test ! -s conftest.err'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; } &&
+- { ac_try='test -s conftest.$ac_objext'
+- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+- (eval $ac_try) 2>&5
+- ac_status=$?
+- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl__sys_siglist=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+-ac_cv_have_decl__sys_siglist=no
++ ac_cv_have_decl__sys_siglist=no
+ fi
+-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+-echo "$as_me:$LINENO: result: $ac_cv_have_decl__sys_siglist" >&5
+-echo "${ECHO_T}$ac_cv_have_decl__sys_siglist" >&6
++{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__sys_siglist" >&5
++echo "${ECHO_T}$ac_cv_have_decl__sys_siglist" >&6; }
+ if test $ac_cv_have_decl__sys_siglist = yes; then
+
+ cat >>confdefs.h <<_ACEOF
+@@ -8332,8 +8737,8 @@ fi
+
+ # Extract the first word of "perl", so it can be a program name with args.
+ set dummy perl; ac_word=$2
+-echo "$as_me:$LINENO: checking for $ac_word" >&5
+-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++{ echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+ if test "${ac_cv_path_PERL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+@@ -8348,29 +8753,30 @@ do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+ done
+ done
++IFS=$as_save_IFS
+
+ ;;
+ esac
+ fi
+ PERL=$ac_cv_path_PERL
+-
+ if test -n "$PERL"; then
+- echo "$as_me:$LINENO: result: $PERL" >&5
+-echo "${ECHO_T}$PERL" >&6
++ { echo "$as_me:$LINENO: result: $PERL" >&5
++echo "${ECHO_T}$PERL" >&6; }
+ else
+- echo "$as_me:$LINENO: result: no" >&5
+-echo "${ECHO_T}no" >&6
++ { echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6; }
+ fi
+
+
+- ac_config_files="$ac_config_files Makefile"
++
++ac_config_files="$ac_config_files Makefile"
+
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
+@@ -8390,39 +8796,58 @@ _ACEOF
+
+ # The following way of writing the cache mishandles newlines in values,
+ # but we know of no workaround that is simple, portable, and efficient.
+-# So, don't put newlines in cache variables' values.
++# So, we kill variables containing newlines.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+-{
++(
++ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
++ eval ac_val=\$$ac_var
++ case $ac_val in #(
++ *${as_nl}*)
++ case $ac_var in #(
++ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
++echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
++ esac
++ case $ac_var in #(
++ _ | IFS | as_nl) ;; #(
++ *) $as_unset $ac_var ;;
++ esac ;;
++ esac
++ done
++
+ (set) 2>&1 |
+- case `(ac_space=' '; set | grep ac_space) 2>&1` in
+- *ac_space=\ *)
++ case $as_nl`(ac_space=' '; set) 2>&1` in #(
++ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+- ;;
++ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+- sed -n \
+- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
++ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+- esac;
+-} |
++ esac |
++ sort
++) |
+ sed '
++ /^ac_cv_env_/b end
+ t clear
+- : clear
++ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+- : end' >>confcache
+-if diff $cache_file confcache >/dev/null 2>&1; then :; else
+- if test -w $cache_file; then
+- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
++ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
++ :end' >>confcache
++if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
++ if test -w "$cache_file"; then
++ test "x$cache_file" != "x/dev/null" &&
++ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
++echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+- echo "not updating unwritable cache $cache_file"
++ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
++echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+ fi
+ rm -f confcache
+@@ -8431,32 +8856,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
+ # Let make expand exec_prefix.
+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+-# VPATH may cause trouble with some makes, so we remove $(srcdir),
+-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+-# trailing colons and then remove the whole line if VPATH becomes empty
+-# (actually we leave an empty line to preserve line numbers).
+-if test "x$srcdir" = x.; then
+- ac_vpsub='/^[ ]*VPATH[ ]*=/{
+-s/:*\$(srcdir):*/:/;
+-s/:*\${srcdir}:*/:/;
+-s/:*@srcdir@:*/:/;
+-s/^\([^=]*=[ ]*\):*/\1/;
+-s/:*$//;
+-s/^[^=]*=[ ]*$//;
+-}'
+-fi
+-
+ DEFS=-DHAVE_CONFIG_H
+
+ ac_libobjs=
+ ac_ltlibobjs=
+ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+- ac_i=`echo "$ac_i" |
+- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+- # 2. Add them.
+- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
++ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
++ ac_i=`echo "$ac_i" | sed "$ac_script"`
++ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
++ # will be set to the directory where LIBOBJS objects are built.
++ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
++ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+ done
+ LIBOBJS=$ac_libobjs
+
+@@ -8550,17 +8961,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF
+ ## M4sh Initialization. ##
+ ## --------------------- ##
+
+-# Be Bourne compatible
++# Be more Bourne compatible
++DUALCASE=1; export DUALCASE # for MKS sh
+ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+- set -o posix
++ setopt NO_GLOB_SUBST
++else
++ case `(set -o) 2>/dev/null` in
++ *posix*) set -o posix ;;
++esac
++
++fi
++
++
++
++
++# PATH needs CR
++# Avoid depending upon Character Ranges.
++as_cr_letters='abcdefghijklmnopqrstuvwxyz'
++as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++as_cr_Letters=$as_cr_letters$as_cr_LETTERS
++as_cr_digits='0123456789'
++as_cr_alnum=$as_cr_Letters$as_cr_digits
++
++# The user is always right.
++if test "${PATH_SEPARATOR+set}" != set; then
++ echo "#! /bin/sh" >conf$$.sh
++ echo "exit 0" >>conf$$.sh
++ chmod +x conf$$.sh
++ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
++ PATH_SEPARATOR=';'
++ else
++ PATH_SEPARATOR=:
++ fi
++ rm -f conf$$.sh
+ fi
+-DUALCASE=1; export DUALCASE # for MKS sh
+
+ # Support unset when possible.
+ if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+@@ -8570,8 +9009,43 @@ else
+ fi
+
+
++# IFS
++# We need space, tab and new line, in precisely that order. Quoting is
++# there to prevent editors from complaining about space-tab.
++# (If _AS_PATH_WALK were called with IFS unset, it would disable word
++# splitting by setting IFS to empty value.)
++as_nl='
++'
++IFS=" "" $as_nl"
++
++# Find who we are. Look in the path if we contain no directory separator.
++case $0 in
++ *[\\/]* ) as_myself=$0 ;;
++ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
++done
++IFS=$as_save_IFS
++
++ ;;
++esac
++# We did not find ourselves, most probably we were run as `sh COMMAND'
++# in which case we are not to be found in the path.
++if test "x$as_myself" = x; then
++ as_myself=$0
++fi
++if test ! -f "$as_myself"; then
++ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
++ { (exit 1); exit 1; }
++fi
++
+ # Work around bugs in pre-3.0 UWIN ksh.
+-$as_unset ENV MAIL MAILPATH
++for as_var in ENV MAIL MAILPATH
++do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
++done
+ PS1='$ '
+ PS2='> '
+ PS4='+ '
+@@ -8585,18 +9059,19 @@ do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+- $as_unset $as_var
++ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+ done
+
+ # Required to use basename.
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
++if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+ else
+ as_basename=false
+@@ -8604,159 +9079,120 @@ fi
+
+
+ # Name of the executable.
+-as_me=`$as_basename "$0" ||
++as_me=`$as_basename -- "$0" ||
+ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+- X"$0" : 'X\(/\)$' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X/"$0" |
+- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+- /^X\/\(\/\/\)$/{ s//\1/; q; }
+- /^X\/\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+-
+-
+-# PATH needs CR, and LINENO needs CR and PATH.
+-# Avoid depending upon Character Ranges.
+-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+-as_cr_digits='0123456789'
+-as_cr_alnum=$as_cr_Letters$as_cr_digits
++ sed '/^.*\/\([^/][^/]*\)\/*$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\/\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+
+-# The user is always right.
+-if test "${PATH_SEPARATOR+set}" != set; then
+- echo "#! /bin/sh" >conf$$.sh
+- echo "exit 0" >>conf$$.sh
+- chmod +x conf$$.sh
+- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+- PATH_SEPARATOR=';'
+- else
+- PATH_SEPARATOR=:
+- fi
+- rm -f conf$$.sh
+-fi
++# CDPATH.
++$as_unset CDPATH
+
+
+- as_lineno_1=$LINENO
+- as_lineno_2=$LINENO
+- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+- test "x$as_lineno_1" != "x$as_lineno_2" &&
+- test "x$as_lineno_3" = "x$as_lineno_2" || {
+- # Find who we are. Look in the path if we contain no path at all
+- # relative or not.
+- case $0 in
+- *[\\/]* ) as_myself=$0 ;;
+- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in $PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+-done
+
+- ;;
+- esac
+- # We did not find ourselves, most probably we were run as `sh COMMAND'
+- # in which case we are not to be found in the path.
+- if test "x$as_myself" = x; then
+- as_myself=$0
+- fi
+- if test ! -f "$as_myself"; then
+- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+- { (exit 1); exit 1; }; }
+- fi
+- case $CONFIG_SHELL in
+- '')
+- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+-do
+- IFS=$as_save_IFS
+- test -z "$as_dir" && as_dir=.
+- for as_base in sh bash ksh sh5; do
+- case $as_dir in
+- /*)
+- if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+- CONFIG_SHELL=$as_dir/$as_base
+- export CONFIG_SHELL
+- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+- fi;;
+- esac
+- done
+-done
+-;;
+- esac
++ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+- # line-number line before each line; the second 'sed' does the real
+- # work. The second script uses 'N' to pair each line-number line
+- # with the numbered line, and appends trailing '-' during
+- # substitution so that $LINENO is not a special case at line end.
++ # line-number line after each line using $LINENO; the second 'sed'
++ # does the real work. The second script uses 'N' to pair each
++ # line-number line with the line containing $LINENO, and appends
++ # trailing '-' during substitution so that $LINENO is not a special
++ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+- sed '=' <$as_myself |
++ # scripts with optimization help from Paolo Bonzini. Blame Lee
++ # E. McMahon (1931-1989) for sed's syntax. :-)
++ sed -n '
++ p
++ /[$]LINENO/=
++ ' <$as_myself |
+ sed '
++ s/[$]LINENO.*/&-/
++ t lineno
++ b
++ :lineno
+ N
+- s,$,-,
+- : loop
+- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
++ :loop
++ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+- s,-$,,
+- s,^['$as_cr_digits']*\n,,
++ s/-\n.*//
+ ' >$as_me.lineno &&
+- chmod +x $as_me.lineno ||
+- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
++ chmod +x "$as_me.lineno" ||
++ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+- # original and so on. Autoconf is especially sensible to this).
+- . ./$as_me.lineno
++ # original and so on. Autoconf is especially sensitive to this).
++ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+ }
+
+
+-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+- *c*,-n*) ECHO_N= ECHO_C='
+-' ECHO_T=' ' ;;
+- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
++if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
++ as_dirname=dirname
++else
++ as_dirname=false
++fi
++
++ECHO_C= ECHO_N= ECHO_T=
++case `echo -n x` in
++-n*)
++ case `echo 'x\c'` in
++ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
++ *) ECHO_C='\c';;
++ esac;;
++*)
++ ECHO_N='-n';;
+ esac
+
+-if expr a : '\(a\)' >/dev/null 2>&1; then
++if expr a : '\(a\)' >/dev/null 2>&1 &&
++ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+ else
+ as_expr=false
+ fi
+
+ rm -f conf$$ conf$$.exe conf$$.file
++if test -d conf$$.dir; then
++ rm -f conf$$.dir/conf$$.file
++else
++ rm -f conf$$.dir
++ mkdir conf$$.dir
++fi
+ echo >conf$$.file
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+- # We could just check for DJGPP; but this test a) works b) is more generic
+- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+- if test -f conf$$.exe; then
+- # Don't use ln at all; we don't have any links
++ as_ln_s='ln -s'
++ # ... but there are two gotchas:
++ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
++ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
++ # In both cases, we have to default to `cp -p'.
++ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+- else
+- as_ln_s='ln -s'
+- fi
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+-rm -f conf$$ conf$$.exe conf$$.file
++rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
++rmdir conf$$.dir 2>/dev/null
+
+ if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+@@ -8765,7 +9201,28 @@ else
+ as_mkdir_p=false
+ fi
+
+-as_executable_p="test -f"
++if test -x / >/dev/null 2>&1; then
++ as_test_x='test -x'
++else
++ if ls -dL / >/dev/null 2>&1; then
++ as_ls_L_option=L
++ else
++ as_ls_L_option=
++ fi
++ as_test_x='
++ eval sh -c '\''
++ if test -d "$1"; then
++ test -d "$1/.";
++ else
++ case $1 in
++ -*)set "./$1";;
++ esac;
++ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
++ ???[sx]*):;;*)false;;esac;fi
++ '\'' sh
++ '
++fi
++as_executable_p=$as_test_x
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -8774,31 +9231,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+-# IFS
+-# We need space, tab and new line, in precisely that order.
+-as_nl='
+-'
+-IFS=" $as_nl"
+-
+-# CDPATH.
+-$as_unset CDPATH
+-
+ exec 6>&1
+
+-# Open the log real soon, to keep \$[0] and so on meaningful, and to
++# Save the log message, to keep $[0] and so on meaningful, and to
+ # report actual input values of CONFIG_FILES etc. instead of their
+-# values after options handling. Logging --version etc. is OK.
+-exec 5>>config.log
+-{
+- echo
+- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+-## Running $as_me. ##
+-_ASBOX
+-} >&5
+-cat >&5 <<_CSEOF
+-
++# values after options handling.
++ac_log="
+ This file was extended by strace $as_me 4.5.15, which was
+-generated by GNU Autoconf 2.59. Invocation command line was
++generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+@@ -8806,30 +9246,20 @@ generated by GNU Autoconf 2.59. Invocation command line was
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+-_CSEOF
+-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+-echo >&5
++on `(hostname || uname -n) 2>/dev/null | sed 1q`
++"
++
+ _ACEOF
+
++cat >>$CONFIG_STATUS <<_ACEOF
+ # Files that config.status was made for.
+-if test -n "$ac_config_files"; then
+- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+-fi
++config_files="$ac_config_files"
++config_headers="$ac_config_headers"
++config_commands="$ac_config_commands"
+
+-if test -n "$ac_config_headers"; then
+- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+-fi
+-
+-if test -n "$ac_config_links"; then
+- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+-fi
+-
+-if test -n "$ac_config_commands"; then
+- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+-fi
++_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+-
+ ac_cs_usage="\
+ \`$as_me' instantiates files from templates according to the
+ current configuration.
+@@ -8837,7 +9267,7 @@ current configuration.
+ Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+- -V, --version print version number, then exit
++ -V, --version print version number and configuration settings, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+@@ -8856,19 +9286,21 @@ Configuration commands:
+ $config_commands
+
+ Report bugs to <bug-autoconf@gnu.org>."
+-_ACEOF
+
++_ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ ac_cs_version="\\
+ strace config.status 4.5.15
+-configured by $0, generated by GNU Autoconf 2.59,
+- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
++configured by $0, generated by GNU Autoconf 2.61,
++ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+-Copyright (C) 2003 Free Software Foundation, Inc.
++Copyright (C) 2006 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+-srcdir=$srcdir
+-INSTALL="$INSTALL"
++
++ac_pwd='$ac_pwd'
++srcdir='$srcdir'
++INSTALL='$INSTALL'
+ _ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+@@ -8879,39 +9311,24 @@ while test $# != 0
+ do
+ case $1 in
+ --*=*)
+- ac_option=`expr "x$1" : 'x\([^=]*\)='`
+- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
++ ac_option=`expr "X$1" : 'X\([^=]*\)='`
++ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+- -*)
++ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+- *) # This is not an option, so the user has probably given explicit
+- # arguments.
+- ac_option=$1
+- ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+-_ACEOF
+-cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+- --version | --vers* | -V )
+- echo "$ac_cs_version"; exit 0 ;;
+- --he | --h)
+- # Conflict between --help and --header
+- { { echo "$as_me:$LINENO: error: ambiguous option: $1
+-Try \`$0 --help' for more information." >&5
+-echo "$as_me: error: ambiguous option: $1
+-Try \`$0 --help' for more information." >&2;}
+- { (exit 1); exit 1; }; };;
+- --help | --hel | -h )
+- echo "$ac_cs_usage"; exit 0 ;;
+- --debug | --d* | -d )
++ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
++ echo "$ac_cs_version"; exit ;;
++ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+@@ -8921,18 +9338,24 @@ Try \`$0 --help' for more information." >&2;}
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
++ --he | --h)
++ # Conflict between --help and --header
++ { echo "$as_me: error: ambiguous option: $1
++Try \`$0 --help' for more information." >&2
++ { (exit 1); exit 1; }; };;
++ --help | --hel | -h )
++ echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+-Try \`$0 --help' for more information." >&5
+-echo "$as_me: error: unrecognized option: $1
+-Try \`$0 --help' for more information." >&2;}
++ -*) { echo "$as_me: error: unrecognized option: $1
++Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+- *) ac_config_targets="$ac_config_targets $1" ;;
++ *) ac_config_targets="$ac_config_targets $1"
++ ac_need_defaults=false ;;
+
+ esac
+ shift
+@@ -8948,37 +9371,49 @@ fi
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ if \$ac_cs_recheck; then
+- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
++ CONFIG_SHELL=$SHELL
++ export CONFIG_SHELL
++ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ fi
+
+ _ACEOF
++cat >>$CONFIG_STATUS <<\_ACEOF
++exec 5>>config.log
++{
++ echo
++ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
++## Running $as_me. ##
++_ASBOX
++ echo "$ac_log"
++} >&5
+
++_ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF
+ #
+-# INIT-COMMANDS section.
++# INIT-COMMANDS
+ #
+-
+ AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+ _ACEOF
+
+-
+-
+ cat >>$CONFIG_STATUS <<\_ACEOF
++
++# Handling of arguments.
+ for ac_config_target in $ac_config_targets
+ do
+- case "$ac_config_target" in
+- # Handling of arguments.
+- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ case $ac_config_target in
++ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
++ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
++ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
++
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+ echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ done
+
++
+ # If the user did not use the arguments to specify the items to instantiate,
+ # then the envvar interface is used. Set only those that are not.
+ # We use the long form for the default assignment because of an extremely
+@@ -8990,353 +9425,461 @@ if $ac_need_defaults; then
+ fi
+
+ # Have a temporary directory for convenience. Make it in the build tree
+-# simply because there is no reason to put it here, and in addition,
++# simply because there is no reason against having it here, and in addition,
+ # creating and moving files from /tmp can sometimes cause problems.
+-# Create a temporary directory, and hook for its removal unless debugging.
++# Hook for its removal unless debugging.
++# Note that there is a small window in which the directory will not be cleaned:
++# after its creation but before its name has been assigned to `$tmp'.
+ $debug ||
+ {
+- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
++ tmp=
++ trap 'exit_status=$?
++ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
++' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+ }
+-
+ # Create a (secure) tmp directory for tmp files.
+
+ {
+- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
++ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+ } ||
+ {
+- tmp=./confstat$$-$RANDOM
+- (umask 077 && mkdir $tmp)
++ tmp=./conf$$-$RANDOM
++ (umask 077 && mkdir "$tmp")
+ } ||
+ {
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+ }
+
+-_ACEOF
+-
+-cat >>$CONFIG_STATUS <<_ACEOF
+-
+ #
+-# CONFIG_FILES section.
++# Set up the sed scripts for CONFIG_FILES section.
+ #
+
+ # No need to generate the scripts if there are no CONFIG_FILES.
+ # This happens for instance when ./config.status config.h
+-if test -n "\$CONFIG_FILES"; then
+- # Protect against being on the right side of a sed subst in config.status.
+- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+-s,@SHELL@,$SHELL,;t t
+-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+-s,@exec_prefix@,$exec_prefix,;t t
+-s,@prefix@,$prefix,;t t
+-s,@program_transform_name@,$program_transform_name,;t t
+-s,@bindir@,$bindir,;t t
+-s,@sbindir@,$sbindir,;t t
+-s,@libexecdir@,$libexecdir,;t t
+-s,@datadir@,$datadir,;t t
+-s,@sysconfdir@,$sysconfdir,;t t
+-s,@sharedstatedir@,$sharedstatedir,;t t
+-s,@localstatedir@,$localstatedir,;t t
+-s,@libdir@,$libdir,;t t
+-s,@includedir@,$includedir,;t t
+-s,@oldincludedir@,$oldincludedir,;t t
+-s,@infodir@,$infodir,;t t
+-s,@mandir@,$mandir,;t t
+-s,@build_alias@,$build_alias,;t t
+-s,@host_alias@,$host_alias,;t t
+-s,@target_alias@,$target_alias,;t t
+-s,@DEFS@,$DEFS,;t t
+-s,@ECHO_C@,$ECHO_C,;t t
+-s,@ECHO_N@,$ECHO_N,;t t
+-s,@ECHO_T@,$ECHO_T,;t t
+-s,@LIBS@,$LIBS,;t t
+-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+-s,@CYGPATH_W@,$CYGPATH_W,;t t
+-s,@PACKAGE@,$PACKAGE,;t t
+-s,@VERSION@,$VERSION,;t t
+-s,@ACLOCAL@,$ACLOCAL,;t t
+-s,@AUTOCONF@,$AUTOCONF,;t t
+-s,@AUTOMAKE@,$AUTOMAKE,;t t
+-s,@AUTOHEADER@,$AUTOHEADER,;t t
+-s,@MAKEINFO@,$MAKEINFO,;t t
+-s,@install_sh@,$install_sh,;t t
+-s,@STRIP@,$STRIP,;t t
+-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+-s,@mkdir_p@,$mkdir_p,;t t
+-s,@AWK@,$AWK,;t t
+-s,@SET_MAKE@,$SET_MAKE,;t t
+-s,@am__leading_dot@,$am__leading_dot,;t t
+-s,@AMTAR@,$AMTAR,;t t
+-s,@am__tar@,$am__tar,;t t
+-s,@am__untar@,$am__untar,;t t
+-s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+-s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+-s,@MAINT@,$MAINT,;t t
+-s,@build@,$build,;t t
+-s,@build_cpu@,$build_cpu,;t t
+-s,@build_vendor@,$build_vendor,;t t
+-s,@build_os@,$build_os,;t t
+-s,@host@,$host,;t t
+-s,@host_cpu@,$host_cpu,;t t
+-s,@host_vendor@,$host_vendor,;t t
+-s,@host_os@,$host_os,;t t
+-s,@opsys@,$opsys,;t t
+-s,@arch@,$arch,;t t
+-s,@LINUX_TRUE@,$LINUX_TRUE,;t t
+-s,@LINUX_FALSE@,$LINUX_FALSE,;t t
+-s,@I386_TRUE@,$I386_TRUE,;t t
+-s,@I386_FALSE@,$I386_FALSE,;t t
+-s,@X86_64_TRUE@,$X86_64_TRUE,;t t
+-s,@X86_64_FALSE@,$X86_64_FALSE,;t t
+-s,@SUNOS4_TRUE@,$SUNOS4_TRUE,;t t
+-s,@SUNOS4_FALSE@,$SUNOS4_FALSE,;t t
+-s,@SVR4_TRUE@,$SVR4_TRUE,;t t
+-s,@SVR4_FALSE@,$SVR4_FALSE,;t t
+-s,@FREEBSD_TRUE@,$FREEBSD_TRUE,;t t
+-s,@FREEBSD_FALSE@,$FREEBSD_FALSE,;t t
+-s,@CC@,$CC,;t t
+-s,@CFLAGS@,$CFLAGS,;t t
+-s,@LDFLAGS@,$LDFLAGS,;t t
+-s,@CPPFLAGS@,$CPPFLAGS,;t t
+-s,@ac_ct_CC@,$ac_ct_CC,;t t
+-s,@EXEEXT@,$EXEEXT,;t t
+-s,@OBJEXT@,$OBJEXT,;t t
+-s,@DEPDIR@,$DEPDIR,;t t
+-s,@am__include@,$am__include,;t t
+-s,@am__quote@,$am__quote,;t t
+-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
+-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
+-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+-s,@CCDEPMODE@,$CCDEPMODE,;t t
+-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+-s,@WARNFLAGS@,$WARNFLAGS,;t t
+-s,@CPP@,$CPP,;t t
+-s,@EGREP@,$EGREP,;t t
+-s,@PERL@,$PERL,;t t
+-s,@LIBOBJS@,$LIBOBJS,;t t
+-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+-CEOF
+-
+-_ACEOF
+-
+- cat >>$CONFIG_STATUS <<\_ACEOF
+- # Split the substitutions into bite-sized pieces for seds with
+- # small command number limits, like on Digital OSF/1 and HP-UX.
+- ac_max_sed_lines=48
+- ac_sed_frag=1 # Number of current file.
+- ac_beg=1 # First line for current file.
+- ac_end=$ac_max_sed_lines # Line after last line for current file.
+- ac_more_lines=:
+- ac_sed_cmds=
+- while $ac_more_lines; do
+- if test $ac_beg -gt 1; then
+- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+- else
+- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+- fi
+- if test ! -s $tmp/subs.frag; then
+- ac_more_lines=false
+- else
+- # The purpose of the label and of the branching condition is to
+- # speed up the sed processing (if there are no `@' at all, there
+- # is no need to browse any of the substitutions).
+- # These are the two extra sed commands mentioned above.
+- (echo ':t
+- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+- if test -z "$ac_sed_cmds"; then
+- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+- else
+- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+- fi
+- ac_sed_frag=`expr $ac_sed_frag + 1`
+- ac_beg=$ac_end
+- ac_end=`expr $ac_end + $ac_max_sed_lines`
+- fi
+- done
+- if test -z "$ac_sed_cmds"; then
+- ac_sed_cmds=cat
++if test -n "$CONFIG_FILES"; then
++
++_ACEOF
++
++
++
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ cat >conf$$subs.sed <<_ACEOF
++SHELL!$SHELL$ac_delim
++PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
++PACKAGE_NAME!$PACKAGE_NAME$ac_delim
++PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
++PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
++PACKAGE_STRING!$PACKAGE_STRING$ac_delim
++PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
++exec_prefix!$exec_prefix$ac_delim
++prefix!$prefix$ac_delim
++program_transform_name!$program_transform_name$ac_delim
++bindir!$bindir$ac_delim
++sbindir!$sbindir$ac_delim
++libexecdir!$libexecdir$ac_delim
++datarootdir!$datarootdir$ac_delim
++datadir!$datadir$ac_delim
++sysconfdir!$sysconfdir$ac_delim
++sharedstatedir!$sharedstatedir$ac_delim
++localstatedir!$localstatedir$ac_delim
++includedir!$includedir$ac_delim
++oldincludedir!$oldincludedir$ac_delim
++docdir!$docdir$ac_delim
++infodir!$infodir$ac_delim
++htmldir!$htmldir$ac_delim
++dvidir!$dvidir$ac_delim
++pdfdir!$pdfdir$ac_delim
++psdir!$psdir$ac_delim
++libdir!$libdir$ac_delim
++localedir!$localedir$ac_delim
++mandir!$mandir$ac_delim
++DEFS!$DEFS$ac_delim
++ECHO_C!$ECHO_C$ac_delim
++ECHO_N!$ECHO_N$ac_delim
++ECHO_T!$ECHO_T$ac_delim
++LIBS!$LIBS$ac_delim
++build_alias!$build_alias$ac_delim
++host_alias!$host_alias$ac_delim
++target_alias!$target_alias$ac_delim
++INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
++INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
++INSTALL_DATA!$INSTALL_DATA$ac_delim
++CYGPATH_W!$CYGPATH_W$ac_delim
++PACKAGE!$PACKAGE$ac_delim
++VERSION!$VERSION$ac_delim
++ACLOCAL!$ACLOCAL$ac_delim
++AUTOCONF!$AUTOCONF$ac_delim
++AUTOMAKE!$AUTOMAKE$ac_delim
++AUTOHEADER!$AUTOHEADER$ac_delim
++MAKEINFO!$MAKEINFO$ac_delim
++install_sh!$install_sh$ac_delim
++STRIP!$STRIP$ac_delim
++INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
++mkdir_p!$mkdir_p$ac_delim
++AWK!$AWK$ac_delim
++SET_MAKE!$SET_MAKE$ac_delim
++am__leading_dot!$am__leading_dot$ac_delim
++AMTAR!$AMTAR$ac_delim
++am__tar!$am__tar$ac_delim
++am__untar!$am__untar$ac_delim
++MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim
++MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim
++MAINT!$MAINT$ac_delim
++build!$build$ac_delim
++build_cpu!$build_cpu$ac_delim
++build_vendor!$build_vendor$ac_delim
++build_os!$build_os$ac_delim
++host!$host$ac_delim
++host_cpu!$host_cpu$ac_delim
++host_vendor!$host_vendor$ac_delim
++host_os!$host_os$ac_delim
++opsys!$opsys$ac_delim
++arch!$arch$ac_delim
++LINUX_TRUE!$LINUX_TRUE$ac_delim
++LINUX_FALSE!$LINUX_FALSE$ac_delim
++I386_TRUE!$I386_TRUE$ac_delim
++I386_FALSE!$I386_FALSE$ac_delim
++X86_64_TRUE!$X86_64_TRUE$ac_delim
++X86_64_FALSE!$X86_64_FALSE$ac_delim
++SUNOS4_TRUE!$SUNOS4_TRUE$ac_delim
++SUNOS4_FALSE!$SUNOS4_FALSE$ac_delim
++SVR4_TRUE!$SVR4_TRUE$ac_delim
++SVR4_FALSE!$SVR4_FALSE$ac_delim
++FREEBSD_TRUE!$FREEBSD_TRUE$ac_delim
++FREEBSD_FALSE!$FREEBSD_FALSE$ac_delim
++CC!$CC$ac_delim
++CFLAGS!$CFLAGS$ac_delim
++LDFLAGS!$LDFLAGS$ac_delim
++CPPFLAGS!$CPPFLAGS$ac_delim
++ac_ct_CC!$ac_ct_CC$ac_delim
++EXEEXT!$EXEEXT$ac_delim
++OBJEXT!$OBJEXT$ac_delim
++DEPDIR!$DEPDIR$ac_delim
++am__include!$am__include$ac_delim
++am__quote!$am__quote$ac_delim
++AMDEP_TRUE!$AMDEP_TRUE$ac_delim
++AMDEP_FALSE!$AMDEP_FALSE$ac_delim
++AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
++CCDEPMODE!$CCDEPMODE$ac_delim
++_ACEOF
++
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
++ break
++ elif $ac_last_try; then
++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
++ { (exit 1); exit 1; }; }
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+-fi # test -n "$CONFIG_FILES"
++done
++
++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
++if test -n "$ac_eof"; then
++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
++ ac_eof=`expr $ac_eof + 1`
++fi
+
++cat >>$CONFIG_STATUS <<_ACEOF
++cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
++_ACEOF
++sed '
++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
++s/^/s,@/; s/!/@,|#_!!_#|/
++:n
++t n
++s/'"$ac_delim"'$/,g/; t
++s/$/\\/; p
++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
++' >>$CONFIG_STATUS <conf$$subs.sed
++rm -f conf$$subs.sed
++cat >>$CONFIG_STATUS <<_ACEOF
++CEOF$ac_eof
++_ACEOF
++
++
++ac_delim='%!_!# '
++for ac_last_try in false false false false false :; do
++ cat >conf$$subs.sed <<_ACEOF
++am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
++am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
++WARNFLAGS!$WARNFLAGS$ac_delim
++CPP!$CPP$ac_delim
++GREP!$GREP$ac_delim
++EGREP!$EGREP$ac_delim
++PERL!$PERL$ac_delim
++LIBOBJS!$LIBOBJS$ac_delim
++LTLIBOBJS!$LTLIBOBJS$ac_delim
+ _ACEOF
++
++ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
++ break
++ elif $ac_last_try; then
++ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
++echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
++ { (exit 1); exit 1; }; }
++ else
++ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
++ fi
++done
++
++ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
++if test -n "$ac_eof"; then
++ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
++ ac_eof=`expr $ac_eof + 1`
++fi
++
++cat >>$CONFIG_STATUS <<_ACEOF
++cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
++/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
++_ACEOF
++sed '
++s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
++s/^/s,@/; s/!/@,|#_!!_#|/
++:n
++t n
++s/'"$ac_delim"'$/,g/; t
++s/$/\\/; p
++N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
++' >>$CONFIG_STATUS <conf$$subs.sed
++rm -f conf$$subs.sed
++cat >>$CONFIG_STATUS <<_ACEOF
++:end
++s/|#_!!_#|//g
++CEOF$ac_eof
++_ACEOF
++
++
++# VPATH may cause trouble with some makes, so we remove $(srcdir),
++# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
++# trailing colons and then remove the whole line if VPATH becomes empty
++# (actually we leave an empty line to preserve line numbers).
++if test "x$srcdir" = x.; then
++ ac_vpsub='/^[ ]*VPATH[ ]*=/{
++s/:*\$(srcdir):*/:/
++s/:*\${srcdir}:*/:/
++s/:*@srcdir@:*/:/
++s/^\([^=]*=[ ]*\):*/\1/
++s/:*$//
++s/^[^=]*=[ ]*$//
++}'
++fi
++
+ cat >>$CONFIG_STATUS <<\_ACEOF
+-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+- case $ac_file in
+- - | *:- | *:-:* ) # input from stdin
+- cat >$tmp/stdin
+- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+- * ) ac_file_in=$ac_file.in ;;
++fi # test -n "$CONFIG_FILES"
++
++
++for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
++do
++ case $ac_tag in
++ :[FHLC]) ac_mode=$ac_tag; continue;;
++ esac
++ case $ac_mode$ac_tag in
++ :[FHL]*:*);;
++ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
++echo "$as_me: error: Invalid tag $ac_tag." >&2;}
++ { (exit 1); exit 1; }; };;
++ :[FH]-) ac_tag=-:-;;
++ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
++ esac
++ ac_save_IFS=$IFS
++ IFS=:
++ set x $ac_tag
++ IFS=$ac_save_IFS
++ shift
++ ac_file=$1
++ shift
++
++ case $ac_mode in
++ :L) ac_source=$1;;
++ :[FH])
++ ac_file_inputs=
++ for ac_f
++ do
++ case $ac_f in
++ -) ac_f="$tmp/stdin";;
++ *) # Look for the file first in the build tree, then in the source tree
++ # (if the path is not absolute). The absolute path cannot be DOS-style,
++ # because $ac_f cannot contain `:'.
++ test -f "$ac_f" ||
++ case $ac_f in
++ [\\/$]*) false;;
++ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
++ esac ||
++ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
++echo "$as_me: error: cannot find input file: $ac_f" >&2;}
++ { (exit 1); exit 1; }; };;
++ esac
++ ac_file_inputs="$ac_file_inputs $ac_f"
++ done
++
++ # Let's still pretend it is `configure' which instantiates (i.e., don't
++ # use $as_me), people would be surprised to read:
++ # /* config.h. Generated by config.status. */
++ configure_input="Generated from "`IFS=:
++ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
++ if test x"$ac_file" != x-; then
++ configure_input="$ac_file. $configure_input"
++ { echo "$as_me:$LINENO: creating $ac_file" >&5
++echo "$as_me: creating $ac_file" >&6;}
++ fi
++
++ case $ac_tag in
++ *:-:* | *:-) cat >"$tmp/stdin";;
++ esac
++ ;;
+ esac
+
+- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
++ ac_dir=`$as_dirname -- "$ac_file" ||
+ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+- X"$ac_file" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$ac_file" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- { if $as_mkdir_p; then
+- mkdir -p "$ac_dir"
+- else
+- as_dir="$ac_dir"
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ { as_dir="$ac_dir"
++ case $as_dir in #(
++ -*) as_dir=./$as_dir;;
++ esac
++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+- while test ! -d "$as_dir"; do
+- as_dirs="$as_dir $as_dirs"
+- as_dir=`(dirname "$as_dir") 2>/dev/null ||
++ while :; do
++ case $as_dir in #(
++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
++ *) as_qdir=$as_dir;;
++ esac
++ as_dirs="'$as_qdir' $as_dirs"
++ as_dir=`$as_dirname -- "$as_dir" ||
+ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+- X"$as_dir" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$as_dir" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ test -d "$as_dir" && break
+ done
+- test ! -n "$as_dirs" || mkdir $as_dirs
+- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
++ test -z "$as_dirs" || eval "mkdir $as_dirs"
++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
++echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+-
+ ac_builddir=.
+
+-if test "$ac_dir" != .; then
++case "$ac_dir" in
++.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
++*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+- # A "../" for each directory in $ac_dir_suffix.
+- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+-else
+- ac_dir_suffix= ac_top_builddir=
+-fi
++ # A ".." for each directory in $ac_dir_suffix.
++ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
++ case $ac_top_builddir_sub in
++ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
++ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
++ esac ;;
++esac
++ac_abs_top_builddir=$ac_pwd
++ac_abs_builddir=$ac_pwd$ac_dir_suffix
++# for backward compatibility:
++ac_top_builddir=$ac_top_build_prefix
+
+ case $srcdir in
+- .) # No --srcdir option. We are building in place.
++ .) # We are building in place.
+ ac_srcdir=.
+- if test -z "$ac_top_builddir"; then
+- ac_top_srcdir=.
+- else
+- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+- fi ;;
+- [\\/]* | ?:[\\/]* ) # Absolute path.
++ ac_top_srcdir=$ac_top_builddir_sub
++ ac_abs_top_srcdir=$ac_pwd ;;
++ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+- ac_top_srcdir=$srcdir ;;
+- *) # Relative path.
+- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+- ac_top_srcdir=$ac_top_builddir$srcdir ;;
++ ac_top_srcdir=$srcdir
++ ac_abs_top_srcdir=$srcdir ;;
++ *) # Relative name.
++ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
++ ac_top_srcdir=$ac_top_build_prefix$srcdir
++ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+ esac
++ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+-# Do not use `cd foo && pwd` to compute absolute paths, because
+-# the directories may not exist.
+-case `pwd` in
+-.) ac_abs_builddir="$ac_dir";;
+-*)
+- case "$ac_dir" in
+- .) ac_abs_builddir=`pwd`;;
+- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+- *) ac_abs_builddir=`pwd`/"$ac_dir";;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_builddir=${ac_top_builddir}.;;
+-*)
+- case ${ac_top_builddir}. in
+- .) ac_abs_top_builddir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_srcdir=$ac_srcdir;;
+-*)
+- case $ac_srcdir in
+- .) ac_abs_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_srcdir=$ac_top_srcdir;;
+-*)
+- case $ac_top_srcdir in
+- .) ac_abs_top_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+- esac;;
+-esac
+
++ case $ac_mode in
++ :F)
++ #
++ # CONFIG_FILE
++ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
++ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
++_ACEOF
+
+- if test x"$ac_file" != x-; then
+- { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+- rm -f "$ac_file"
+- fi
+- # Let's still pretend it is `configure' which instantiates (i.e., don't
+- # use $as_me), people would be surprised to read:
+- # /* config.h. Generated by config.status. */
+- if test x"$ac_file" = x-; then
+- configure_input=
+- else
+- configure_input="$ac_file. "
+- fi
+- configure_input=$configure_input"Generated from `echo $ac_file_in |
+- sed 's,.*/,,'` by configure."
+-
+- # First look for the input files in the build tree, otherwise in the
+- # src tree.
+- ac_file_inputs=`IFS=:
+- for f in $ac_file_in; do
+- case $f in
+- -) echo $tmp/stdin ;;
+- [\\/$]*)
+- # Absolute (can't be DOS-style, as IFS=:)
+- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+- { (exit 1); exit 1; }; }
+- echo "$f";;
+- *) # Relative
+- if test -f "$f"; then
+- # Build tree
+- echo "$f"
+- elif test -f "$srcdir/$f"; then
+- # Source tree
+- echo "$srcdir/$f"
+- else
+- # /dev/null tree
+- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+- { (exit 1); exit 1; }; }
+- fi;;
+- esac
+- done` || { (exit 1); exit 1; }
++cat >>$CONFIG_STATUS <<\_ACEOF
++# If the template does not know about datarootdir, expand it.
++# FIXME: This hack should be removed a few years after 2.60.
++ac_datarootdir_hack=; ac_datarootdir_seen=
++
++case `sed -n '/datarootdir/ {
++ p
++ q
++}
++/@datadir@/p
++/@docdir@/p
++/@infodir@/p
++/@localedir@/p
++/@mandir@/p
++' $ac_file_inputs` in
++*datarootdir*) ac_datarootdir_seen=yes;;
++*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
++ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
++echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
++_ACEOF
++cat >>$CONFIG_STATUS <<_ACEOF
++ ac_datarootdir_hack='
++ s&@datadir@&$datadir&g
++ s&@docdir@&$docdir&g
++ s&@infodir@&$infodir&g
++ s&@localedir@&$localedir&g
++ s&@mandir@&$mandir&g
++ s&\\\${datarootdir}&$datarootdir&g' ;;
++esac
+ _ACEOF
++
++# Neutralize VPATH when `$srcdir' = `.'.
++# Shell code in configure.ac might set extrasub.
++# FIXME: do we really want to maintain this feature?
+ cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+ $extrasub
+@@ -9344,248 +9887,130 @@ _ACEOF
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ :t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+-s,@configure_input@,$configure_input,;t t
+-s,@srcdir@,$ac_srcdir,;t t
+-s,@abs_srcdir@,$ac_abs_srcdir,;t t
+-s,@top_srcdir@,$ac_top_srcdir,;t t
+-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+-s,@builddir@,$ac_builddir,;t t
+-s,@abs_builddir@,$ac_abs_builddir,;t t
+-s,@top_builddir@,$ac_top_builddir,;t t
+-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+-s,@INSTALL@,$ac_INSTALL,;t t
+-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+- rm -f $tmp/stdin
+- if test x"$ac_file" != x-; then
+- mv $tmp/out $ac_file
+- else
+- cat $tmp/out
+- rm -f $tmp/out
+- fi
+-
+-done
+-_ACEOF
+-cat >>$CONFIG_STATUS <<\_ACEOF
+-
+-#
+-# CONFIG_HEADER section.
+-#
+-
+-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+-# NAME is the cpp macro being defined and VALUE is the value it is being given.
+-#
+-# ac_d sets the value in "#define NAME VALUE" lines.
+-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+-ac_dB='[ ].*$,\1#\2'
+-ac_dC=' '
+-ac_dD=',;t'
+-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+-ac_uB='$,\1#\2define\3'
+-ac_uC=' '
+-ac_uD=',;t'
+-
+-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
++s&@configure_input@&$configure_input&;t t
++s&@top_builddir@&$ac_top_builddir_sub&;t t
++s&@srcdir@&$ac_srcdir&;t t
++s&@abs_srcdir@&$ac_abs_srcdir&;t t
++s&@top_srcdir@&$ac_top_srcdir&;t t
++s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
++s&@builddir@&$ac_builddir&;t t
++s&@abs_builddir@&$ac_abs_builddir&;t t
++s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
++s&@INSTALL@&$ac_INSTALL&;t t
++$ac_datarootdir_hack
++" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
++
++test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
++ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
++ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
++ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined." >&5
++echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
++which seems to be undefined. Please make sure it is defined." >&2;}
++
++ rm -f "$tmp/stdin"
+ case $ac_file in
+- - | *:- | *:-:* ) # input from stdin
+- cat >$tmp/stdin
+- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+- * ) ac_file_in=$ac_file.in ;;
++ -) cat "$tmp/out"; rm -f "$tmp/out";;
++ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+-
+- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+-echo "$as_me: creating $ac_file" >&6;}
+-
+- # First look for the input files in the build tree, otherwise in the
+- # src tree.
+- ac_file_inputs=`IFS=:
+- for f in $ac_file_in; do
+- case $f in
+- -) echo $tmp/stdin ;;
+- [\\/$]*)
+- # Absolute (can't be DOS-style, as IFS=:)
+- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+- { (exit 1); exit 1; }; }
+- # Do quote $f, to prevent DOS paths from being IFS'd.
+- echo "$f";;
+- *) # Relative
+- if test -f "$f"; then
+- # Build tree
+- echo "$f"
+- elif test -f "$srcdir/$f"; then
+- # Source tree
+- echo "$srcdir/$f"
+- else
+- # /dev/null tree
+- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+-echo "$as_me: error: cannot find input file: $f" >&2;}
+- { (exit 1); exit 1; }; }
+- fi;;
+- esac
+- done` || { (exit 1); exit 1; }
+- # Remove the trailing spaces.
+- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+-
+-_ACEOF
+-
+-# Transform confdefs.h into two sed scripts, `conftest.defines' and
+-# `conftest.undefs', that substitutes the proper values into
+-# config.h.in to produce config.h. The first handles `#define'
+-# templates, and the second `#undef' templates.
+-# And first: Protect against being on the right side of a sed subst in
+-# config.status. Protect against being in an unquoted here document
+-# in config.status.
+-rm -f conftest.defines conftest.undefs
+-# Using a here document instead of a string reduces the quoting nightmare.
+-# Putting comments in sed scripts is not portable.
+-#
+-# `end' is used to avoid that the second main sed command (meant for
+-# 0-ary CPP macros) applies to n-ary macro definitions.
+-# See the Autoconf documentation for `clear'.
+-cat >confdef2sed.sed <<\_ACEOF
+-s/[\\&,]/\\&/g
+-s,[\\$`],\\&,g
+-t clear
+-: clear
+-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+-t end
+-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+-: end
+-_ACEOF
+-# If some macros were called several times there might be several times
+-# the same #defines, which is useless. Nevertheless, we may not want to
+-# sort them, since we want the *last* AC-DEFINE to be honored.
+-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+-rm -f confdef2sed.sed
+-
+-# This sed command replaces #undef with comments. This is necessary, for
++ ;;
++ :H)
++ #
++ # CONFIG_HEADER
++ #
++_ACEOF
++
++# Transform confdefs.h into a sed script `conftest.defines', that
++# substitutes the proper values into config.h.in to produce config.h.
++rm -f conftest.defines conftest.tail
++# First, append a space to every undef/define line, to ease matching.
++echo 's/$/ /' >conftest.defines
++# Then, protect against being on the right side of a sed subst, or in
++# an unquoted here document, in config.status. If some macros were
++# called several times there might be several #defines for the same
++# symbol, which is useless. But do not sort them, since the last
++# AC_DEFINE must be honored.
++ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
++# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
++# NAME is the cpp macro being defined, VALUE is the value it is being given.
++# PARAMS is the parameter list in the macro definition--in most cases, it's
++# just an empty string.
++ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
++ac_dB='\\)[ (].*,\\1define\\2'
++ac_dC=' '
++ac_dD=' ,'
++
++uniq confdefs.h |
++ sed -n '
++ t rset
++ :rset
++ s/^[ ]*#[ ]*define[ ][ ]*//
++ t ok
++ d
++ :ok
++ s/[\\&,]/\\&/g
++ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
++ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
++ ' >>conftest.defines
++
++# Remove the space that was appended to ease matching.
++# Then replace #undef with comments. This is necessary, for
+ # example, in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+-cat >>conftest.undefs <<\_ACEOF
+-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+-_ACEOF
+-
+-# Break up conftest.defines because some shells have a limit on the size
+-# of here documents, and old seds have small limits too (100 cmds).
+-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+-echo ' :' >>$CONFIG_STATUS
+-rm -f conftest.tail
+-while grep . conftest.defines >/dev/null
++# (The regexp can be short, since the line contains either #define or #undef.)
++echo 's/ $//
++s,^[ #]*u.*,/* & */,' >>conftest.defines
++
++# Break up conftest.defines:
++ac_max_sed_lines=50
++
++# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
++# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
++# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
++# et cetera.
++ac_in='$ac_file_inputs'
++ac_out='"$tmp/out1"'
++ac_nxt='"$tmp/out2"'
++
++while :
+ do
+- # Write a limited-size here document to $tmp/defines.sed.
+- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+- # Speed up: don't consider the non `#define' lines.
+- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+- # Work around the forget-to-reset-the-flag bug.
+- echo 't clr' >>$CONFIG_STATUS
+- echo ': clr' >>$CONFIG_STATUS
+- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
++ # Write a here document:
++ cat >>$CONFIG_STATUS <<_ACEOF
++ # First, check the format of the line:
++ cat >"\$tmp/defines.sed" <<\\CEOF
++/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
++/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
++b
++:def
++_ACEOF
++ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+- sed -f $tmp/defines.sed $tmp/in >$tmp/out
+- rm -f $tmp/in
+- mv $tmp/out $tmp/in
+-' >>$CONFIG_STATUS
+- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
++ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
++ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
++ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
++ grep . conftest.tail >/dev/null || break
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+ done
+-rm -f conftest.defines
+-echo ' fi # grep' >>$CONFIG_STATUS
+-echo >>$CONFIG_STATUS
+-
+-# Break up conftest.undefs because some shells have a limit on the size
+-# of here documents, and old seds have small limits too (100 cmds).
+-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+-rm -f conftest.tail
+-while grep . conftest.undefs >/dev/null
+-do
+- # Write a limited-size here document to $tmp/undefs.sed.
+- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+- # Speed up: don't consider the non `#undef'
+- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+- # Work around the forget-to-reset-the-flag bug.
+- echo 't clr' >>$CONFIG_STATUS
+- echo ': clr' >>$CONFIG_STATUS
+- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+- echo 'CEOF
+- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+- rm -f $tmp/in
+- mv $tmp/out $tmp/in
+-' >>$CONFIG_STATUS
+- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+- rm -f conftest.undefs
+- mv conftest.tail conftest.undefs
+-done
+-rm -f conftest.undefs
++rm -f conftest.defines conftest.tail
+
++echo "ac_result=$ac_in" >>$CONFIG_STATUS
+ cat >>$CONFIG_STATUS <<\_ACEOF
+- # Let's still pretend it is `configure' which instantiates (i.e., don't
+- # use $as_me), people would be surprised to read:
+- # /* config.h. Generated by config.status. */
+- if test x"$ac_file" = x-; then
+- echo "/* Generated by configure. */" >$tmp/config.h
+- else
+- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+- fi
+- cat $tmp/in >>$tmp/config.h
+- rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
++ echo "/* $configure_input */" >"$tmp/config.h"
++ cat "$ac_result" >>"$tmp/config.h"
++ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+ echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$ac_file" : 'X\(//\)[^/]' \| \
+- X"$ac_file" : 'X\(//\)$' \| \
+- X"$ac_file" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
+-echo X"$ac_file" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- { if $as_mkdir_p; then
+- mkdir -p "$ac_dir"
+- else
+- as_dir="$ac_dir"
+- as_dirs=
+- while test ! -d "$as_dir"; do
+- as_dirs="$as_dir $as_dirs"
+- as_dir=`(dirname "$as_dir") 2>/dev/null ||
+-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$as_dir" : 'X\(//\)[^/]' \| \
+- X"$as_dir" : 'X\(//\)$' \| \
+- X"$as_dir" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
+-echo X"$as_dir" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- done
+- test ! -n "$as_dirs" || mkdir $as_dirs
+- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+- { (exit 1); exit 1; }; }; }
+-
+ rm -f $ac_file
+- mv $tmp/config.h $ac_file
++ mv "$tmp/config.h" $ac_file
+ fi
+ else
+- cat $tmp/config.h
+- rm -f $tmp/config.h
++ echo "/* $configure_input */"
++ cat "$ac_result"
+ fi
++ rm -f "$tmp/out12"
+ # Compute $ac_file's index in $config_headers.
+ _am_stamp_count=1
+ for _am_header in $config_headers :; do
+@@ -9596,135 +10021,39 @@ for _am_header in $config_headers :; do
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+ done
+-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
++echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
+ $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+- X$ac_file : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
+ echo X$ac_file |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`/stamp-h$_am_stamp_count
+-done
+-_ACEOF
+-cat >>$CONFIG_STATUS <<\_ACEOF
+-
+-#
+-# CONFIG_COMMANDS section.
+-#
+-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$ac_dest" : 'X\(//\)[^/]' \| \
+- X"$ac_dest" : 'X\(//\)$' \| \
+- X"$ac_dest" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
+-echo X"$ac_dest" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- { if $as_mkdir_p; then
+- mkdir -p "$ac_dir"
+- else
+- as_dir="$ac_dir"
+- as_dirs=
+- while test ! -d "$as_dir"; do
+- as_dirs="$as_dir $as_dirs"
+- as_dir=`(dirname "$as_dir") 2>/dev/null ||
+-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+- X"$as_dir" : 'X\(//\)[^/]' \| \
+- X"$as_dir" : 'X\(//\)$' \| \
+- X"$as_dir" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
+-echo X"$as_dir" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- done
+- test ! -n "$as_dirs" || mkdir $as_dirs
+- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+- { (exit 1); exit 1; }; }; }
+-
+- ac_builddir=.
+-
+-if test "$ac_dir" != .; then
+- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+- # A "../" for each directory in $ac_dir_suffix.
+- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+-else
+- ac_dir_suffix= ac_top_builddir=
+-fi
+-
+-case $srcdir in
+- .) # No --srcdir option. We are building in place.
+- ac_srcdir=.
+- if test -z "$ac_top_builddir"; then
+- ac_top_srcdir=.
+- else
+- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+- fi ;;
+- [\\/]* | ?:[\\/]* ) # Absolute path.
+- ac_srcdir=$srcdir$ac_dir_suffix;
+- ac_top_srcdir=$srcdir ;;
+- *) # Relative path.
+- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+-esac
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`/stamp-h$_am_stamp_count
++ ;;
+
+-# Do not use `cd foo && pwd` to compute absolute paths, because
+-# the directories may not exist.
+-case `pwd` in
+-.) ac_abs_builddir="$ac_dir";;
+-*)
+- case "$ac_dir" in
+- .) ac_abs_builddir=`pwd`;;
+- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+- *) ac_abs_builddir=`pwd`/"$ac_dir";;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_builddir=${ac_top_builddir}.;;
+-*)
+- case ${ac_top_builddir}. in
+- .) ac_abs_top_builddir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_srcdir=$ac_srcdir;;
+-*)
+- case $ac_srcdir in
+- .) ac_abs_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+- esac;;
+-esac
+-case $ac_abs_builddir in
+-.) ac_abs_top_srcdir=$ac_top_srcdir;;
+-*)
+- case $ac_top_srcdir in
+- .) ac_abs_top_srcdir=$ac_abs_builddir;;
+- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+- esac;;
+-esac
++ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
++echo "$as_me: executing $ac_file commands" >&6;}
++ ;;
++ esac
+
+
+- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+-echo "$as_me: executing $ac_dest commands" >&6;}
+- case $ac_dest in
+- depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
++ case $ac_file$ac_mode in
++ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+@@ -9734,18 +10063,29 @@ echo "$as_me: executing $ac_dest commands" >&6;}
+ # each Makefile.in and add a new line on top of each file to say so.
+ # So let's grep whole file.
+ if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+- dirpart=`(dirname "$mf") 2>/dev/null ||
++ dirpart=`$as_dirname -- "$mf" ||
+ $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+- X"$mf" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$mf" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
+ else
+ continue
+ fi
+@@ -9767,53 +10107,79 @@ echo X"$mf" |
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+- fdir=`(dirname "$file") 2>/dev/null ||
++ fdir=`$as_dirname -- "$file" ||
+ $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+- X"$file" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$file" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
+- { if $as_mkdir_p; then
+- mkdir -p $dirpart/$fdir
+- else
+- as_dir=$dirpart/$fdir
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ { as_dir=$dirpart/$fdir
++ case $as_dir in #(
++ -*) as_dir=./$as_dir;;
++ esac
++ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+- while test ! -d "$as_dir"; do
+- as_dirs="$as_dir $as_dirs"
+- as_dir=`(dirname "$as_dir") 2>/dev/null ||
++ while :; do
++ case $as_dir in #(
++ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
++ *) as_qdir=$as_dir;;
++ esac
++ as_dirs="'$as_qdir' $as_dirs"
++ as_dir=`$as_dirname -- "$as_dir" ||
+ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+- X"$as_dir" : 'X\(/\)' \| \
+- . : '\(.\)' 2>/dev/null ||
++ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$as_dir" |
+- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+- /^X\(\/\/\)$/{ s//\1/; q; }
+- /^X\(\/\).*/{ s//\1/; q; }
+- s/.*/./; q'`
++ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)[^/].*/{
++ s//\1/
++ q
++ }
++ /^X\(\/\/\)$/{
++ s//\1/
++ q
++ }
++ /^X\(\/\).*/{
++ s//\1/
++ q
++ }
++ s/.*/./; q'`
++ test -d "$as_dir" && break
+ done
+- test ! -n "$as_dirs" || mkdir $as_dirs
+- fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
++ test -z "$as_dirs" || eval "mkdir $as_dirs"
++ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
++echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+-
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+ ;;
++
+ esac
+-done
+-_ACEOF
++done # for ac_tag
+
+-cat >>$CONFIG_STATUS <<\_ACEOF
+
+ { (exit 0); exit 0; }
+ _ACEOF
+diff --git a/configure.ac b/configure.ac
+index 49a9b20..87695b8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -103,6 +103,10 @@ x86?64*)
+ arch=x86_64
+ AC_DEFINE([X86_64], 1, [Define for the AMD x86-64 architecture.])
+ ;;
++avr32*)
++ arch=avr32
++ AC_DEFINE([AVR32], 1, [Define for the AVR32 architecture.])
++ ;;
+ *)
+ AC_MSG_RESULT([NO!])
+ AC_MSG_ERROR([architecture $host_cpu is not supported by strace])
+diff --git a/defs.h b/defs.h
+index 486fac5..1818e8c 100644
+--- a/defs.h
++++ b/defs.h
+@@ -94,6 +94,9 @@
+ # if defined(X86_64)
+ # define LINUX_X86_64
+ # endif
++# if defined(AVR32)
++# define LINUX_AVR32
++# endif
+ #endif
+
+ #if defined(SVR4) || defined(FREEBSD)
+@@ -120,7 +123,7 @@
+ #include <sys/pioctl.h>
+ #endif /* FREEBSD */
+ #else /* !USE_PROCFS */
+-#if (defined(LINUXSPARC) || defined (LINUX_X86_64)) && defined(__GLIBC__)
++#if (defined(LINUXSPARC) || defined (LINUX_X86_64) || defined (LINUX_AVR32)) && defined(__GLIBC__)
+ #include <sys/ptrace.h>
+ #else
+ /* Work around awkward prototype in ptrace.h. */
+@@ -327,7 +330,7 @@ struct tcb {
+ #define TCB_FOLLOWFORK 00400 /* Process should have forks followed */
+ #define TCB_REPRINT 01000 /* We should reprint this syscall on exit */
+ #ifdef LINUX
+-# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM)
++# if defined(ALPHA) || defined(SPARC) || defined(SPARC64) || defined(POWERPC) || defined(IA64) || defined(HPPA) || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) || defined(ARM) || defined(AVR32)
+ # define TCB_WAITEXECVE 02000 /* ignore SIGTRAP after exceve */
+ # endif
+ # define TCB_CLONE_DETACHED 04000 /* CLONE_DETACHED set in creating syscall */
+diff --git a/linux/avr32/ioctlent.h b/linux/avr32/ioctlent.h
+new file mode 100644
+index 0000000..0f0a63d
+--- /dev/null
++++ b/linux/avr32/ioctlent.h
+@@ -0,0 +1,1268 @@
++{"linux/fs.h", "FIBMAP", 0x1},
++{"linux/fs.h", "FIGETBSZ", 0x2},
++{"linux/fd.h", "FDCLRPRM", 0x241},
++{"linux/fd.h", "FDMSGON", 0x245},
++{"linux/fd.h", "FDMSGOFF", 0x246},
++{"linux/fd.h", "FDFMTBEG", 0x247},
++{"linux/fd.h", "FDFMTEND", 0x249},
++{"linux/fd.h", "FDSETEMSGTRESH", 0x24a},
++{"linux/fd.h", "FDFLUSH", 0x24b},
++{"linux/fd.h", "FDRESET", 0x254},
++{"linux/fd.h", "FDWERRORCLR", 0x256},
++{"linux/fd.h", "FDRAWCMD", 0x258},
++{"linux/fd.h", "FDTWADDLE", 0x259},
++{"linux/fd.h", "FDEJECT", 0x25a},
++{"linux/wireless.h", "IW_POWER_ALL_R", 0x300},
++{"linux/in6.h", "IPV6_PRIORITY_RESERVED1", 0x300},
++{"linux/apm_bios.h", "APM_DEVICE_PARALLEL", 0x300},
++{"linux/hdreg.h", "HDIO_GETGEO", 0x301},
++{"linux/ps2esdi.h", "HDIO_GETGEO", 0x301},
++{"linux/hdreg.h", "HDIO_GET_UNMASKINTR", 0x302},
++{"linux/hdreg.h", "HDIO_GET_MULTCOUNT", 0x304},
++{"linux/hdreg.h", "HDIO_GET_QDMA", 0x305},
++{"linux/hdreg.h", "HDIO_SET_XFER", 0x306},
++{"linux/hdreg.h", "HDIO_OBSOLETE_IDENTITY", 0x307},
++{"linux/hdreg.h", "HDIO_GET_KEEPSETTINGS", 0x308},
++{"linux/hdreg.h", "HDIO_GET_32BIT", 0x309},
++{"linux/hdreg.h", "HDIO_GET_NOWERR", 0x30a},
++{"linux/hdreg.h", "HDIO_GET_DMA", 0x30b},
++{"linux/hdreg.h", "HDIO_GET_NICE", 0x30c},
++{"linux/hdreg.h", "HDIO_GET_IDENTITY", 0x30d},
++{"linux/hdreg.h", "HDIO_GET_WCACHE", 0x30e},
++{"linux/hdreg.h", "HDIO_GET_ACOUSTIC", 0x30f},
++{"linux/hdreg.h", "HDIO_GET_ADDRESS", 0x310},
++{"linux/hdreg.h", "HDIO_GET_BUSSTATE", 0x31a},
++{"linux/hdreg.h", "HDIO_TRISTATE_HWIF", 0x31b},
++{"linux/hdreg.h", "HDIO_DRIVE_RESET", 0x31c},
++{"linux/hdreg.h", "HDIO_DRIVE_TASKFILE", 0x31d},
++{"linux/hdreg.h", "HDIO_DRIVE_TASK", 0x31e},
++{"linux/hdreg.h", "HDIO_DRIVE_CMD", 0x31f},
++{"linux/hdreg.h", "HDIO_SET_MULTCOUNT", 0x321},
++{"linux/hdreg.h", "HDIO_SET_UNMASKINTR", 0x322},
++{"linux/hdreg.h", "HDIO_SET_KEEPSETTINGS", 0x323},
++{"linux/hdreg.h", "HDIO_SET_32BIT", 0x324},
++{"linux/hdreg.h", "HDIO_SET_NOWERR", 0x325},
++{"linux/hdreg.h", "HDIO_SET_DMA", 0x326},
++{"linux/hdreg.h", "HDIO_SET_PIO_MODE", 0x327},
++{"linux/hdreg.h", "HDIO_SCAN_HWIF", 0x328},
++{"linux/hdreg.h", "HDIO_SET_NICE", 0x329},
++{"linux/hdreg.h", "HDIO_UNREGISTER_HWIF", 0x32a},
++{"linux/hdreg.h", "HDIO_SET_WCACHE", 0x32b},
++{"linux/hdreg.h", "HDIO_SET_ACOUSTIC", 0x32c},
++{"linux/hdreg.h", "HDIO_SET_BUSSTATE", 0x32d},
++{"linux/hdreg.h", "HDIO_SET_QDMA", 0x32e},
++{"linux/hdreg.h", "HDIO_SET_ADDRESS", 0x32f},
++{"linux/zorro_ids.h", "ZORRO_MANUF_CARDCO_1", 0x3ec},
++{"linux/zorro_ids.h", "ZORRO_MANUF_A_SQUARED", 0x3ed},
++{"linux/zorro_ids.h", "ZORRO_MANUF_COMSPEC_COMMUNICATIONS", 0x3ee},
++{"linux/zorro_ids.h", "ZORRO_MANUF_ANAKIN_RESEARCH", 0x3f1},
++{"linux/zorro_ids.h", "ZORRO_MANUF_MICROBOTICS", 0x3f2},
++{"linux/zorro_ids.h", "ZORRO_MANUF_ACCESS_ASSOCIATES_ALEGRA", 0x3f4},
++{"linux/zorro_ids.h", "ZORRO_MANUF_EXPANSION_TECHNOLOGIES", 0x3f6},
++{"linux/zorro_ids.h", "ZORRO_MANUF_ASDG", 0x3ff},
++{"linux/apm_bios.h", "APM_DEVICE_PCMCIA", 0x600},
++{"linux/ixjuser.h", "MIXER_PORT_CD_L", 0x600},
++{"linux/in6.h", "IPV6_PRIORITY_INTERACTIVE", 0x600},
++{"linux/lp.h", "LPCHAR", 0x601},
++{"linux/lp.h", "LPTIME", 0x602},
++{"linux/lp.h", "LPABORT", 0x604},
++{"linux/lp.h", "LPSETIRQ", 0x605},
++{"linux/lp.h", "LPGETIRQ", 0x606},
++{"linux/lp.h", "LPWAIT", 0x608},
++{"linux/lp.h", "LPCAREFUL", 0x609},
++{"linux/lp.h", "LPABORTOPEN", 0x60a},
++{"linux/lp.h", "LPGETSTATUS", 0x60b},
++{"linux/lp.h", "LPRESET", 0x60c},
++{"linux/lp.h", "LPGETSTATS", 0x60d},
++{"linux/lp.h", "LPGETFLAGS", 0x60e},
++{"linux/lp.h", "LPSETTIMEOUT", 0x60f},
++{"linux/som.h", "SOM_LIB_RELOC", 0x619},
++{"linux/zorro_ids.h", "ZORRO_MANUF_GREAT_VALLEY_PRODUCTS_1", 0x6e1},
++{"linux/fs.h", "BLKROSET", 0x125d},
++{"linux/fs.h", "BLKROGET", 0x125e},
++{"linux/fs.h", "BLKRRPART", 0x125f},
++{"linux/fs.h", "BLKGETSIZE", 0x1260},
++{"linux/fs.h", "BLKFLSBUF", 0x1261},
++{"linux/fs.h", "BLKRASET", 0x1262},
++{"linux/fs.h", "BLKRAGET", 0x1263},
++{"linux/fs.h", "BLKFRASET", 0x1264},
++{"linux/fs.h", "BLKFRAGET", 0x1265},
++{"linux/fs.h", "BLKSECTSET", 0x1266},
++{"linux/fs.h", "BLKSECTGET", 0x1267},
++{"linux/fs.h", "BLKSSZGET", 0x1268},
++{"linux/blkpg.h", "BLKPG", 0x1269},
++{"linux/fs.h", "BLKTRACESTART", 0x1274},
++{"linux/fs.h", "BLKTRACESTOP", 0x1275},
++{"linux/fs.h", "BLKTRACETEARDOWN", 0x1276},
++{"linux/zorro_ids.h", "ZORRO_MANUF_APOLLO_2", 0x2200},
++{"scsi/sg.h", "SG_SET_TIMEOUT", 0x2201},
++{"scsi/sg.h", "SG_GET_TIMEOUT", 0x2202},
++{"scsi/sg.h", "SG_EMULATED_HOST", 0x2203},
++{"scsi/sg.h", "SG_SET_TRANSFORM", 0x2204},
++{"scsi/sg.h", "SG_GET_TRANSFORM", 0x2205},
++{"linux/zorro_ids.h", "ZORRO_MANUF_APOLLO_3", 0x2222},
++{"scsi/sg.h", "SG_GET_COMMAND_Q", 0x2270},
++{"scsi/sg.h", "SG_SET_COMMAND_Q", 0x2271},
++{"scsi/sg.h", "SG_GET_RESERVED_SIZE", 0x2272},
++{"scsi/sg.h", "SG_SET_RESERVED_SIZE", 0x2275},
++{"scsi/sg.h", "SG_GET_SCSI_ID", 0x2276},
++{"scsi/sg.h", "SG_SET_FORCE_LOW_DMA", 0x2279},
++{"scsi/sg.h", "SG_GET_LOW_DMA", 0x227a},
++{"scsi/sg.h", "SG_SET_FORCE_PACK_ID", 0x227b},
++{"scsi/sg.h", "SG_GET_PACK_ID", 0x227c},
++{"scsi/sg.h", "SG_GET_NUM_WAITING", 0x227d},
++{"scsi/sg.h", "SG_SET_DEBUG", 0x227e},
++{"scsi/sg.h", "SG_GET_SG_TABLESIZE", 0x227f},
++{"scsi/sg.h", "SG_GET_VERSION_NUM", 0x2282},
++{"scsi/sg.h", "SG_NEXT_CMD_LEN", 0x2283},
++{"scsi/sg.h", "SG_SCSI_RESET", 0x2284},
++{"scsi/sg.h", "SG_IO", 0x2285},
++{"scsi/sg.h", "SG_GET_REQUEST_TABLE", 0x2286},
++{"scsi/sg.h", "SG_SET_KEEP_ORPHAN", 0x2287},
++{"scsi/sg.h", "SG_GET_KEEP_ORPHAN", 0x2288},
++{"linux/apm_bios.h", "APM_IOC_STANDBY", 0x4101},
++{"linux/agpgart.h", "AGPIOC_ACQUIRE", 0x4101},
++{"linux/apm_bios.h", "APM_IOC_SUSPEND", 0x4102},
++{"linux/agpgart.h", "AGPIOC_RELEASE", 0x4102},
++{"linux/pmu.h", "PMU_IOC_SLEEP", 0x4200},
++{"linux/cciss_ioctl.h", "CCISS_REVALIDVOLS", 0x420a},
++{"linux/cciss_ioctl.h", "CCISS_DEREGDISK", 0x420c},
++{"linux/cciss_ioctl.h", "CCISS_REGNEWD", 0x420e},
++{"linux/cciss_ioctl.h", "CCISS_RESCANDISK", 0x4210},
++{"linux/fb.h", "FBIOGET_VSCREENINFO", 0x4600},
++{"linux/fb.h", "FBIOPUT_VSCREENINFO", 0x4601},
++{"linux/ps2esdi.h", "CMD_READ", 0x4601},
++{"linux/fb.h", "FBIOGET_FSCREENINFO", 0x4602},
++{"linux/ps2esdi.h", "CMD_WRITE", 0x4602},
++{"linux/fb.h", "FBIOGETCMAP", 0x4604},
++{"linux/fb.h", "FBIOPUTCMAP", 0x4605},
++{"linux/fb.h", "FBIOPAN_DISPLAY", 0x4606},
++{"linux/fb.h", "FBIOGET_CON2FBMAP", 0x460f},
++{"linux/fb.h", "FBIOPUT_CON2FBMAP", 0x4610},
++{"linux/fb.h", "FBIOBLANK", 0x4611},
++{"linux/fb.h", "FBIO_ALLOC", 0x4613},
++{"linux/fb.h", "FBIO_FREE", 0x4614},
++{"linux/fb.h", "FBIOGET_GLYPH", 0x4615},
++{"linux/fb.h", "FBIOGET_HWCINFO", 0x4616},
++{"linux/fb.h", "FBIOPUT_MODEINFO", 0x4617},
++{"linux/fb.h", "FBIOGET_DISPINFO", 0x4618},
++{"linux/arcfb.h", "FBIO_WAITEVENT", 0x4688},
++{"linux/hiddev.h", "HIDIOCAPPLICATION", 0x4802},
++{"linux/hiddev.h", "HIDIOCINITREPORT", 0x4805},
++{"linux/isdn.h", "IIOCNETAIF", 0x4901},
++{"linux/isdn.h", "IIOCNETDIF", 0x4902},
++{"linux/isdn.h", "IIOCNETSCF", 0x4903},
++{"linux/isdn.h", "IIOCNETGCF", 0x4904},
++{"linux/isdn.h", "IIOCNETANM", 0x4905},
++{"linux/isdn.h", "IIOCNETDNM", 0x4906},
++{"linux/isdn.h", "IIOCNETGNM", 0x4907},
++{"linux/isdn.h", "IIOCGETSET", 0x4908},
++{"linux/isdn.h", "IIOCSETSET", 0x4909},
++{"linux/isdn.h", "IIOCSETVER", 0x490a},
++{"linux/isdn.h", "IIOCNETHUP", 0x490b},
++{"linux/isdn.h", "IIOCSETGST", 0x490c},
++{"linux/isdn.h", "IIOCSETBRJ", 0x490d},
++{"linux/isdn.h", "IIOCSIGPRF", 0x490e},
++{"linux/isdn.h", "IIOCGETPRF", 0x490f},
++{"linux/isdn.h", "IIOCSETPRF", 0x4910},
++{"linux/isdn.h", "IIOCGETMAP", 0x4911},
++{"linux/isdn.h", "IIOCSETMAP", 0x4912},
++{"linux/isdn.h", "IIOCNETASL", 0x4913},
++{"linux/isdn.h", "IIOCNETDIL", 0x4914},
++{"linux/isdn.h", "IIOCGETCPS", 0x4915},
++{"linux/isdn.h", "IIOCGETDVR", 0x4916},
++{"linux/isdn.h", "IIOCNETLCR", 0x4917},
++{"linux/isdn.h", "IIOCNETDWRSET", 0x4918},
++{"linux/isdn.h", "IIOCNETALN", 0x4920},
++{"linux/isdn.h", "IIOCNETDLN", 0x4921},
++{"linux/isdn.h", "IIOCNETGPN", 0x4922},
++{"linux/isdn.h", "IIOCDBGVAR", 0x497f},
++{"linux/isdn.h", "IIOCDRVCTL", 0x4980},
++{"linux/kd.h", "KIOCSOUND", 0x4b2f},
++{"linux/kd.h", "KDMKTONE", 0x4b30},
++{"linux/kd.h", "KDGETLED", 0x4b31},
++{"linux/kd.h", "KDSETLED", 0x4b32},
++{"linux/kd.h", "KDGKBTYPE", 0x4b33},
++{"linux/kd.h", "KDADDIO", 0x4b34},
++{"linux/kd.h", "KDDELIO", 0x4b35},
++{"linux/kd.h", "KDENABIO", 0x4b36},
++{"linux/kd.h", "KDDISABIO", 0x4b37},
++{"linux/kd.h", "KDSETMODE", 0x4b3a},
++{"linux/kd.h", "KDGETMODE", 0x4b3b},
++{"linux/kd.h", "KDMAPDISP", 0x4b3c},
++{"linux/kd.h", "KDUNMAPDISP", 0x4b3d},
++{"linux/kd.h", "GIO_SCRNMAP", 0x4b40},
++{"linux/kd.h", "PIO_SCRNMAP", 0x4b41},
++{"linux/kd.h", "KDGKBMODE", 0x4b44},
++{"linux/kd.h", "KDSKBMODE", 0x4b45},
++{"linux/kd.h", "KDGKBENT", 0x4b46},
++{"linux/kd.h", "KDSKBENT", 0x4b47},
++{"linux/kd.h", "KDGKBSENT", 0x4b48},
++{"linux/kd.h", "KDSKBSENT", 0x4b49},
++{"linux/kd.h", "KDGKBDIACR", 0x4b4a},
++{"linux/kd.h", "KDSKBDIACR", 0x4b4b},
++{"linux/kd.h", "KDGETKEYCODE", 0x4b4c},
++{"linux/kd.h", "KDSETKEYCODE", 0x4b4d},
++{"linux/kd.h", "KDSIGACCEPT", 0x4b4e},
++{"linux/kd.h", "KDKBDREP", 0x4b52},
++{"linux/kd.h", "GIO_FONT", 0x4b60},
++{"linux/kd.h", "PIO_FONT", 0x4b61},
++{"linux/kd.h", "KDGKBMETA", 0x4b62},
++{"linux/kd.h", "KDSKBMETA", 0x4b63},
++{"linux/kd.h", "KDGKBLED", 0x4b64},
++{"linux/kd.h", "KDSKBLED", 0x4b65},
++{"linux/kd.h", "GIO_UNIMAP", 0x4b66},
++{"linux/kd.h", "PIO_UNIMAP", 0x4b67},
++{"linux/kd.h", "PIO_UNIMAPCLR", 0x4b68},
++{"linux/kd.h", "GIO_UNISCRNMAP", 0x4b69},
++{"linux/kd.h", "PIO_UNISCRNMAP", 0x4b6a},
++{"linux/kd.h", "GIO_FONTX", 0x4b6b},
++{"linux/kd.h", "PIO_FONTX", 0x4b6c},
++{"linux/kd.h", "PIO_FONTRESET", 0x4b6d},
++{"linux/kd.h", "GIO_CMAP", 0x4b70},
++{"linux/kd.h", "PIO_CMAP", 0x4b71},
++{"linux/kd.h", "KDFONTOP", 0x4b72},
++{"linux/loop.h", "LOOP_SET_FD", 0x4c00},
++{"linux/loop.h", "LOOP_CLR_FD", 0x4c01},
++{"linux/loop.h", "LOOP_SET_STATUS", 0x4c02},
++{"linux/loop.h", "LOOP_GET_STATUS", 0x4c03},
++{"linux/loop.h", "LOOP_SET_STATUS64", 0x4c04},
++{"linux/loop.h", "LOOP_GET_STATUS64", 0x4c05},
++{"linux/loop.h", "LOOP_CHANGE_FD", 0x4c06},
++{"mtd/mtd-abi.h", "MTDFILEMODE", 0x4d13},
++{"linux/random.h", "RNDZAPENTCNT", 0x5204},
++{"linux/random.h", "RNDCLEARPOOL", 0x5206},
++{"linux/cdrom.h", "CDROMPAUSE", 0x5301},
++{"linux/n_r3964.h", "R3964_ENABLE_SIGNALS", 0x5301},
++{"linux/n_r3964.h", "R3964_SETPRIORITY", 0x5302},
++{"linux/cdrom.h", "CDROMRESUME", 0x5302},
++{"linux/n_r3964.h", "R3964_USE_BCC", 0x5303},
++{"linux/cdrom.h", "CDROMPLAYMSF", 0x5303},
++{"linux/n_r3964.h", "R3964_READ_TELEGRAM", 0x5304},
++{"linux/cdrom.h", "CDROMPLAYTRKIND", 0x5304},
++{"linux/cdrom.h", "CDROMREADTOCHDR", 0x5305},
++{"linux/cdrom.h", "CDROMREADTOCENTRY", 0x5306},
++{"linux/cdrom.h", "CDROMSTOP", 0x5307},
++{"linux/cdrom.h", "CDROMSTART", 0x5308},
++{"linux/cdrom.h", "CDROMEJECT", 0x5309},
++{"linux/cdrom.h", "CDROMVOLCTRL", 0x530a},
++{"linux/cdrom.h", "CDROMSUBCHNL", 0x530b},
++{"linux/cdrom.h", "CDROMREADMODE2", 0x530c},
++{"linux/cdrom.h", "CDROMREADMODE1", 0x530d},
++{"linux/cdrom.h", "CDROMREADAUDIO", 0x530e},
++{"linux/cdrom.h", "CDROMEJECT_SW", 0x530f},
++{"linux/cdrom.h", "CDROMMULTISESSION", 0x5310},
++{"linux/cdrom.h", "CDROM_GET_MCN", 0x5311},
++{"linux/cdrom.h", "CDROMRESET", 0x5312},
++{"linux/cdrom.h", "CDROMVOLREAD", 0x5313},
++{"linux/cdrom.h", "CDROMREADRAW", 0x5314},
++{"linux/cdrom.h", "CDROMREADCOOKED", 0x5315},
++{"linux/cdrom.h", "CDROMSEEK", 0x5316},
++{"linux/cdrom.h", "CDROMPLAYBLK", 0x5317},
++{"linux/cdrom.h", "CDROMREADALL", 0x5318},
++{"linux/cdrom.h", "CDROMCLOSETRAY", 0x5319},
++{"linux/cdrom.h", "CDROMGETSPINDOWN", 0x531d},
++{"linux/cdrom.h", "CDROMSETSPINDOWN", 0x531e},
++{"linux/cdrom.h", "CDROM_SET_OPTIONS", 0x5320},
++{"linux/cdrom.h", "CDROM_CLEAR_OPTIONS", 0x5321},
++{"linux/cdrom.h", "CDROM_SELECT_SPEED", 0x5322},
++{"linux/cdrom.h", "CDROM_SELECT_DISC", 0x5323},
++{"linux/cdrom.h", "CDROM_MEDIA_CHANGED", 0x5325},
++{"linux/cdrom.h", "CDROM_DRIVE_STATUS", 0x5326},
++{"linux/cdrom.h", "CDROM_DISC_STATUS", 0x5327},
++{"linux/cdrom.h", "CDROM_CHANGER_NSLOTS", 0x5328},
++{"linux/cdrom.h", "CDROM_LOCKDOOR", 0x5329},
++{"linux/cdrom.h", "CDROM_DEBUG", 0x5330},
++{"linux/cdrom.h", "CDROM_GET_CAPABILITY", 0x5331},
++{"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORLOCK", 0x5380},
++{"scsi/scsi_ioctl.h", "SCSI_IOCTL_DOORUNLOCK", 0x5381},
++{"linux/cdrom.h", "CDROMAUDIOBUFSIZ", 0x5382},
++{"scsi/scsi.h", "SCSI_IOCTL_GET_IDLUN", 0x5382},
++{"scsi/scsi.h", "SCSI_IOCTL_TAGGED_ENABLE", 0x5383},
++{"scsi/scsi.h", "SCSI_IOCTL_TAGGED_DISABLE", 0x5384},
++{"scsi/scsi.h", "SCSI_IOCTL_PROBE_HOST", 0x5385},
++{"scsi/scsi.h", "SCSI_IOCTL_GET_BUS_NUMBER", 0x5386},
++{"linux/cdrom.h", "DVD_READ_STRUCT", 0x5390},
++{"linux/cdrom.h", "DVD_WRITE_STRUCT", 0x5391},
++{"linux/cdrom.h", "DVD_AUTH", 0x5392},
++{"linux/cdrom.h", "CDROM_SEND_PACKET", 0x5393},
++{"linux/cdrom.h", "CDROM_NEXT_WRITABLE", 0x5394},
++{"linux/cdrom.h", "CDROM_LAST_WRITTEN", 0x5395},
++{"asm/ioctls.h", "TCGETS", 0x5401},
++{"asm/ioctls.h", "TCSETS", 0x5402},
++{"asm/ioctls.h", "TCSETSW", 0x5403},
++{"asm/ioctls.h", "TCSETSF", 0x5404},
++{"asm/ioctls.h", "TCGETA", 0x5405},
++{"asm/ioctls.h", "TCSETA", 0x5406},
++{"asm/ioctls.h", "TCSETAW", 0x5407},
++{"asm/ioctls.h", "TCSETAF", 0x5408},
++{"asm/ioctls.h", "TCSBRK", 0x5409},
++{"asm/ioctls.h", "TCXONC", 0x540a},
++{"asm/ioctls.h", "TCFLSH", 0x540b},
++{"asm/ioctls.h", "TIOCEXCL", 0x540c},
++{"asm/ioctls.h", "TIOCNXCL", 0x540d},
++{"asm/ioctls.h", "TIOCSCTTY", 0x540e},
++{"asm/ioctls.h", "TIOCGPGRP", 0x540f},
++{"asm/ioctls.h", "TIOCSPGRP", 0x5410},
++{"asm/ioctls.h", "TIOCOUTQ", 0x5411},
++{"asm/ioctls.h", "TIOCSTI", 0x5412},
++{"asm/ioctls.h", "TIOCGWINSZ", 0x5413},
++{"asm/ioctls.h", "TIOCSWINSZ", 0x5414},
++{"asm/ioctls.h", "TIOCMGET", 0x5415},
++{"asm/ioctls.h", "TIOCMBIS", 0x5416},
++{"asm/ioctls.h", "TIOCMBIC", 0x5417},
++{"asm/ioctls.h", "TIOCMSET", 0x5418},
++{"asm/ioctls.h", "TIOCGSOFTCAR", 0x5419},
++{"asm/ioctls.h", "TIOCSSOFTCAR", 0x541a},
++{"asm/ioctls.h", "FIONREAD", 0x541b},
++{"asm/ioctls.h", "TIOCLINUX", 0x541c},
++{"asm/ioctls.h", "TIOCCONS", 0x541d},
++{"asm/ioctls.h", "TIOCGSERIAL", 0x541e},
++{"asm/ioctls.h", "TIOCSSERIAL", 0x541f},
++{"asm/ioctls.h", "TIOCPKT", 0x5420},
++{"asm/ioctls.h", "FIONBIO", 0x5421},
++{"asm/ioctls.h", "TIOCNOTTY", 0x5422},
++{"asm/ioctls.h", "TIOCSETD", 0x5423},
++{"asm/ioctls.h", "TIOCGETD", 0x5424},
++{"asm/ioctls.h", "TCSBRKP", 0x5425},
++{"asm/ioctls.h", "TIOCSBRK", 0x5427},
++{"asm/ioctls.h", "TIOCCBRK", 0x5428},
++{"asm/ioctls.h", "TIOCGSID", 0x5429},
++{"asm/ioctls.h", "FIONCLEX", 0x5450},
++{"asm/ioctls.h", "FIOCLEX", 0x5451},
++{"asm/ioctls.h", "FIOASYNC", 0x5452},
++{"asm/ioctls.h", "TIOCSERCONFIG", 0x5453},
++{"asm/ioctls.h", "TIOCSERGWILD", 0x5454},
++{"asm/ioctls.h", "TIOCSERSWILD", 0x5455},
++{"asm/ioctls.h", "TIOCGLCKTRMIOS", 0x5456},
++{"asm/ioctls.h", "TIOCSLCKTRMIOS", 0x5457},
++{"asm/ioctls.h", "TIOCSERGSTRUCT", 0x5458},
++{"asm/ioctls.h", "TIOCSERGETLSR", 0x5459},
++{"asm/ioctls.h", "TIOCSERGETMULTI", 0x545a},
++{"asm/ioctls.h", "TIOCSERSETMULTI", 0x545b},
++{"asm/ioctls.h", "TIOCMIWAIT", 0x545c},
++{"asm/ioctls.h", "TIOCGICOUNT", 0x545d},
++{"asm/ioctls.h", "TIOCGHAYESESP", 0x545e},
++{"asm/ioctls.h", "TIOCSHAYESESP", 0x545f},
++{"asm/ioctls.h", "FIOQSIZE", 0x5460},
++{"linux/uinput.h", "UI_DEV_CREATE", 0x5501},
++{"linux/uinput.h", "UI_DEV_DESTROY", 0x5502},
++{"linux/vt.h", "VT_OPENQRY", 0x5600},
++{"linux/vt.h", "VT_GETMODE", 0x5601},
++{"linux/videodev2.h", "VIDIOC_RESERVED", 0x5601},
++{"linux/vt.h", "VT_SETMODE", 0x5602},
++{"linux/vt.h", "VT_GETSTATE", 0x5603},
++{"linux/vt.h", "VT_SENDSIG", 0x5604},
++{"linux/vt.h", "VT_RELDISP", 0x5605},
++{"linux/vt.h", "VT_ACTIVATE", 0x5606},
++{"linux/vt.h", "VT_WAITACTIVE", 0x5607},
++{"linux/vt.h", "VT_DISALLOCATE", 0x5608},
++{"linux/vt.h", "VT_RESIZE", 0x5609},
++{"linux/vt.h", "VT_RESIZEX", 0x560a},
++{"linux/vt.h", "VT_LOCKSWITCH", 0x560b},
++{"linux/vt.h", "VT_UNLOCKSWITCH", 0x560c},
++{"linux/vt.h", "VT_GETHIFONTMASK", 0x560d},
++{"linux/videodev2.h", "VIDIOC_LOG_STATUS", 0x5646},
++{"linux/sonet.h", "SONET_SETFRAMING", 0x6115},
++{"linux/atm_nicstar.h", "NS_ADJBUFLEV", 0x6163},
++{"linux/atm_tcp.h", "SIOCSIFATMTCP", 0x6180},
++{"linux/atm_tcp.h", "ATMTCP_CREATE", 0x618e},
++{"linux/atm_tcp.h", "ATMTCP_REMOVE", 0x618f},
++{"linux/atmlec.h", "ATMLEC_CTRL", 0x61d0},
++{"linux/atmlec.h", "ATMLEC_DATA", 0x61d1},
++{"linux/atmlec.h", "ATMLEC_MCAST", 0x61d2},
++{"linux/atmmpc.h", "ATMMPC_CTRL", 0x61d8},
++{"linux/atmmpc.h", "ATMMPC_DATA", 0x61d9},
++{"linux/atmclip.h", "SIOCMKCLIP", 0x61e0},
++{"linux/atmarp.h", "ATMARPD_CTRL", 0x61e1},
++{"linux/atmarp.h", "ATMARP_MKIP", 0x61e2},
++{"linux/atmarp.h", "ATMARP_SETENTRY", 0x61e3},
++{"linux/atmarp.h", "ATMARP_ENCAP", 0x61e5},
++{"linux/atmsvc.h", "ATMSIGD_CTRL", 0x61f0},
++{"linux/cm4000_cs.h", "CM_IOCSRDR", 0x6303},
++{"linux/cm4000_cs.h", "CM_IOCARDOFF", 0x6304},
++{"linux/chio.h", "CHIOINITELEM", 0x6311},
++{"linux/comstats.h", "COM_GETPORTSTATS", 0x631e},
++{"linux/comstats.h", "COM_CLRPORTSTATS", 0x631f},
++{"linux/comstats.h", "COM_GETBRDSTATS", 0x6320},
++{"linux/comstats.h", "COM_READPORT", 0x6328},
++{"linux/comstats.h", "COM_READBOARD", 0x6329},
++{"linux/comstats.h", "COM_READPANEL", 0x632a},
++{"linux/video_decoder.h", "DECODER_DUMP", 0x64c0},
++{"linux/hpet.h", "HPET_IE_ON", 0x6801},
++{"linux/hpet.h", "HPET_IE_OFF", 0x6802},
++{"linux/hpet.h", "HPET_EPI", 0x6804},
++{"linux/hpet.h", "HPET_DPI", 0x6805},
++{"linux/mmtimer.h", "MMTIMER_GETOFFSET", 0x6d00},
++{"linux/synclink.h", "MGSL_IOCSTXIDLE", 0x6d02},
++{"linux/synclink.h", "MGSL_IOCGTXIDLE", 0x6d03},
++{"linux/synclink.h", "MGSL_IOCTXENABLE", 0x6d04},
++{"linux/mmtimer.h", "MMTIMER_GETBITS", 0x6d04},
++{"linux/synclink.h", "MGSL_IOCRXENABLE", 0x6d05},
++{"linux/mmtimer.h", "MMTIMER_MMAPAVAIL", 0x6d06},
++{"linux/synclink.h", "MGSL_IOCTXABORT", 0x6d06},
++{"linux/synclink.h", "MGSL_IOCGSTATS", 0x6d07},
++{"linux/synclink.h", "MGSL_IOCLOOPTXDONE", 0x6d09},
++{"linux/synclink.h", "MGSL_IOCSIF", 0x6d0a},
++{"linux/synclink.h", "MGSL_IOCGIF", 0x6d0b},
++{"linux/synclink.h", "MGSL_IOCCLRMODCOUNT", 0x6d0f},
++{"linux/ncp_fs.h", "NCP_IOC_CONN_LOGGED_IN", 0x6e03},
++{"linux/rtc.h", "RTC_AIE_ON", 0x7001},
++{"linux/rtc.h", "RTC_AIE_OFF", 0x7002},
++{"linux/rtc.h", "RTC_UIE_ON", 0x7003},
++{"linux/rtc.h", "RTC_UIE_OFF", 0x7004},
++{"linux/rtc.h", "RTC_PIE_ON", 0x7005},
++{"linux/rtc.h", "RTC_PIE_OFF", 0x7006},
++{"linux/rtc.h", "RTC_WIE_ON", 0x700f},
++{"linux/rtc.h", "RTC_WIE_OFF", 0x7010},
++{"linux/nvram.h", "NVRAM_INIT", 0x7040},
++{"linux/nvram.h", "NVRAM_SETCKS", 0x7041},
++{"linux/ppdev.h", "PPCLAIM", 0x708b},
++{"linux/ppdev.h", "PPRELEASE", 0x708c},
++{"linux/ppdev.h", "PPYIELD", 0x708d},
++{"linux/ppdev.h", "PPEXCL", 0x708f},
++{"linux/telephony.h", "PHONE_CAPABILITIES", 0x7180},
++{"linux/telephony.h", "PHONE_RING", 0x7183},
++{"linux/telephony.h", "PHONE_HOOKSTATE", 0x7184},
++{"linux/telephony.h", "OLD_PHONE_RING_START", 0x7187},
++{"linux/telephony.h", "PHONE_RING_STOP", 0x7188},
++{"linux/telephony.h", "PHONE_REC_START", 0x718a},
++{"linux/telephony.h", "PHONE_REC_STOP", 0x718b},
++{"linux/telephony.h", "PHONE_REC_LEVEL", 0x718f},
++{"linux/telephony.h", "PHONE_PLAY_START", 0x7191},
++{"linux/telephony.h", "PHONE_PLAY_STOP", 0x7192},
++{"linux/telephony.h", "PHONE_PLAY_LEVEL", 0x7195},
++{"linux/telephony.h", "PHONE_GET_TONE_ON_TIME", 0x719e},
++{"linux/telephony.h", "PHONE_GET_TONE_OFF_TIME", 0x719f},
++{"linux/telephony.h", "PHONE_GET_TONE_STATE", 0x71a0},
++{"linux/telephony.h", "PHONE_BUSY", 0x71a1},
++{"linux/telephony.h", "PHONE_RINGBACK", 0x71a2},
++{"linux/telephony.h", "PHONE_DIALTONE", 0x71a3},
++{"linux/telephony.h", "PHONE_CPT_STOP", 0x71a4},
++{"linux/telephony.h", "PHONE_PSTN_GET_STATE", 0x71a5},
++{"linux/telephony.h", "PHONE_PSTN_LINETEST", 0x71a8},
++{"linux/ixjuser.h", "IXJCTL_DSP_RESET", 0x71c0},
++{"linux/ixjuser.h", "IXJCTL_DSP_IDLE", 0x71c5},
++{"linux/ixjuser.h", "IXJCTL_TESTRAM", 0x71c6},
++{"linux/ixjuser.h", "IXJCTL_AEC_STOP", 0x71cc},
++{"linux/ixjuser.h", "IXJCTL_AEC_GET_LEVEL", 0x71cd},
++{"linux/ixjuser.h", "IXJCTL_PSTN_LINETEST", 0x71d3},
++{"linux/ixjuser.h", "IXJCTL_PLAY_CID", 0x71d7},
++{"linux/ixjuser.h", "IXJCTL_DRYBUFFER_CLEAR", 0x71e7},
++{"linux/cdk.h", "STL_BINTR", 0x7314},
++{"linux/cdk.h", "STL_BSTART", 0x7315},
++{"linux/cdk.h", "STL_BSTOP", 0x7316},
++{"linux/cdk.h", "STL_BRESET", 0x7317},
++{"linux/cdk.h", "STL_GETPFLAG", 0x7350},
++{"linux/cdk.h", "STL_SETPFLAG", 0x7351},
++{"linux/if_ppp.h", "PPPIOCDISCONN", 0x7439},
++{"linux/if_ppp.h", "PPPIOCXFERUNIT", 0x744e},
++{"linux/meye.h", "MEYEIOC_STILLCAPT", 0x76c4},
++{"linux/videotext.h", "VTXIOCPUTPAGE", 0x8108},
++{"linux/videotext.h", "VTXIOCSETDISP", 0x8109},
++{"linux/videotext.h", "VTXIOCPUTSTAT", 0x810a},
++{"linux/videotext.h", "VTXIOCCLRCACHE", 0x810b},
++{"asm/sockios.h", "FIOSETOWN", 0x8901},
++{"asm/sockios.h", "SIOCSPGRP", 0x8902},
++{"asm/sockios.h", "FIOGETOWN", 0x8903},
++{"asm/sockios.h", "SIOCGPGRP", 0x8904},
++{"asm/sockios.h", "SIOCATMARK", 0x8905},
++{"asm/sockios.h", "SIOCGSTAMP", 0x8906},
++{"linux/sockios.h", "SIOCADDRT", 0x890b},
++{"linux/sockios.h", "SIOCDELRT", 0x890c},
++{"linux/sockios.h", "SIOCRTMSG", 0x890d},
++{"linux/sockios.h", "SIOCGIFNAME", 0x8910},
++{"linux/sockios.h", "SIOCSIFLINK", 0x8911},
++{"linux/sockios.h", "SIOCGIFCONF", 0x8912},
++{"linux/sockios.h", "SIOCGIFFLAGS", 0x8913},
++{"linux/sockios.h", "SIOCSIFFLAGS", 0x8914},
++{"linux/sockios.h", "SIOCGIFADDR", 0x8915},
++{"linux/sockios.h", "SIOCSIFADDR", 0x8916},
++{"linux/sockios.h", "SIOCGIFDSTADDR", 0x8917},
++{"linux/sockios.h", "SIOCSIFDSTADDR", 0x8918},
++{"linux/sockios.h", "SIOCGIFBRDADDR", 0x8919},
++{"linux/sockios.h", "SIOCSIFBRDADDR", 0x891a},
++{"linux/sockios.h", "SIOCGIFNETMASK", 0x891b},
++{"linux/sockios.h", "SIOCSIFNETMASK", 0x891c},
++{"linux/sockios.h", "SIOCGIFMETRIC", 0x891d},
++{"linux/sockios.h", "SIOCSIFMETRIC", 0x891e},
++{"linux/sockios.h", "SIOCGIFMEM", 0x891f},
++{"linux/sockios.h", "SIOCSIFMEM", 0x8920},
++{"linux/sockios.h", "SIOCGIFMTU", 0x8921},
++{"linux/sockios.h", "SIOCSIFMTU", 0x8922},
++{"linux/sockios.h", "SIOCSIFNAME", 0x8923},
++{"linux/sockios.h", "SIOCSIFHWADDR", 0x8924},
++{"linux/sockios.h", "SIOCGIFENCAP", 0x8925},
++{"linux/sockios.h", "SIOCSIFENCAP", 0x8926},
++{"linux/sockios.h", "SIOCGIFHWADDR", 0x8927},
++{"linux/sockios.h", "SIOCGIFSLAVE", 0x8929},
++{"linux/sockios.h", "SIOCSIFSLAVE", 0x8930},
++{"linux/sockios.h", "SIOCADDMULTI", 0x8931},
++{"linux/sockios.h", "SIOCDELMULTI", 0x8932},
++{"linux/sockios.h", "SIOCGIFINDEX", 0x8933},
++{"linux/sockios.h", "SIOCSIFPFLAGS", 0x8934},
++{"linux/sockios.h", "SIOCGIFPFLAGS", 0x8935},
++{"linux/sockios.h", "SIOCDIFADDR", 0x8936},
++{"linux/sockios.h", "SIOCSIFHWBROADCAST", 0x8937},
++{"linux/sockios.h", "SIOCGIFCOUNT", 0x8938},
++{"linux/sockios.h", "SIOCGIFBR", 0x8940},
++{"linux/sockios.h", "SIOCSIFBR", 0x8941},
++{"linux/sockios.h", "SIOCGIFTXQLEN", 0x8942},
++{"linux/sockios.h", "SIOCSIFTXQLEN", 0x8943},
++{"linux/sockios.h", "SIOCGIFDIVERT", 0x8944},
++{"linux/sockios.h", "SIOCSIFDIVERT", 0x8945},
++{"linux/sockios.h", "SIOCETHTOOL", 0x8946},
++{"linux/sockios.h", "SIOCGMIIPHY", 0x8947},
++{"linux/sockios.h", "SIOCGMIIREG", 0x8948},
++{"linux/sockios.h", "SIOCSMIIREG", 0x8949},
++{"linux/sockios.h", "SIOCWANDEV", 0x894a},
++{"linux/sockios.h", "SIOCDARP", 0x8953},
++{"linux/sockios.h", "SIOCGARP", 0x8954},
++{"linux/sockios.h", "SIOCSARP", 0x8955},
++{"linux/sockios.h", "SIOCDRARP", 0x8960},
++{"linux/sockios.h", "SIOCGRARP", 0x8961},
++{"linux/sockios.h", "SIOCSRARP", 0x8962},
++{"linux/sockios.h", "SIOCGIFMAP", 0x8970},
++{"linux/sockios.h", "SIOCSIFMAP", 0x8971},
++{"linux/sockios.h", "SIOCADDDLCI", 0x8980},
++{"linux/sockios.h", "SIOCDELDLCI", 0x8981},
++{"linux/sockios.h", "SIOCGIFVLAN", 0x8982},
++{"linux/sockios.h", "SIOCSIFVLAN", 0x8983},
++{"linux/sockios.h", "SIOCBONDENSLAVE", 0x8990},
++{"linux/sockios.h", "SIOCBONDRELEASE", 0x8991},
++{"linux/sockios.h", "SIOCBONDSETHWADDR", 0x8992},
++{"linux/sockios.h", "SIOCBONDSLAVEINFOQUERY", 0x8993},
++{"linux/sockios.h", "SIOCBONDINFOQUERY", 0x8994},
++{"linux/sockios.h", "SIOCBONDCHANGEACTIVE", 0x8995},
++{"linux/sockios.h", "SIOCBRADDBR", 0x89a0},
++{"linux/sockios.h", "SIOCBRDELBR", 0x89a1},
++{"linux/sockios.h", "SIOCBRADDIF", 0x89a2},
++{"linux/sockios.h", "SIOCBRDELIF", 0x89a3},
++{"linux/sockios.h", "SIOCPROTOPRIVATE", 0x89e0},
++{"linux/sockios.h", "SIOCDEVPRIVATE", 0x89f0},
++{"linux/auto_fs.h", "AUTOFS_IOC_READY", 0x9360},
++{"linux/auto_fs.h", "AUTOFS_IOC_FAIL", 0x9361},
++{"linux/auto_fs.h", "AUTOFS_IOC_CATATONIC", 0x9362},
++{"linux/nbd.h", "NBD_SET_SOCK", 0xab00},
++{"linux/nbd.h", "NBD_SET_BLKSIZE", 0xab01},
++{"linux/nbd.h", "NBD_SET_SIZE", 0xab02},
++{"linux/nbd.h", "NBD_DO_IT", 0xab03},
++{"linux/nbd.h", "NBD_CLEAR_SOCK", 0xab04},
++{"linux/nbd.h", "NBD_CLEAR_QUE", 0xab05},
++{"linux/nbd.h", "NBD_PRINT_DEBUG", 0xab06},
++{"linux/nbd.h", "NBD_SET_SIZE_BLOCKS", 0xab07},
++{"linux/nbd.h", "NBD_DISCONNECT", 0xab08},
++{"linux/raw.h", "RAW_SETBIND", 0xac00},
++{"linux/raw.h", "RAW_GETBIND", 0xac01},
++{"linux/if_pppox.h", "PPPOEIOCDFWD", 0xb101},
++{"linux/cyclades.h", "CYGETMON", 0x435901},
++{"linux/cyclades.h", "CYGETTHRESH", 0x435902},
++{"linux/cyclades.h", "CYSETTHRESH", 0x435903},
++{"linux/cyclades.h", "CYGETDEFTHRESH", 0x435904},
++{"linux/cyclades.h", "CYSETDEFTHRESH", 0x435905},
++{"linux/cyclades.h", "CYGETTIMEOUT", 0x435906},
++{"linux/cyclades.h", "CYSETTIMEOUT", 0x435907},
++{"linux/cyclades.h", "CYGETDEFTIMEOUT", 0x435908},
++{"linux/cyclades.h", "CYSETDEFTIMEOUT", 0x435909},
++{"linux/cyclades.h", "CYSETRFLOW", 0x43590a},
++{"linux/cyclades.h", "CYGETRFLOW", 0x43590b},
++{"linux/cyclades.h", "CYSETRTSDTR_INV", 0x43590c},
++{"linux/cyclades.h", "CYGETRTSDTR_INV", 0x43590d},
++{"linux/cyclades.h", "CYZSETPOLLCYCLE", 0x43590e},
++{"linux/cyclades.h", "CYZGETPOLLCYCLE", 0x43590f},
++{"linux/cyclades.h", "CYGETCD1400VER", 0x435910},
++{"linux/cyclades.h", "CYGETCARDINFO", 0x435911},
++{"linux/cyclades.h", "CYSETWAIT", 0x435912},
++{"linux/cyclades.h", "CYGETWAIT", 0x435913},
++{"linux/videodev2.h", "VIDIOC_S_PRIORITY", 0x40015644},
++{"linux/ppdev.h", "PPWCONTROL", 0x40017084},
++{"linux/ppdev.h", "PPWDATA", 0x40017086},
++{"linux/ppdev.h", "PPWCTLONIRQ", 0x40017092},
++{"linux/telephony.h", "PHONE_MAXRINGS", 0x40017185},
++{"linux/telephony.h", "PHONE_PLAY_TONE", 0x4001719b},
++{"linux/sonypi.h", "SONYPI_IOCSBRT", 0x40017600},
++{"linux/sonypi.h", "SONYPI_IOCSBLUE", 0x40017609},
++{"linux/sonypi.h", "SONYPI_IOCSFAN", 0x4001760b},
++{"linux/atmdev.h", "ATM_SETBACKEND", 0x400261f2},
++{"linux/atmdev.h", "ATM_NEWBACKENDIF", 0x400261f3},
++{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID", 0x40026e02},
++{"linux/ppdev.h", "PPFCONTROL", 0x4002708e},
++{"linux/telephony.h", "PHONE_RING_CADENCE", 0x40027186},
++{"linux/fs.h", "BLKBSZSET", 0x40041271},
++{"linux/radeonfb.h", "FBIO_RADEON_SET_MIRROR", 0x40044004},
++{"linux/agpgart.h", "AGPIOC_SETUP", 0x40044103},
++{"linux/agpgart.h", "AGPIOC_RESERVE", 0x40044104},
++{"linux/agpgart.h", "AGPIOC_PROTECT", 0x40044105},
++{"linux/agpgart.h", "AGPIOC_DEALLOCATE", 0x40044107},
++{"linux/agpgart.h", "AGPIOC_BIND", 0x40044108},
++{"linux/agpgart.h", "AGPIOC_UNBIND", 0x40044109},
++{"linux/pmu.h", "PMU_IOC_SET_BACKLIGHT", 0x40044202},
++{"linux/cciss_ioctl.h", "CCISS_REGNEWDISK", 0x4004420d},
++{"linux/input.h", "EVIOCRMFF", 0x40044581},
++{"linux/input.h", "EVIOCGRAB", 0x40044590},
++{"linux/matroxfb.h", "FBIO_WAITFORVSYNC", 0x40044620},
++{"linux/hiddev.h", "HIDIOCSFLAG", 0x4004480f},
++{"mtd/mtd-abi.h", "OTPGETREGIONCOUNT", 0x40044d0e},
++{"linux/ticable.h", "IOCTL_TIUSB_TIMEOUT", 0x40044e20},
++{"linux/ticable.h", "IOCTL_TIUSB_RESET_DEVICE", 0x40044e21},
++{"linux/ticable.h", "IOCTL_TIUSB_RESET_PIPES", 0x40044e22},
++{"linux/random.h", "RNDADDTOENTCNT", 0x40045201},
++{"asm/ioctls.h", "TIOCSPTLCK", 0x40045431},
++{"linux/if_tun.h", "TUNSETNOCSUM", 0x400454c8},
++{"linux/if_tun.h", "TUNSETDEBUG", 0x400454c9},
++{"linux/if_tun.h", "TUNSETIFF", 0x400454ca},
++{"linux/if_tun.h", "TUNSETPERSIST", 0x400454cb},
++{"linux/if_tun.h", "TUNSETOWNER", 0x400454cc},
++{"linux/if_tun.h", "TUNSETLINK", 0x400454cd},
++{"linux/uinput.h", "UI_SET_EVBIT", 0x40045564},
++{"linux/uinput.h", "UI_SET_KEYBIT", 0x40045565},
++{"linux/uinput.h", "UI_SET_RELBIT", 0x40045566},
++{"linux/uinput.h", "UI_SET_ABSBIT", 0x40045567},
++{"linux/uinput.h", "UI_SET_MSCBIT", 0x40045568},
++{"linux/uinput.h", "UI_SET_LEDBIT", 0x40045569},
++{"linux/uinput.h", "UI_SET_SNDBIT", 0x4004556a},
++{"linux/uinput.h", "UI_SET_FFBIT", 0x4004556b},
++{"linux/uinput.h", "UI_SET_PHYS", 0x4004556c},
++{"linux/uinput.h", "UI_SET_SWBIT", 0x4004556d},
++{"linux/videodev2.h", "VIDIOC_OVERLAY", 0x4004560e},
++{"linux/videodev2.h", "VIDIOC_STREAMON", 0x40045612},
++{"linux/videodev2.h", "VIDIOC_STREAMOFF", 0x40045613},
++{"linux/atmdev.h", "ATM_SETSC", 0x400461f1},
++{"linux/atmdev.h", "ATM_DROPPARTY", 0x400461f5},
++{"linux/cm4000_cs.h", "CM_IOCSPTS", 0x40046302},
++{"linux/chio.h", "CHIOSPICKER", 0x40046305},
++{"linux/cm4000_cs.h", "CM_IOSDBGLVL", 0x400463fa},
++{"linux/video_decoder.h", "DECODER_SET_NORM", 0x40046403},
++{"linux/video_decoder.h", "DECODER_SET_INPUT", 0x40046404},
++{"linux/video_decoder.h", "DECODER_SET_OUTPUT", 0x40046405},
++{"linux/video_decoder.h", "DECODER_ENABLE_OUTPUT", 0x40046406},
++{"linux/video_decoder.h", "DECODER_SET_GPIO", 0x40046408},
++{"linux/video_decoder.h", "DECODER_SET_VBI_BYPASS", 0x4004640a},
++{"linux/video_encoder.h", "ENCODER_SET_NORM", 0x40046502},
++{"linux/video_encoder.h", "ENCODER_SET_INPUT", 0x40046503},
++{"linux/video_encoder.h", "ENCODER_SET_OUTPUT", 0x40046504},
++{"linux/video_encoder.h", "ENCODER_ENABLE_OUTPUT", 0x40046505},
++{"linux/ext3_fs.h", "EXT3_IOC_SETFLAGS", 0x40046602},
++{"linux/ext2_fs.h", "EXT2_IOC_SETFLAGS", 0x40046602},
++{"linux/iflags.h", "IFLAGS_SET_IOC", 0x40046602},
++{"linux/ext3_fs.h", "EXT3_IOC_SETVERSION", 0x40046604},
++{"linux/ext3_fs.h", "EXT3_IOC_SETRSVSZ", 0x40046606},
++{"linux/ext3_fs.h", "EXT3_IOC_GROUP_EXTEND", 0x40046607},
++{"linux/hpet.h", "HPET_IRQFREQ", 0x40046806},
++{"linux/ncp_fs.h", "NCP_IOC_GETMOUNTUID2", 0x40046e02},
++{"linux/ncp_fs.h", "NCP_IOC_SET_SIGN_WANTED", 0x40046e06},
++{"linux/ncp_fs.h", "NCP_IOC_GETDENTRYTTL", 0x40046e0c},
++{"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_CONNECTION", 0x40046ef8},
++{"linux/matroxfb.h", "MATROXFB_SET_OUTPUT_MODE", 0x40046efa},
++{"linux/rtc.h", "RTC_IRQP_SET", 0x4004700c},
++{"linux/rtc.h", "RTC_EPOCH_SET", 0x4004700e},
++{"linux/ppdev.h", "PPSETMODE", 0x40047080},
++{"linux/ppdev.h", "PPDATADIR", 0x40047090},
++{"linux/ppdev.h", "PPNEGOT", 0x40047091},
++{"linux/ppdev.h", "PPSETPHASE", 0x40047094},
++{"linux/ppdev.h", "PPSETFLAGS", 0x4004709b},
++{"linux/ticable.h", "IOCTL_TISER_DELAY", 0x400470a0},
++{"linux/ticable.h", "IOCTL_TISER_TIMEOUT", 0x400470a1},
++{"linux/ticable.h", "IOCTL_TIPAR_DELAY", 0x400470a8},
++{"linux/ticable.h", "IOCTL_TIPAR_TIMEOUT", 0x400470a9},
++{"linux/serio.h", "SPIOCSTYPE", 0x40047101},
++{"linux/telephony.h", "PHONE_CAPABILITIES_CHECK", 0x40047182},
++{"linux/telephony.h", "PHONE_RING_START", 0x40047187},
++{"linux/telephony.h", "PHONE_REC_CODEC", 0x40047189},
++{"linux/telephony.h", "PHONE_REC_DEPTH", 0x4004718c},
++{"linux/telephony.h", "PHONE_FRAME", 0x4004718d},
++{"linux/telephony.h", "PHONE_REC_VOLUME", 0x4004718e},
++{"linux/telephony.h", "PHONE_PLAY_CODEC", 0x40047190},
++{"linux/telephony.h", "PHONE_PLAY_DEPTH", 0x40047193},
++{"linux/telephony.h", "PHONE_PLAY_VOLUME", 0x40047194},
++{"linux/telephony.h", "PHONE_DTMF_OOB", 0x40047199},
++{"linux/telephony.h", "PHONE_SET_TONE_ON_TIME", 0x4004719c},
++{"linux/telephony.h", "PHONE_SET_TONE_OFF_TIME", 0x4004719d},
++{"linux/telephony.h", "PHONE_PSTN_SET_STATE", 0x400471a4},
++{"linux/telephony.h", "PHONE_WINK_DURATION", 0x400471a6},
++{"linux/telephony.h", "PHONE_VAD", 0x400471a9},
++{"linux/telephony.h", "PHONE_WINK", 0x400471aa},
++{"linux/ixjuser.h", "IXJCTL_SET_FILTER", 0x400471c7},
++{"linux/ixjuser.h", "IXJCTL_GET_FILTER_HIST", 0x400471c8},
++{"linux/ixjuser.h", "IXJCTL_INIT_TONE", 0x400471c9},
++{"linux/ixjuser.h", "IXJCTL_TONE_CADENCE", 0x400471ca},
++{"linux/ixjuser.h", "IXJCTL_AEC_START", 0x400471cb},
++{"linux/ixjuser.h", "IXJCTL_SET_LED", 0x400471ce},
++{"linux/ixjuser.h", "IXJCTL_MIXER", 0x400471cf},
++{"linux/ixjuser.h", "IXJCTL_DAA_COEFF_SET", 0x400471d0},
++{"linux/ixjuser.h", "IXJCTL_PORT", 0x400471d1},
++{"linux/ixjuser.h", "IXJCTL_DAA_AGAIN", 0x400471d2},
++{"linux/ixjuser.h", "IXJCTL_POTS_PSTN", 0x400471d5},
++{"linux/ixjuser.h", "IXJCTL_FILTER_CADENCE", 0x400471d6},
++{"linux/ixjuser.h", "IXJCTL_CIDCW", 0x400471d9},
++{"linux/telephony.h", "PHONE_REC_VOLUME_LINEAR", 0x400471db},
++{"linux/telephony.h", "PHONE_PLAY_VOLUME_LINEAR", 0x400471dc},
++{"linux/ixjuser.h", "IXJCTL_SET_FILTER_RAW", 0x400471dd},
++{"linux/ixjuser.h", "IXJCTL_HZ", 0x400471e0},
++{"linux/ixjuser.h", "IXJCTL_RATE", 0x400471e1},
++{"linux/ixjuser.h", "IXJCTL_DTMF_PRESCALE", 0x400471e8},
++{"linux/ixjuser.h", "IXJCTL_SIGCTL", 0x400471e9},
++{"linux/ixjuser.h", "IXJCTL_SC_RXG", 0x400471ea},
++{"linux/ixjuser.h", "IXJCTL_SC_TXG", 0x400471eb},
++{"linux/ixjuser.h", "IXJCTL_INTERCOM_START", 0x400471fd},
++{"linux/ixjuser.h", "IXJCTL_INTERCOM_STOP", 0x400471fe},
++{"linux/msdos_fs.h", "FAT_IOCTL_SET_ATTRIBUTES", 0x40047211},
++{"linux/if_ppp.h", "PPPIOCATTCHAN", 0x40047438},
++{"linux/if_ppp.h", "PPPIOCCONNECT", 0x4004743a},
++{"linux/if_ppp.h", "PPPIOCSMRRU", 0x4004743b},
++{"linux/if_ppp.h", "PPPIOCDETACH", 0x4004743c},
++{"linux/if_ppp.h", "PPPIOCATTACH", 0x4004743d},
++{"linux/if_ppp.h", "PPPIOCSDEBUG", 0x40047440},
++{"linux/if_ppp.h", "PPPIOCSMAXCID", 0x40047451},
++{"linux/if_ppp.h", "PPPIOCSMRU", 0x40047452},
++{"linux/if_ppp.h", "PPPIOCSRASYNCMAP", 0x40047454},
++{"linux/if_ppp.h", "PPPIOCSASYNCMAP", 0x40047457},
++{"linux/if_ppp.h", "PPPIOCSFLAGS", 0x40047459},
++{"linux/isdn_ppp.h", "PPPIOCBUNDLE", 0x40047481},
++{"linux/isdn_ppp.h", "PPPIOCSMPFLAGS", 0x40047483},
++{"linux/isdn_ppp.h", "PPPIOCSMPMTU", 0x40047484},
++{"linux/isdn_ppp.h", "PPPIOCSMPMRU", 0x40047485},
++{"linux/isdn_ppp.h", "PPPIOCSCOMPRESSOR", 0x40047487},
++{"linux/ext2_fs.h", "EXT2_IOC_SETVERSION", 0x40047602},
++{"linux/ext3_fs.h", "EXT3_IOC_SETVERSION_OLD", 0x40047602},
++{"linux/videodev.h", "VIDIOCCAPTURE", 0x40047608},
++{"linux/videodev.h", "VIDIOCSFREQ", 0x4004760f},
++{"linux/videodev.h", "VIDIOCSYNC", 0x40047612},
++{"linux/videodev.h", "VIDIOCSWRITEMODE", 0x40047619},
++{"linux/meye.h", "MEYEIOC_QBUF_CAPT", 0x400476c2},
++{"linux/videotext.h", "VTXIOCSETVIRT", 0x4004810c},
++{"linux/dn.h", "OSIOCSNETADDR", 0x400489e0},
++{"linux/dn.h", "SIOCSNETADDR", 0x400489e0},
++{"linux/auto_fs4.h", "AUTOFS_IOC_EXPIRE_MULTI", 0x40049366},
++{"linux/if_pppox.h", "PPPOEIOCSFWD", 0x4004b100},
++{"linux/gigaset_dev.h", "GIGASET_BRKCHARS", 0x40064702},
++{"linux/meye.h", "MEYEIOC_S_PARAMS", 0x400676c1},
++{"linux/cciss_ioctl.h", "CCISS_SETINTINFO", 0x40084203},
++{"linux/input.h", "EVIOCSREP", 0x40084503},
++{"linux/input.h", "EVIOCSKEYCODE", 0x40084504},
++{"mtd/mtd-abi.h", "MEMERASE", 0x40084d02},
++{"mtd/mtd-abi.h", "MEMLOCK", 0x40084d05},
++{"mtd/mtd-abi.h", "MEMUNLOCK", 0x40084d06},
++{"mtd/mtd-abi.h", "MEMGETBADBLOCK", 0x40084d0b},
++{"mtd/mtd-abi.h", "MEMSETBADBLOCK", 0x40084d0c},
++{"linux/random.h", "RNDADDENTROPY", 0x40085203},
++{"linux/videodev2.h", "VIDIOC_S_STD", 0x40085618},
++{"linux/videodev2.h", "VIDIOC_S_CTRL_OLD", 0x4008561c},
++{"linux/atmdev.h", "ATM_GETNAMES", 0x40086183},
++{"linux/atmdev.h", "ATM_ADDPARTY", 0x400861f4},
++{"linux/chio.h", "CHIOGSTATUS", 0x40086308},
++{"linux/video_decoder.h", "DECODER_INIT", 0x40086409},
++{"linux/mtio.h", "MTIOCTOP", 0x40086d01},
++{"linux/ppdev.h", "PPSETTIME", 0x40087096},
++{"linux/if_ppp.h", "PPPIOCSACTIVE", 0x40087446},
++{"linux/if_ppp.h", "PPPIOCSPASS", 0x40087447},
++{"linux/if_ppp.h", "PPPIOCSNPMODE", 0x4008744b},
++{"linux/fd.h", "FDFMTTRK", 0x400c0248},
++{"linux/capi.h", "CAPI_REGISTER", 0x400c4301},
++{"linux/hiddev.h", "HIDIOCGREPORT", 0x400c4807},
++{"linux/hiddev.h", "HIDIOCSREPORT", 0x400c4808},
++{"mtd/mtd-abi.h", "OTPGETREGIONINFO", 0x400c4d0f},
++{"linux/uinput.h", "UI_END_FF_ERASE", 0x400c55cb},
++{"linux/ite_gpio.h", "ITE_GPIO_OUT", 0x400c5a01},
++{"linux/ite_gpio.h", "ITE_GPIO_INT_CTRL", 0x400c5a02},
++{"linux/ite_gpio.h", "ITE_GPIO_IN_STATUS", 0x400c5a03},
++{"linux/ite_gpio.h", "ITE_GPIO_OUT_STATUS", 0x400c5a04},
++{"linux/ite_gpio.h", "ITE_GPIO_GEN_CTRL", 0x400c5a05},
++{"linux/ite_gpio.h", "ITE_GPIO_INT_WAIT", 0x400c5a06},
++{"linux/atm_idt77105.h", "IDT77105_GETSTAT", 0x400c6132},
++{"linux/atm_idt77105.h", "IDT77105_GETSTATZ", 0x400c6133},
++{"linux/atmdev.h", "ATM_GETSTAT", 0x400c6150},
++{"linux/atmdev.h", "ATM_GETSTATZ", 0x400c6151},
++{"linux/atmdev.h", "ATM_GETLOOP", 0x400c6152},
++{"linux/atmdev.h", "ATM_SETLOOP", 0x400c6153},
++{"linux/atmdev.h", "ATM_QUERYLOOP", 0x400c6154},
++{"linux/atm_eni.h", "ENI_MEMDUMP", 0x400c6160},
++{"linux/atm_he.h", "HE_GET_REG", 0x400c6160},
++{"linux/atm_zatm.h", "ZATM_GETPOOL", 0x400c6161},
++{"linux/atm_zatm.h", "ZATM_GETPOOLZ", 0x400c6162},
++{"linux/atm_nicstar.h", "NS_SETBUFLEV", 0x400c6162},
++{"linux/atm_zatm.h", "ZATM_SETPOOL", 0x400c6163},
++{"linux/atm_eni.h", "ENI_SETMULT", 0x400c6167},
++{"linux/atmdev.h", "ATM_GETLINKRATE", 0x400c6181},
++{"linux/atmdev.h", "ATM_GETTYPE", 0x400c6184},
++{"linux/atmdev.h", "ATM_GETESI", 0x400c6185},
++{"linux/atmdev.h", "ATM_GETADDR", 0x400c6186},
++{"linux/atmdev.h", "ATM_RSTADDR", 0x400c6187},
++{"linux/atmdev.h", "ATM_ADDADDR", 0x400c6188},
++{"linux/atmdev.h", "ATM_DELADDR", 0x400c6189},
++{"linux/atmdev.h", "ATM_GETCIRANGE", 0x400c618a},
++{"linux/atmdev.h", "ATM_SETCIRANGE", 0x400c618b},
++{"linux/atmdev.h", "ATM_SETESI", 0x400c618c},
++{"linux/atmdev.h", "ATM_SETESIF", 0x400c618d},
++{"linux/atmdev.h", "ATM_ADDLECSADDR", 0x400c618e},
++{"linux/atmdev.h", "ATM_DELLECSADDR", 0x400c618f},
++{"linux/atmdev.h", "ATM_GETLECSADDR", 0x400c6190},
++{"linux/chio.h", "CHIOPOSITION", 0x400c6303},
++{"linux/i2o-dev.h", "I2OEVTREG", 0x400c690a},
++{"linux/ncp_fs.h", "NCP_IOC_GETROOT", 0x400c6e08},
++{"linux/if_ppp.h", "PPPIOCSCOMPRESS", 0x400c744d},
++{"linux/videodev.h", "VIDIOCSPLAYMODE", 0x400c7618},
++{"linux/video_decoder.h", "DECODER_SET_PICTURE", 0x400e6407},
++{"linux/videodev.h", "VIDIOCSPICT", 0x400e7607},
++{"linux/cciss_ioctl.h", "CCISS_SETNODENAME", 0x40104205},
++{"linux/synclink.h", "MGSL_IOCSGPIO", 0x40106d10},
++{"linux/videodev.h", "VIDIOCMCAPTURE", 0x40107613},
++{"linux/fd.h", "FDSETMAXERRS", 0x4014024c},
++{"linux/videodev2.h", "VIDIOC_S_CROP", 0x4014563c},
++{"linux/chio.h", "CHIOMOVE", 0x40146301},
++{"linux/videodev.h", "VIDIOCSFBUF", 0x4014760c},
++{"linux/videodev.h", "VIDIOCSCAPTURE", 0x40147617},
++{"linux/hiddev.h", "HIDIOCSUSAGE", 0x4018480c},
++{"linux/hiddev.h", "HIDIOCGCOLLECTIONINDEX", 0x40184810},
++{"linux/ext3_fs.h", "EXT3_IOC_GROUP_ADD", 0x40186608},
++{"linux/videodev.h", "VIDIOCSMICROCODE", 0x4018761b},
++{"linux/fd.h", "FDSETPRM", 0x401c0242},
++{"linux/fd.h", "FDDEFPRM", 0x401c0243},
++{"linux/atmbr2684.h", "BR2684_SETFILT", 0x401c6190},
++{"linux/chio.h", "CHIOEXCHANGE", 0x401c6302},
++{"linux/rtc.h", "RTC_PLL_SET", 0x401c7012},
++{"linux/synclink.h", "MGSL_IOCSPARAMS", 0x40206d00},
++{"linux/if_ppp.h", "PPPIOCSXASYNCMAP", 0x4020744f},
++{"linux/videodev.h", "VIDIOCSWIN", 0x4020760a},
++{"linux/videodev.h", "VIDIOCSVBIFMT", 0x4020761d},
++{"linux/videotext.h", "VTXIOCCLRPAGE", 0x40208102},
++{"linux/videotext.h", "VTXIOCCLRFOUND", 0x40208103},
++{"linux/videotext.h", "VTXIOCPAGEREQ", 0x40208104},
++{"linux/videotext.h", "VTXIOCGETSTAT", 0x40208105},
++{"linux/videotext.h", "VTXIOCGETPAGE", 0x40208106},
++{"linux/videotext.h", "VTXIOCSTOPDAU", 0x40208107},
++{"linux/joystick.h", "JSIOCSCORR", 0x40246a21},
++{"linux/rtc.h", "RTC_ALM_SET", 0x40247007},
++{"linux/rtc.h", "RTC_SET_TIME", 0x4024700a},
++{"linux/rtc.h", "RTC_WKALM_SET", 0x4028700f},
++{"linux/smb_fs.h", "SMB_IOC_NEWCONN", 0x40287502},
++{"linux/videodev.h", "VIDIOCSAUDIO", 0x40287611},
++{"linux/videodev2.h", "VIDIOC_S_FBUF", 0x402c560b},
++{"linux/videodev2.h", "VIDIOC_S_FREQUENCY", 0x402c5639},
++{"linux/chio.h", "CHIOSVOLTAG", 0x40306312},
++{"linux/videodev.h", "VIDIOCSCHAN", 0x40307603},
++{"linux/uinput.h", "UI_END_FF_UPLOAD", 0x403455c9},
++{"linux/videodev2.h", "VIDIOC_S_AUDIO", 0x40345622},
++{"linux/videodev2.h", "VIDIOC_S_AUDOUT", 0x40345632},
++{"linux/videodev.h", "VIDIOCSTUNER", 0x40347605},
++{"linux/joystick.h", "JSIOCSAXMAP", 0x40406a31},
++{"linux/videodev2.h", "VIDIOC_S_MODULATOR", 0x40445637},
++{"linux/videodev2.h", "VIDIOC_S_TUNER", 0x4054561e},
++{"linux/fd.h", "FDSETDRVPRM", 0x40580290},
++{"linux/chio.h", "CHIOGELEM", 0x406c6310},
++{"linux/videodev2.h", "VIDIOC_S_JPEGCOMP", 0x408c563e},
++{"mtd/mtd-abi.h", "MEMSETOOBSEL", 0x40c84d09},
++{"linux/videodev2.h", "VIDIOC_S_PARM_OLD", 0x40cc5616},
++{"linux/joystick.h", "JSIOCSBTNMAP", 0x42006a33},
++{"linux/hiddev.h", "HIDIOCSUSAGES", 0x501c4814},
++{"linux/videodev2.h", "VIDIOC_G_PRIORITY", 0x80015643},
++{"linux/joystick.h", "JSIOCGAXES", 0x80016a11},
++{"linux/joystick.h", "JSIOCGBUTTONS", 0x80016a12},
++{"linux/ppdev.h", "PPRSTATUS", 0x80017081},
++{"linux/ppdev.h", "PPRCONTROL", 0x80017083},
++{"linux/ppdev.h", "PPRDATA", 0x80017085},
++{"linux/sonypi.h", "SONYPI_IOCGBRT", 0x80017600},
++{"linux/sonypi.h", "SONYPI_IOCGBATFLAGS", 0x80017607},
++{"linux/sonypi.h", "SONYPI_IOCGBLUE", 0x80017608},
++{"linux/sonypi.h", "SONYPI_IOCGFAN", 0x8001760a},
++{"linux/sonypi.h", "SONYPI_IOCGTEMP", 0x8001760c},
++{"linux/capi.h", "CAPI_GET_ERRCODE", 0x80024321},
++{"linux/capi.h", "CAPI_INSTALLED", 0x80024322},
++{"linux/ipmi.h", "IPMICTL_REGISTER_FOR_CMD", 0x8002690e},
++{"linux/ipmi.h", "IPMICTL_UNREGISTER_FOR_CMD", 0x8002690f},
++{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID", 0x80027501},
++{"linux/sonypi.h", "SONYPI_IOCGBAT1CAP", 0x80027602},
++{"linux/sonypi.h", "SONYPI_IOCGBAT1REM", 0x80027603},
++{"linux/sonypi.h", "SONYPI_IOCGBAT2CAP", 0x80027604},
++{"linux/sonypi.h", "SONYPI_IOCGBAT2REM", 0x80027605},
++{"linux/fs.h", "BLKBSZGET", 0x80041270},
++{"linux/fs.h", "BLKGETSIZE64", 0x80041272},
++{"linux/radeonfb.h", "FBIO_RADEON_GET_MIRROR", 0x80044003},
++{"linux/agpgart.h", "AGPIOC_INFO", 0x80044100},
++{"linux/pmu.h", "PMU_IOC_GET_BACKLIGHT", 0x80044201},
++{"linux/pmu.h", "PMU_IOC_GET_MODEL", 0x80044203},
++{"linux/pmu.h", "PMU_IOC_HAS_ADB", 0x80044204},
++{"linux/pmu.h", "PMU_IOC_CAN_SLEEP", 0x80044205},
++{"linux/pmu.h", "PMU_IOC_GRAB_BACKLIGHT", 0x80044206},
++{"linux/cciss_ioctl.h", "CCISS_GETHEARTBEAT", 0x80044206},
++{"linux/cciss_ioctl.h", "CCISS_GETBUSTYPES", 0x80044207},
++{"linux/cciss_ioctl.h", "CCISS_GETFIRMVER", 0x80044208},
++{"linux/cciss_ioctl.h", "CCISS_GETDRIVVER", 0x80044209},
++{"linux/capi.h", "CAPI_GET_FLAGS", 0x80044323},
++{"linux/capi.h", "CAPI_SET_FLAGS", 0x80044324},
++{"linux/capi.h", "CAPI_CLR_FLAGS", 0x80044325},
++{"linux/capi.h", "CAPI_NCCI_OPENCOUNT", 0x80044326},
++{"linux/capi.h", "CAPI_NCCI_GETUNIT", 0x80044327},
++{"linux/input.h", "EVIOCGVERSION", 0x80044501},
++{"linux/input.h", "EVIOCGEFFECTS", 0x80044584},
++{"linux/arcfb.h", "FBIO_GETCONTROL2", 0x80044689},
++{"linux/hiddev.h", "HIDIOCGVERSION", 0x80044801},
++{"linux/hiddev.h", "HIDIOCGFLAG", 0x8004480e},
++{"linux/soundcard.h", "SOUND_MIXER_READ_VOLUME", 0x80044d00},
++{"linux/soundcard.h", "SOUND_MIXER_READ_BASS", 0x80044d01},
++{"linux/soundcard.h", "SOUND_MIXER_READ_TREBLE", 0x80044d02},
++{"linux/soundcard.h", "SOUND_MIXER_READ_SYNTH", 0x80044d03},
++{"linux/soundcard.h", "SOUND_MIXER_READ_PCM", 0x80044d04},
++{"linux/soundcard.h", "SOUND_MIXER_READ_SPEAKER", 0x80044d05},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE", 0x80044d06},
++{"linux/soundcard.h", "SOUND_MIXER_READ_MIC", 0x80044d07},
++{"mtd/mtd-abi.h", "MEMGETREGIONCOUNT", 0x80044d07},
++{"linux/soundcard.h", "SOUND_MIXER_READ_CD", 0x80044d08},
++{"linux/soundcard.h", "SOUND_MIXER_READ_IMIX", 0x80044d09},
++{"linux/soundcard.h", "SOUND_MIXER_READ_ALTPCM", 0x80044d0a},
++{"linux/soundcard.h", "SOUND_MIXER_READ_RECLEV", 0x80044d0b},
++{"linux/soundcard.h", "SOUND_MIXER_READ_IGAIN", 0x80044d0c},
++{"linux/soundcard.h", "SOUND_MIXER_READ_OGAIN", 0x80044d0d},
++{"mtd/mtd-abi.h", "OTPSELECT", 0x80044d0d},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE1", 0x80044d0e},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE2", 0x80044d0f},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LINE3", 0x80044d10},
++{"linux/soundcard.h", "SOUND_MIXER_READ_LOUD", 0x80044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_READ_ENHANCE", 0x80044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_READ_MUTE", 0x80044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_READ_STEREODEVS", 0x80044dfb},
++{"linux/soundcard.h", "SOUND_MIXER_READ_CAPS", 0x80044dfc},
++{"linux/soundcard.h", "SOUND_MIXER_READ_RECMASK", 0x80044dfd},
++{"linux/soundcard.h", "SOUND_MIXER_READ_DEVMASK", 0x80044dfe},
++{"linux/soundcard.h", "SOUND_MIXER_READ_RECSRC", 0x80044dff},
++{"linux/ticable.h", "IOCTL_TIUSB_GET_MAXPS", 0x80044e23},
++{"linux/ticable.h", "IOCTL_TIUSB_GET_DEVID", 0x80044e24},
++{"linux/random.h", "RNDGETENTCNT", 0x80045200},
++{"asm/ioctls.h", "TIOCGPTN", 0x80045430},
++{"linux/videodev2.h", "VIDIOC_G_INPUT", 0x80045626},
++{"linux/videodev2.h", "VIDIOC_G_OUTPUT", 0x8004562e},
++{"linux/watchdog.h", "WDIOC_GETSTATUS", 0x80045701},
++{"linux/watchdog.h", "WDIOC_GETBOOTSTATUS", 0x80045702},
++{"linux/watchdog.h", "WDIOC_GETTEMP", 0x80045703},
++{"linux/watchdog.h", "WDIOC_SETOPTIONS", 0x80045704},
++{"linux/watchdog.h", "WDIOC_KEEPALIVE", 0x80045705},
++{"linux/watchdog.h", "WDIOC_GETTIMEOUT", 0x80045707},
++{"linux/watchdog.h", "WDIOC_GETPRETIMEOUT", 0x80045709},
++{"linux/watchdog.h", "WDIOC_GETTIMELEFT", 0x8004570a},
++{"linux/sonet.h", "SONET_GETDIAG", 0x80046114},
++{"linux/sonet.h", "SONET_GETFRAMING", 0x80046116},
++{"linux/cm4000_cs.h", "CM_IOCGSTATUS", 0x80046300},
++{"linux/chio.h", "CHIOGPICKER", 0x80046304},
++{"linux/video_decoder.h", "DECODER_GET_STATUS", 0x80046402},
++{"linux/iflags.h", "IFLAGS_GET_IOC", 0x80046601},
++{"linux/ext3_fs.h", "EXT3_IOC_GETFLAGS", 0x80046601},
++{"linux/ext2_fs.h", "EXT2_IOC_GETFLAGS", 0x80046601},
++{"linux/ext3_fs.h", "EXT3_IOC_GETVERSION", 0x80046603},
++{"linux/ext3_fs.h", "EXT3_IOC_GETRSVSZ", 0x80046605},
++{"linux/ext3_fs.h", "EXT3_IOC_WAIT_FOR_READONLY", 0x80046663},
++{"linux/i2o-dev.h", "I2OVALIDATE", 0x80046908},
++{"linux/ipmi.h", "IPMICTL_SET_GETS_EVENTS_CMD", 0x80046910},
++{"linux/ipmi.h", "IPMICTL_SET_MY_ADDRESS_CMD", 0x80046911},
++{"linux/ipmi.h", "IPMICTL_GET_MY_ADDRESS_CMD", 0x80046912},
++{"linux/ipmi.h", "IPMICTL_SET_MY_LUN_CMD", 0x80046913},
++{"linux/ipmi.h", "IPMICTL_GET_MY_LUN_CMD", 0x80046914},
++{"linux/ipmi.h", "IPMICTL_SET_MY_CHANNEL_ADDRESS_CMD", 0x80046918},
++{"linux/ipmi.h", "IPMICTL_GET_MY_CHANNEL_ADDRESS_CMD", 0x80046919},
++{"linux/ipmi.h", "IPMICTL_SET_MY_CHANNEL_LUN_CMD", 0x8004691a},
++{"linux/ipmi.h", "IPMICTL_GET_MY_CHANNEL_LUN_CMD", 0x8004691b},
++{"linux/i8k.h", "I8K_BIOS_VERSION", 0x80046980},
++{"linux/i8k.h", "I8K_MACHINE_ID", 0x80046981},
++{"linux/i8k.h", "I8K_POWER_STATUS", 0x80046982},
++{"linux/i8k.h", "I8K_FN_STATUS", 0x80046983},
++{"linux/i8k.h", "I8K_GET_TEMP", 0x80046984},
++{"linux/joystick.h", "JSIOCGVERSION", 0x80046a01},
++{"linux/udf_fs_i.h", "UDF_GETEASIZE", 0x80046c40},
++{"linux/udf_fs_i.h", "UDF_GETEABLOCK", 0x80046c41},
++{"linux/udf_fs_i.h", "UDF_GETVOLIDENT", 0x80046c42},
++{"linux/mmtimer.h", "MMTIMER_GETRES", 0x80046d01},
++{"linux/mmtimer.h", "MMTIMER_GETFREQ", 0x80046d02},
++{"linux/mtio.h", "MTIOCPOS", 0x80046d03},
++{"linux/mmtimer.h", "MMTIMER_GETCOUNTER", 0x80046d09},
++{"linux/zftape.h", "MTIOC_ZFTAPE_GETBLKSZ", 0x80046d68},
++{"linux/ncp_fs.h", "NCP_IOC_SIGN_WANTED", 0x80046e06},
++{"linux/ncp_fs.h", "NCP_IOC_SETDENTRYTTL", 0x80046e0c},
++{"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_CONNECTION", 0x80046ef8},
++{"linux/matroxfb.h", "MATROXFB_GET_AVAILABLE_OUTPUTS", 0x80046ef9},
++{"linux/matroxfb.h", "MATROXFB_GET_ALL_OUTPUTS", 0x80046efb},
++{"linux/rtc.h", "RTC_IRQP_READ", 0x8004700b},
++{"linux/rtc.h", "RTC_EPOCH_READ", 0x8004700d},
++{"linux/ppdev.h", "PPCLRIRQ", 0x80047093},
++{"linux/ppdev.h", "PPGETMODES", 0x80047097},
++{"linux/ppdev.h", "PPGETMODE", 0x80047098},
++{"linux/ppdev.h", "PPGETPHASE", 0x80047099},
++{"linux/ppdev.h", "PPGETFLAGS", 0x8004709a},
++{"linux/telephony.h", "PHONE_CAPABILITIES_LIST", 0x80047181},
++{"linux/telephony.h", "PHONE_DTMF_READY", 0x80047196},
++{"linux/telephony.h", "PHONE_GET_DTMF", 0x80047197},
++{"linux/telephony.h", "PHONE_GET_DTMF_ASCII", 0x80047198},
++{"linux/telephony.h", "PHONE_EXCEPTION", 0x8004719a},
++{"linux/ixjuser.h", "IXJCTL_CARDTYPE", 0x800471c1},
++{"linux/ixjuser.h", "IXJCTL_SERIAL", 0x800471c2},
++{"linux/ixjuser.h", "IXJCTL_DSP_TYPE", 0x800471c3},
++{"linux/ixjuser.h", "IXJCTL_DSP_VERSION", 0x800471c4},
++{"linux/ixjuser.h", "IXJCTL_CID", 0x800471d4},
++{"linux/ixjuser.h", "IXJCTL_VMWI", 0x800471d8},
++{"linux/ixjuser.h", "IXJCTL_VERSION", 0x800471da},
++{"linux/ixjuser.h", "IXJCTL_FRAMES_READ", 0x800471e2},
++{"linux/ixjuser.h", "IXJCTL_FRAMES_WRITTEN", 0x800471e3},
++{"linux/ixjuser.h", "IXJCTL_READ_WAIT", 0x800471e4},
++{"linux/ixjuser.h", "IXJCTL_WRITE_WAIT", 0x800471e5},
++{"linux/ixjuser.h", "IXJCTL_DRYBUFFER_READ", 0x800471e6},
++{"linux/msdos_fs.h", "FAT_IOCTL_GET_ATTRIBUTES", 0x80047210},
++{"linux/if_ppp.h", "PPPIOCGCHAN", 0x80047437},
++{"linux/if_ppp.h", "PPPIOCGDEBUG", 0x80047441},
++{"linux/if_ppp.h", "PPPIOCGMRU", 0x80047453},
++{"linux/if_ppp.h", "PPPIOCGRASYNCMAP", 0x80047455},
++{"linux/if_ppp.h", "PPPIOCGUNIT", 0x80047456},
++{"linux/if_ppp.h", "PPPIOCGASYNCMAP", 0x80047458},
++{"linux/if_ppp.h", "PPPIOCGFLAGS", 0x8004745a},
++{"linux/isdn_ppp.h", "PPPIOCGMPFLAGS", 0x80047482},
++{"linux/smb_fs.h", "SMB_IOC_GETMOUNTUID32", 0x80047503},
++{"linux/ext2_fs.h", "EXT2_IOC_GETVERSION", 0x80047601},
++{"linux/ext3_fs.h", "EXT3_IOC_GETVERSION_OLD", 0x80047601},
++{"linux/videodev.h", "VIDIOCGFREQ", 0x8004760e},
++{"linux/meye.h", "MEYEIOC_STILLJCAPT", 0x800476c5},
++{"linux/dn.h", "SIOCGNETADDR", 0x800489e1},
++{"linux/dn.h", "OSIOCGNETADDR", 0x800489e1},
++{"linux/auto_fs.h", "AUTOFS_IOC_PROTOVER", 0x80049363},
++{"linux/auto_fs4.h", "AUTOFS_IOC_PROTOSUBVER", 0x80049367},
++{"linux/auto_fs4.h", "AUTOFS_IOC_ASKREGHOST", 0x80049368},
++{"linux/auto_fs4.h", "AUTOFS_IOC_TOGGLEREGHOST", 0x80049369},
++{"linux/auto_fs4.h", "AUTOFS_IOC_ASKUMOUNT", 0x80049370},
++{"linux/sonet.h", "SONET_GETFRSENSE", 0x80066117},
++{"linux/meye.h", "MEYEIOC_G_PARAMS", 0x800676c0},
++{"linux/cciss_ioctl.h", "CCISS_GETPCIINFO", 0x80084201},
++{"linux/cciss_ioctl.h", "CCISS_GETINTINFO", 0x80084202},
++{"linux/input.h", "EVIOCGID", 0x80084502},
++{"linux/input.h", "EVIOCGREP", 0x80084503},
++{"linux/input.h", "EVIOCGKEYCODE", 0x80084504},
++{"linux/random.h", "RNDGETPOOL", 0x80085202},
++{"linux/videodev2.h", "VIDIOC_G_STD", 0x80085617},
++{"linux/videodev2.h", "VIDIOC_QUERYSTD", 0x8008563f},
++{"linux/i2o-dev.h", "I2OPASSTHRU", 0x8008690c},
++{"linux/i2o-dev.h", "I2OPASSTHRU32", 0x8008690c},
++{"linux/ipmi.h", "IPMICTL_SET_TIMING_PARMS_CMD", 0x80086916},
++{"linux/ipmi.h", "IPMICTL_GET_TIMING_PARMS_CMD", 0x80086917},
++{"linux/mtio.h", "MTIOCGETSIZE", 0x80086d09},
++{"linux/ncp_fs.h", "NCP_IOC_SETPRIVATEDATA", 0x80086e0a},
++{"linux/ppdev.h", "PPGETTIME", 0x80087095},
++{"linux/if_ppp.h", "PPPIOCGIDLE", 0x8008743f},
++{"linux/cciss_ioctl.h", "CCISS_GETLUNINFO", 0x800c4211},
++{"mtd/mtd-abi.h", "OTPLOCK", 0x800c4d10},
++{"linux/video_decoder.h", "DECODER_GET_CAPABILITIES", 0x800c6401},
++{"linux/video_encoder.h", "ENCODER_GET_CAPABILITIES", 0x800c6501},
++{"linux/hpet.h", "HPET_INFO", 0x800c6803},
++{"linux/ncp_fs.h", "NCP_IOC_NCPREQUEST", 0x800c6e01},
++{"linux/ncp_fs.h", "NCP_IOC_SETROOT", 0x800c6e08},
++{"linux/ncp_fs.h", "NCP_IOC_SETOBJECTNAME", 0x800c6e09},
++{"linux/videodev.h", "VIDIOCKEY", 0x800c760d},
++{"linux/videodev.h", "VIDIOCGPICT", 0x800e7606},
++{"linux/fd.h", "FDGETDRVTYP", 0x8010020f},
++{"linux/cciss_ioctl.h", "CCISS_GETNODENAME", 0x80104204},
++{"mtd/mtd-abi.h", "ECCGETSTATS", 0x80104d12},
++{"linux/synclink.h", "MGSL_IOCGGPIO", 0x80106d11},
++{"linux/isdn_ppp.h", "PPPIOCGIFNAME", 0x80107488},
++{"linux/videotext.h", "VTXIOCGETINFO", 0x80108101},
++{"linux/fd.h", "FDGETMAXERRS", 0x8014020e},
++{"linux/chio.h", "CHIOGPARAMS", 0x80146306},
++{"linux/ipmi.h", "IPMICTL_SEND_COMMAND", 0x8014690d},
++{"linux/mtio.h", "MTIOCVOLINFO", 0x80146d08},
++{"linux/ncp_fs.h", "NCP_IOC_LOCKUNLOCK", 0x80146e07},
++{"linux/videodev.h", "VIDIOCGFBUF", 0x8014760b},
++{"linux/videodev.h", "VIDIOCGUNIT", 0x80147615},
++{"linux/videodev.h", "VIDIOCGCAPTURE", 0x80147616},
++{"linux/fd.h", "FDWERRORGET", 0x80180217},
++{"linux/ncp_fs.h", "NCP_IOC_SIGN_INIT", 0x80186e05},
++{"linux/fd.h", "FDGETPRM", 0x801c0204},
++{"linux/hiddev.h", "HIDIOCGDEVINFO", 0x801c4803},
++{"linux/ipmi.h", "IPMICTL_SEND_COMMAND_SETTIME", 0x801c6915},
++{"linux/mtio.h", "MTIOCGET", 0x801c6d02},
++{"linux/rtc.h", "RTC_PLL_GET", 0x801c7011},
++{"linux/fd.h", "FDGETFDCSTAT", 0x80200215},
++{"linux/fb.h", "FBIOGET_VBLANK", 0x80204612},
++{"mtd/mtd-abi.h", "MEMGETINFO", 0x80204d01},
++{"linux/i2o-dev.h", "I2OGETIOPS", 0x80206900},
++{"linux/synclink.h", "MGSL_IOCGPARAMS", 0x80206d01},
++{"linux/if_ppp.h", "PPPIOCGXASYNCMAP", 0x80207450},
++{"linux/isdn_ppp.h", "PPPIOCGCOMPRESSORS", 0x80207486},
++{"linux/videodev.h", "VIDIOCGWIN", 0x80207609},
++{"linux/videodev.h", "VIDIOCGVBIFMT", 0x8020761c},
++{"linux/sonet.h", "SONET_GETSTAT", 0x80246110},
++{"linux/sonet.h", "SONET_GETSTATZ", 0x80246111},
++{"linux/joystick.h", "JSIOCGCORR", 0x80246a22},
++{"linux/rtc.h", "RTC_ALM_READ", 0x80247008},
++{"linux/rtc.h", "RTC_RD_TIME", 0x80247009},
++{"linux/watchdog.h", "WDIOC_GETSUPPORT", 0x80285700},
++{"linux/rtc.h", "RTC_WKALM_RD", 0x80287010},
++{"linux/videodev.h", "VIDIOCGAUDIO", 0x80287610},
++{"linux/ncp_fs.h", "NCP_IOC_SETCHARSETS", 0x802a6e0b},
++{"linux/videodev2.h", "VIDIOC_G_FBUF", 0x802c560a},
++{"linux/videodev2.h", "VIDIOC_CROPCAP_OLD", 0x802c563a},
++{"linux/fd.h", "FDGETDRVSTAT", 0x80340212},
++{"linux/fd.h", "FDPOLLDRVSTAT", 0x80340213},
++{"linux/videodev2.h", "VIDIOC_G_AUDIO", 0x80345621},
++{"linux/videodev2.h", "VIDIOC_G_AUDOUT", 0x80345631},
++{"linux/videodev.h", "VIDIOCGCAP", 0x803c7601},
++{"linux/joystick.h", "JSIOCGAXMAP", 0x80406a32},
++{"linux/fd.h", "FDGETDRVPRM", 0x80580211},
++{"linux/videodev2.h", "VIDIOC_QUERYCAP", 0x80685600},
++{"linux/i2o-dev.h", "I2OEVTGET", 0x8068690b},
++{"linux/chio.h", "CHIOGVPARAMS", 0x80706313},
++{"linux/videodev2.h", "VIDIOC_G_SLICED_VBI_CAP", 0x80745645},
++{"linux/videodev.h", "VIDIOCGMBUF", 0x80887614},
++{"linux/videodev2.h", "VIDIOC_G_JPEGCOMP", 0x808c563d},
++{"mtd/mtd-abi.h", "MEMGETOOBSEL", 0x80c84d0a},
++{"linux/hiddev.h", "HIDIOCGSTRING", 0x81044804},
++{"linux/auto_fs.h", "AUTOFS_IOC_EXPIRE", 0x810c9365},
++{"linux/videodev.h", "VIDIOCGPLAYINFO", 0x8118761a},
++{"mtd/mtd-abi.h", "ECCGETLAYOUT", 0x81484d11},
++{"linux/joystick.h", "JSIOCGBTNMAP", 0x82006a34},
++{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_BOTH", 0x82187201},
++{"linux/msdos_fs.h", "VFAT_IOCTL_READDIR_SHORT", 0x82187202},
++{"linux/agpgart.h", "AGPIOC_ALLOCATE", 0xc0044106},
++{"linux/capi.h", "CAPI_GET_MANUFACTURER", 0xc0044306},
++{"linux/capi.h", "CAPI_GET_SERIAL", 0xc0044308},
++{"linux/gigaset_dev.h", "GIGASET_REDIR", 0xc0044700},
++{"linux/gigaset_dev.h", "GIGASET_CONFIG", 0xc0044701},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_VOLUME", 0xc0044d00},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_BASS", 0xc0044d01},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_TREBLE", 0xc0044d02},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_SYNTH", 0xc0044d03},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_PCM", 0xc0044d04},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_SPEAKER", 0xc0044d05},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE", 0xc0044d06},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_MIC", 0xc0044d07},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_CD", 0xc0044d08},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_IMIX", 0xc0044d09},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_ALTPCM", 0xc0044d0a},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECLEV", 0xc0044d0b},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_IGAIN", 0xc0044d0c},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_OGAIN", 0xc0044d0d},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE1", 0xc0044d0e},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE2", 0xc0044d0f},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LINE3", 0xc0044d10},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_ENHANCE", 0xc0044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_LOUD", 0xc0044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_MUTE", 0xc0044d1f},
++{"linux/soundcard.h", "SOUND_MIXER_WRITE_RECSRC", 0xc0044dff},
++{"linux/videodev2.h", "VIDIOC_OVERLAY_OLD", 0xc004560e},
++{"linux/videodev2.h", "VIDIOC_S_INPUT", 0xc0045627},
++{"linux/videodev2.h", "VIDIOC_S_OUTPUT", 0xc004562f},
++{"linux/watchdog.h", "WDIOC_SETTIMEOUT", 0xc0045706},
++{"linux/watchdog.h", "WDIOC_SETPRETIMEOUT", 0xc0045708},
++{"linux/sonet.h", "SONET_SETDIAG", 0xc0046112},
++{"linux/sonet.h", "SONET_CLRDIAG", 0xc0046113},
++{"linux/cm4000_cs.h", "CM_IOCGATR", 0xc0046301},
++{"linux/coda.h", "CIOC_KERNEL_VERSION", 0xc004630a},
++{"linux/i8k.h", "I8K_GET_SPEED", 0xc0046985},
++{"linux/i8k.h", "I8K_GET_FAN", 0xc0046986},
++{"linux/i8k.h", "I8K_SET_FAN", 0xc0046987},
++{"linux/udf_fs_i.h", "UDF_RELOCATE_BLOCKS", 0xc0046c43},
++{"linux/synclink.h", "MGSL_IOCWAITEVENT", 0xc0046d08},
++{"linux/matroxfb.h", "MATROXFB_GET_OUTPUT_MODE", 0xc0046efa},
++{"linux/telephony.h", "PHONE_QUERY_CODEC", 0xc00471a7},
++{"linux/if_ppp.h", "PPPIOCNEWUNIT", 0xc004743e},
++{"linux/toshiba.h", "TOSH_SMM", 0xc0047490},
++{"linux/meye.h", "MEYEIOC_SYNC", 0xc00476c3},
++{"linux/auto_fs.h", "AUTOFS_IOC_SETTIMEOUT", 0xc0049364},
++{"linux/capi.h", "CAPI_MANUFACTURER_CMD", 0xc0084320},
++{"linux/videodev2.h", "VIDIOC_G_CTRL", 0xc008561b},
++{"linux/videodev2.h", "VIDIOC_S_CTRL", 0xc008561c},
++{"linux/ncp_fs.h", "NCP_IOC_GETPRIVATEDATA", 0xc0086e0a},
++{"linux/if_ppp.h", "PPPIOCGNPMODE", 0xc008744c},
++{"linux/hiddev.h", "HIDIOCGREPORTINFO", 0xc00c4809},
++{"mtd/mtd-abi.h", "MEMWRITEOOB", 0xc00c4d03},
++{"mtd/mtd-abi.h", "MEMREADOOB", 0xc00c4d04},
++{"linux/uinput.h", "UI_BEGIN_FF_ERASE", 0xc00c55ca},
++{"linux/ite_gpio.h", "ITE_GPIO_IN", 0xc00c5a00},
++{"linux/atm_nicstar.h", "NS_GETPSTAT", 0xc00c6161},
++{"linux/i2o-dev.h", "I2OHRTGET", 0xc00c6901},
++{"linux/i2o-dev.h", "I2OLCTGET", 0xc00c6902},
++{"linux/mtio.h", "MTIOCFTFORMAT", 0xc00c6d0a},
++{"linux/ncp_fs.h", "NCP_IOC_GETOBJECTNAME", 0xc00c6e09},
++{"linux/capi.h", "CAPI_GET_VERSION", 0xc0104307},
++{"linux/gigaset_dev.h", "GIGASET_VERSION", 0xc0104703},
++{"linux/hiddev.h", "HIDIOCGCOLLECTIONINFO", 0xc0104811},
++{"mtd/mtd-abi.h", "MEMGETREGIONINFO", 0xc0104d08},
++{"linux/videodev2.h", "VIDIOC_REQBUFS", 0xc0105608},
++{"linux/mtio.h", "MTIOCRDFTSEG", 0xc0106d06},
++{"linux/mtio.h", "MTIOCWRFTSEG", 0xc0106d07},
++{"linux/synclink.h", "MGSL_IOCWAITGPIO", 0xc0106d12},
++{"linux/videodev2.h", "VIDIOC_G_CROP", 0xc014563b},
++{"linux/hiddev.h", "HIDIOCGUSAGE", 0xc018480b},
++{"linux/hiddev.h", "HIDIOCGUCODE", 0xc018480d},
++{"linux/videodev2.h", "VIDIOC_G_EXT_CTRLS", 0xc0185647},
++{"linux/videodev2.h", "VIDIOC_S_EXT_CTRLS", 0xc0185648},
++{"linux/videodev2.h", "VIDIOC_TRY_EXT_CTRLS", 0xc0185649},
++{"linux/pktcdvd.h", "PACKET_CTRL_CMD", 0xc0185801},
++{"linux/i2o-dev.h", "I2OPARMSET", 0xc0186903},
++{"linux/i2o-dev.h", "I2OPARMGET", 0xc0186904},
++{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG_TRUNC", 0xc018690b},
++{"linux/ipmi.h", "IPMICTL_RECEIVE_MSG", 0xc018690c},
++{"linux/i2o-dev.h", "I2OSWDL", 0xc01c6905},
++{"linux/i2o-dev.h", "I2OSWUL", 0xc01c6906},
++{"linux/i2o-dev.h", "I2OSWDEL", 0xc01c6907},
++{"linux/i2o-dev.h", "I2OHTML", 0xc01c6909},
++{"linux/mtio.h", "MTIOCFTCMD", 0xc0206d0b},
++{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO_V2", 0xc0246e04},
++{"linux/ncp_fs.h", "NCP_IOC_GET_FS_INFO", 0xc0286e04},
++{"linux/ncp_fs.h", "NCP_IOC_GETCHARSETS", 0xc02a6e0b},
++{"linux/videodev2.h", "VIDIOC_QUERYMENU", 0xc02c5625},
++{"linux/videodev2.h", "VIDIOC_G_FREQUENCY", 0xc02c5638},
++{"linux/videodev2.h", "VIDIOC_CROPCAP", 0xc02c563a},
++{"linux/videodev.h", "VIDIOCGCHAN", 0xc0307602},
++{"linux/uinput.h", "UI_BEGIN_FF_UPLOAD", 0xc03455c8},
++{"linux/videodev2.h", "VIDIOC_G_AUDIO_OLD", 0xc0345621},
++{"linux/videodev2.h", "VIDIOC_G_AUDOUT_OLD", 0xc0345631},
++{"linux/videodev2.h", "VIDIOC_ENUMAUDIO", 0xc0345641},
++{"linux/videodev2.h", "VIDIOC_ENUMAUDOUT", 0xc0345642},
++{"linux/videodev.h", "VIDIOCGTUNER", 0xc0347604},
++{"linux/hiddev.h", "HIDIOCGFIELDINFO", 0xc038480a},
++{"linux/capi.h", "CAPI_GET_PROFILE", 0xc0404309},
++{"linux/videodev2.h", "VIDIOC_ENUM_FMT", 0xc0405602},
++{"linux/videodev2.h", "VIDIOC_ENUMSTD", 0xc0405619},
++{"linux/videodev2.h", "VIDIOC_QUERYBUF", 0xc0445609},
++{"linux/videodev2.h", "VIDIOC_QBUF", 0xc044560f},
++{"linux/videodev2.h", "VIDIOC_DQBUF", 0xc0445611},
++{"linux/videodev2.h", "VIDIOC_QUERYCTRL", 0xc0445624},
++{"linux/videodev2.h", "VIDIOC_G_MODULATOR", 0xc0445636},
++{"linux/fb.h", "FBIO_CURSOR", 0xc0484608},
++{"linux/videodev2.h", "VIDIOC_ENUMOUTPUT", 0xc0485630},
++{"linux/videodev2.h", "VIDIOC_ENUMINPUT", 0xc04c561a},
++{"linux/cciss_ioctl.h", "CCISS_PASSTHRU", 0xc054420b},
++{"linux/videodev2.h", "VIDIOC_G_TUNER", 0xc054561d},
++{"linux/cciss_ioctl.h", "CCISS_BIG_PASSTHRU", 0xc0584212},
++{"linux/isdn_ppp.h", "PPPIOCGCALLINFO", 0xc0887480},
++{"linux/videodev2.h", "VIDIOC_G_FMT", 0xc0cc5604},
++{"linux/videodev2.h", "VIDIOC_S_FMT", 0xc0cc5605},
++{"linux/videodev2.h", "VIDIOC_G_PARM", 0xc0cc5615},
++{"linux/videodev2.h", "VIDIOC_S_PARM", 0xc0cc5616},
++{"linux/videodev2.h", "VIDIOC_TRY_FMT", 0xc0cc5640},
++{"linux/dm-ioctl.h", "DM_VERSION", 0xc134fd00},
++{"linux/dm-ioctl.h", "DM_VERSION_32", 0xc134fd00},
++{"linux/dm-ioctl.h", "DM_REMOVE_ALL_32", 0xc134fd01},
++{"linux/dm-ioctl.h", "DM_REMOVE_ALL", 0xc134fd01},
++{"linux/dm-ioctl.h", "DM_LIST_DEVICES_32", 0xc134fd02},
++{"linux/dm-ioctl.h", "DM_LIST_DEVICES", 0xc134fd02},
++{"linux/dm-ioctl.h", "DM_DEV_CREATE_32", 0xc134fd03},
++{"linux/dm-ioctl.h", "DM_DEV_CREATE", 0xc134fd03},
++{"linux/dm-ioctl.h", "DM_DEV_REMOVE", 0xc134fd04},
++{"linux/dm-ioctl.h", "DM_DEV_REMOVE_32", 0xc134fd04},
++{"linux/dm-ioctl.h", "DM_DEV_RENAME_32", 0xc134fd05},
++{"linux/dm-ioctl.h", "DM_DEV_RENAME", 0xc134fd05},
++{"linux/dm-ioctl.h", "DM_DEV_SUSPEND_32", 0xc134fd06},
++{"linux/dm-ioctl.h", "DM_DEV_SUSPEND", 0xc134fd06},
++{"linux/dm-ioctl.h", "DM_DEV_STATUS", 0xc134fd07},
++{"linux/dm-ioctl.h", "DM_DEV_STATUS_32", 0xc134fd07},
++{"linux/dm-ioctl.h", "DM_DEV_WAIT", 0xc134fd08},
++{"linux/dm-ioctl.h", "DM_DEV_WAIT_32", 0xc134fd08},
++{"linux/dm-ioctl.h", "DM_TABLE_LOAD", 0xc134fd09},
++{"linux/dm-ioctl.h", "DM_TABLE_LOAD_32", 0xc134fd09},
++{"linux/dm-ioctl.h", "DM_TABLE_CLEAR_32", 0xc134fd0a},
++{"linux/dm-ioctl.h", "DM_TABLE_CLEAR", 0xc134fd0a},
++{"linux/dm-ioctl.h", "DM_TABLE_DEPS_32", 0xc134fd0b},
++{"linux/dm-ioctl.h", "DM_TABLE_DEPS", 0xc134fd0b},
++{"linux/dm-ioctl.h", "DM_TABLE_STATUS", 0xc134fd0c},
++{"linux/dm-ioctl.h", "DM_TABLE_STATUS_32", 0xc134fd0c},
++{"linux/dm-ioctl.h", "DM_LIST_VERSIONS", 0xc134fd0d},
++{"linux/dm-ioctl.h", "DM_LIST_VERSIONS_32", 0xc134fd0d},
++{"linux/dm-ioctl.h", "DM_TARGET_MSG", 0xc134fd0e},
++{"linux/dm-ioctl.h", "DM_TARGET_MSG_32", 0xc134fd0e},
++{"linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY_32", 0xc134fd0f},
++{"linux/dm-ioctl.h", "DM_DEV_SET_GEOMETRY", 0xc134fd0f},
++{"linux/hiddev.h", "HIDIOCGUSAGES", 0xd01c4813},
+diff --git a/linux/avr32/ioctlent.sh b/linux/avr32/ioctlent.sh
+new file mode 100644
+index 0000000..8e1b448
+--- /dev/null
++++ b/linux/avr32/ioctlent.sh
+@@ -0,0 +1,124 @@
++#!/bin/sh
++# Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
++# All rights reserved.
++#
++# Copyright (c) 1995, 1996 Michael Elizabeth Chastain <mec@duracef.shout.net>
++# All rights reserved.
++#
++# Redistribution and use in source and binary forms, with or without
++# modification, are permitted provided that the following conditions
++# are met:
++# 1. Redistributions of source code must retain the above copyright
++# notice, this list of conditions and the following disclaimer.
++# 2. Redistributions in binary form must reproduce the above copyright
++# notice, this list of conditions and the following disclaimer in the
++# documentation and/or other materials provided with the distribution.
++# 3. The name of the author may not be used to endorse or promote products
++# derived from this software without specific prior written permission.
++#
++# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++
++# Files to find.
++file_find='asm/*.h linux/*.h scsi/*.h mtd/*.h'
++
++# Files to stop.
++file_stop='asm/byteorder.h linux/config.h linux/elf-em.h linux/pci_ids.h linux/xd.h linux/reiserfs_fs.h linux/usbdevice_fs.h'
++
++# Defs to find.
++# Work on the kernel source to convert all to df_iowr.
++# Don't know how to find low-numbered ioctls in linux/mc146818rtc.h.
++df_name='^[ ]*#[ ]*define[ ]+[A-Z_][A-Z0-9_]*[ ]+'
++df_iowr='_IO|_IOR|_IOW|_IOWR'
++df_NNNN='0[Xx](03|06|22|46|4B|4C|53|54|56|89|90)[0-9A-Fa-f][0-9A-Fa-f]'
++df_4359='0[Xx]4359[0-9A-Fa-f][0-9A-Fa-f]' # linux/cyclades.h
++df_470N='470[0-9]' # linux/fs.h (only in 1.2.13)
++df_smix='MIXER_READ|MIXER_WRITE' # linux/soundcard.h
++df_12NN='12[3-4][0-9]' # linux/umsdos_fs.h (only in 1.2.13)
++df_tail='([() ]|$)'
++def_find="$df_name($df_iowr|$df_NNNN|$df_4359|$df_470N|$df_smix|$df_12NN)$df_tail"
++
++# Defs to stop.
++ds_tail='_MAGIC|_PATCH'
++ds_fdmp='FD(DEF|GET|SET)MEDIAPRM' # linux/fd.h aliases (only in 1.2.13)
++ds_mtio='MTIOC(GET|SET)CONFIG' # linux/mtio.h needs config (only in 1.2.13)
++ds_soundcard='_SIO(RW?|W)?'
++def_stop="$ds_tail|$ds_fdmp|$ds_mtio|$ds_soundcard"
++
++# Validate arg count.
++if [ $# -ne 1 ]
++then
++ echo "usage: $0 include-directory" >&2
++ exit 1
++fi
++
++# Grep through the files.
++(
++ # Construct list: find files minus stop files.
++ cd $1 || exit
++ file_list=`(ls $file_find $file_stop $file_stop 2>/dev/null) | sort | uniq -u`
++
++ # Grep matching #define lines.
++ # Transform to C structure form.
++ # Filter out stop list.
++ egrep "$def_find" $file_list |
++ sed -n -e 's/^\(.*\):#[ ]*define[ ]*\([A-Z_][A-Z0-9_]*\).*$/ { "\1", "\2", \2 },/p' |
++ egrep -v "$def_stop"
++) > ioctlent.tmp
++
++# Generate the output file.
++echo '/* This file is automatically generated by ioctlent.sh */'
++echo
++echo '#include <sys/types.h>'
++echo '#include <sys/socket.h>'
++echo '#include <stdint.h>'
++echo
++echo '/* Needed for <linux/baycom.h> */'
++echo '#define BAYCOM_DEBUG'
++echo
++echo '/* Needed for <linux/dm-ioctl.h> */'
++echo '#define CONFIG_COMPAT'
++echo
++echo '/* Needed for <linux/ext3_fs.h> */'
++echo '#define CONFIG_JBD_DEBUG'
++echo
++echo '/* Needed for <linux/lp.h> */'
++echo '#define LP_STATS'
++echo
++echo '/* Needed for <linux/videodev2.h> */'
++echo '#define __OLD_VIDIOC_'
++echo
++echo '/* Needed for <linux/zftape.h> */'
++echo '#define ZFT_OBSOLETE'
++echo
++echo '/* Needed for <linux/auto_fs.h> */'
++echo '#include <linux/limits.h>'
++echo
++echo '/* Needed for <linux/cyclades.h> */'
++echo '#include <linux/termios.h>'
++#echo '#include <linux/tqueue.h>'
++echo
++echo '/* Needed for <linux/if_ppp.h> */'
++echo '#include <linux/ppp_defs.h>'
++echo '#include <linux/filter.h>'
++echo
++echo '/* Needed for <linux/msdos_fs.h> */'
++echo '#include <linux/dirent.h>'
++echo
++awk '{ print "#include <" substr($2, 2, length($2) - 3) ">" }' ioctlent.tmp | sort -u
++echo
++echo 'struct ioctlent ioctlent [] ='
++echo '{'
++cat ioctlent.tmp
++echo '};'
++
++# Clean up.
++rm -f ioctlent.tmp
+diff --git a/linux/avr32/syscallent.h b/linux/avr32/syscallent.h
+new file mode 100644
+index 0000000..702d28f
+--- /dev/null
++++ b/linux/avr32/syscallent.h
+@@ -0,0 +1,307 @@
++/*
++ * Copyright (c) 2004-2006 Atmel Corporation
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ * derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * $Id$
++ */
++
++ { 0, 0, sys_setup, "setup" }, /* 0 */
++ { 1, TP, sys_exit, "_exit" }, /* 1 */
++ { 0, TP, sys_fork, "fork" }, /* 2 */
++ { 3, 0, sys_read, "read" }, /* 3 */
++ { 3, 0, sys_write, "write" }, /* 4 */
++ { 3, TF, sys_open, "open" }, /* 5 */
++ { 1, 0, sys_close, "close" }, /* 6 */
++ { 1, 0, sys_umask, "umask" }, /* 7 */
++ { 2, TF, sys_creat, "creat" }, /* 8 */
++ { 2, TF, sys_link, "link" }, /* 9 */
++ { 1, TF, sys_unlink, "unlink" }, /* 10 */
++ { 3, TF|TP, sys_execve, "execve" }, /* 11 */
++ { 1, TF, sys_chdir, "chdir" }, /* 12 */
++ { 1, 0, sys_time, "time" }, /* 13 */
++ { 3, TF, sys_mknod, "mknod" }, /* 14 */
++ { 2, TF, sys_chmod, "chmod" }, /* 15 */
++ { 3, TF, sys_chown, "chown" }, /* 16 */
++ { 3, TF, sys_chown, "lchown" }, /* 17 */
++ { 3, 0, sys_lseek, "lseek" }, /* 18 */
++ { 5, 0, sys_llseek, "_llseek" }, /* 19 */
++ { 0, 0, sys_getpid, "getpid" }, /* 20 */
++ { 5, TF, sys_mount, "mount" }, /* 21 */
++ { 2, TF, sys_umount, "umount" }, /* 22 */
++ { 1, 0, sys_setuid, "setuid" }, /* 23 */
++ { 0, 0, sys_getuid, "getuid" }, /* 24 */
++ { 1, 0, sys_stime, "stime" }, /* 25 */
++ { 4, 0, sys_ptrace, "ptrace" }, /* 26 */
++ { 1, 0, sys_alarm, "alarm" }, /* 27 */
++ { 0, TS, sys_pause, "pause" }, /* 28 */
++ { 2, TF, sys_utime, "utime" }, /* 29 */
++ { 2, TF, sys_stat, "stat" }, /* 30 */
++ { 2, 0, sys_fstat, "fstat" }, /* 31 */
++ { 2, TF, sys_lstat, "lstat" }, /* 32 */
++ { 2, TF, sys_access, "access" }, /* 33 */
++ { 1, TF, sys_chroot, "chroot" }, /* 34 */
++ { 0, 0, sys_sync, "sync" }, /* 35 */
++ { 1, 0, sys_fsync, "fsync" }, /* 36 */
++ { 2, TS, sys_kill, "kill" }, /* 37 */
++ { 2, TF, sys_rename, "rename" }, /* 38 */
++ { 2, TF, sys_mkdir, "mkdir" }, /* 39 */
++ { 1, TF, sys_rmdir, "rmdir" }, /* 40 */
++ { 1, 0, sys_dup, "dup" }, /* 41 */
++ { 1, 0, sys_pipe, "pipe" }, /* 42 */
++ { 1, 0, sys_times, "times" }, /* 43 */
++ { 5, TP, sys_clone, "clone" }, /* 44 */
++ { 1, 0, sys_brk, "brk" }, /* 45 */
++ { 1, 0, sys_setgid, "setgid" }, /* 46 */
++ { 0, 0, sys_getgid, "getgid" }, /* 47 */
++ { 2, TF, sys_getcwd, "getcwd" }, /* 48 */
++ { 0, 0, sys_geteuid, "geteuid" }, /* 49 */
++ { 0, 0, sys_getegid, "getegid" }, /* 50 */
++ { 1, TF, sys_acct, "acct" }, /* 51 */
++ { 1, 0, sys_setfsuid, "setfsuid" }, /* 52 */
++ { 1, 0, sys_setfsgid, "setfsgid" }, /* 53 */
++ { 3, 0, sys_ioctl, "ioctl" }, /* 54 */
++ { 3, 0, sys_fcntl, "fcntl" }, /* 55 */
++ { 2, 0, sys_setpgid, "setpgid" }, /* 56 */
++ { 4, 0, sys_mremap, "mremap" }, /* 57 */
++ { 3, 0, sys_setresuid, "setresuid" }, /* 58 */
++ { 3, 0, sys_getresuid, "getresuid" }, /* 59 */
++ { 2, 0, sys_setreuid, "setreuid" }, /* 60 */
++ { 2, 0, sys_setregid, "setregid" }, /* 61 */
++ { 2, 0, sys_ustat, "ustat" }, /* 62 */
++ { 2, 0, sys_dup2, "dup2" }, /* 63 */
++ { 0, 0, sys_getppid, "getppid" }, /* 64 */
++ { 0, 0, sys_getpgrp, "getpgrp" }, /* 65 */
++ { 0, 0, sys_setsid, "setsid" }, /* 66 */
++ { 4, TS, sys_rt_sigaction, "rt_sigaction" }, /* 67 */
++ { 1, TS, printargs, "rt_sigreturn" }, /* 68 */
++ { 4, TS, sys_rt_sigprocmask, "rt_sigprocmask"}, /* 69 */
++ { 2, TS, sys_rt_sigpending, "rt_sigpending" }, /* 70 */
++ { 4, TS, sys_rt_sigtimedwait, "rt_sigtimedwait"}, /* 71 */
++ { 3, TS, sys_rt_sigqueueinfo, "rt_sigqueueinfo"}, /* 72 */
++ { 2, TS, sys_rt_sigsuspend, "rt_sigsuspend" }, /* 73 */
++ { 2, 0, sys_sethostname, "sethostname" }, /* 74 */
++ { 2, 0, sys_setrlimit, "setrlimit" }, /* 75 */
++ { 2, 0, sys_getrlimit, "old_getrlimit" }, /* 76 */
++ { 2, 0, sys_getrusage, "getrusage" }, /* 77 */
++ { 2, 0, sys_gettimeofday, "gettimeofday" }, /* 78 */
++ { 2, 0, sys_settimeofday, "settimeofday" }, /* 79 */
++ { 2, 0, sys_getgroups, "getgroups" }, /* 80 */
++ { 2, 0, sys_setgroups, "setgroups" }, /* 81 */
++ { 5, 0, sys_select, "select" }, /* 82 */
++ { 2, TF, sys_symlink, "symlink" }, /* 83 */
++ { 1, 0, sys_fchdir, "fchdir" }, /* 84 */
++ { 3, TF, sys_readlink, "readlink" }, /* 85 */
++ { 5, TF, sys_pread, "pread" }, /* 86 */
++ { 5, TF, sys_pwrite, "pwrite" }, /* 87 */
++ { 1, TF, sys_swapon, "swapon" }, /* 88 */
++ { 3, 0, sys_reboot, "reboot" }, /* 89 */
++ { 6, 0, sys_mmap, "mmap" }, /* 90 */
++ { 2, 0, sys_munmap, "munmap" }, /* 91 */
++ { 2, TF, sys_truncate, "truncate" }, /* 92 */
++ { 2, 0, sys_ftruncate, "ftruncate" }, /* 93 */
++ { 2, 0, sys_fchmod, "fchmod" }, /* 94 */
++ { 3, 0, sys_fchown, "fchown" }, /* 95 */
++ { 2, 0, sys_getpriority, "getpriority" }, /* 96 */
++ { 3, 0, sys_setpriority, "setpriority" }, /* 97 */
++ { 4, TP, sys_wait4, "wait4" }, /* 98 */
++ { 2, TF, sys_statfs, "statfs" }, /* 99 */
++ { 2, 0, sys_fstatfs, "fstatfs" }, /* 100 */
++ { 0, 0, sys_vhangup, "vhangup" }, /* 101 */
++ { 2, TS, sys_sigaltstack, "sigaltstack" }, /* 102 */
++ { 3, 0, sys_syslog, "syslog" }, /* 103 */
++ { 3, 0, sys_setitimer, "setitimer" }, /* 104 */
++ { 2, 0, sys_getitimer, "getitimer" }, /* 105 */
++ { 1, 0, sys_swapoff, "swapoff" }, /* 106 */
++ { 1, 0, sys_sysinfo, "sysinfo" }, /* 107 */
++ { 6, 0, sys_ipc, "ipc" }, /* 108 */
++ { 4, TF, sys_sendfile, "sendfile" }, /* 109 */
++ { 2, 0, sys_setdomainname, "setdomainname" }, /* 110 */
++ { 1, 0, sys_uname, "uname" }, /* 111 */
++ { 1, 0, sys_adjtimex, "adjtimex" }, /* 112 */
++ { 3, 0, sys_mprotect, "mprotect" }, /* 113 */
++ { 0, TP, sys_vfork, "vfork" }, /* 114 */
++ { 2, 0, sys_init_module, "init_module" }, /* 115 */
++ { 1, 0, sys_delete_module, "delete_module" }, /* 116 */
++ { 4, 0, sys_quotactl, "quotactl" }, /* 117 */
++ { 1, 0, sys_getpgid, "getpgid" }, /* 118 */
++ { 0, 0, sys_bdflush, "bdflush" }, /* 119 */
++ { 3, 0, sys_sysfs, "sysfs" }, /* 120 */
++ { 1, 0, sys_personality, "personality" }, /* 121 */
++ { 5, 0, sys_afs_syscall, "afs_syscall" }, /* 122 */
++ { 3, 0, sys_getdents, "getdents" }, /* 123 */
++ { 2, 0, sys_flock, "flock" }, /* 124 */
++ { 3, 0, sys_msync, "msync" }, /* 125 */
++ { 3, 0, sys_readv, "readv" }, /* 126 */
++ { 3, 0, sys_writev, "writev" }, /* 127 */
++ { 1, 0, sys_getsid, "getsid" }, /* 128 */
++ { 1, 0, sys_fdatasync, "fdatasync" }, /* 129 */
++ { 1, 0, sys_sysctl, "_sysctl" }, /* 130 */
++ { 2, 0, sys_mlock, "mlock" }, /* 131 */
++ { 2, 0, sys_munlock, "munlock" }, /* 132 */
++ { 2, 0, sys_mlockall, "mlockall" }, /* 133 */
++ { 0, 0, sys_munlockall, "munlockall" }, /* 134 */
++ { 0, 0, sys_sched_setparam, "sched_setparam"}, /* 135 */
++ { 2, 0, sys_sched_getparam, "sched_getparam"}, /* 136 */
++ { 3, 0, sys_sched_setscheduler, "sched_setscheduler"}, /* 137 */
++ { 1, 0, sys_sched_getscheduler, "sched_getscheduler"}, /* 138 */
++ { 0, 0, sys_sched_yield, "sched_yield"}, /* 139 */
++ { 1, 0, sys_sched_get_priority_max,"sched_get_priority_max"}, /* 140 */
++ { 1, 0, sys_sched_get_priority_min,"sched_get_priority_min"}, /* 141 */
++ { 2, 0, sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 142 */
++ { 2, 0, sys_nanosleep, "nanosleep" }, /* 143 */
++ { 3, 0, sys_poll, "poll" }, /* 144 */
++ { 3, 0, printargs, "nfsservctl" }, /* 145 */
++ { 3, 0, sys_setresgid, "setresgid" }, /* 146 */
++ { 3, 0, sys_getresgid, "getresgid" }, /* 147 */
++ { 5, 0, sys_prctl, "prctl" }, /* 148 */
++ { 3, TN, sys_socket, "socket" }, /* 149 */
++ { 3, TN, sys_bind, "bind" }, /* 150 */
++ { 3, TN, sys_connect, "connect" }, /* 151 */
++ { 2, TN, sys_listen, "listen" }, /* 152 */
++ { 3, TN, sys_accept, "accept" }, /* 153 */
++ { 3, TN, sys_getsockname, "getsockname" }, /* 154 */
++ { 3, TN, sys_getpeername, "getpeername" }, /* 155 */
++ { 4, TN, sys_socketpair, "socketpair" }, /* 156 */
++ { 4, TN, sys_send, "send" }, /* 157 */
++ { 4, TN, sys_recv, "recv" }, /* 158 */
++ { 6, TN, sys_sendto, "sendto" }, /* 159 */
++ { 6, TN, sys_recvfrom, "recvfrom" }, /* 160 */
++ { 2, TN, sys_shutdown, "shutdown" }, /* 161 */
++ { 5, TN, sys_setsockopt, "setsockopt" }, /* 162 */
++ { 5, TN, sys_getsockopt, "getsockopt" }, /* 163 */
++ { 3, TN, sys_sendmsg, "sendmsg" }, /* 164 */
++ { 3, TN, sys_recvmsg, "recvmsg" }, /* 165 */
++ { 3, TF, sys_truncate64, "truncate64" }, /* 166 */
++ { 3, TF, sys_ftruncate64, "ftruncate64" }, /* 167 */
++ { 2, TF, sys_stat64, "stat64" }, /* 168 */
++ { 2, TF, sys_lstat64, "lstat64" }, /* 169 */
++ { 2, TF, sys_fstat64, "fstat64" }, /* 170 */
++ { 2, TF, sys_pivotroot, "pivot_root" }, /* 171 */
++ { 3, 0, printargs, "mincore" }, /* 172 */
++ { 3, 0, sys_madvise, "madvise" }, /* 173 */
++ { 4, 0, sys_getdents64, "getdents64" }, /* 174 */
++ { 3, 0, sys_fcntl, "fcntl64" }, /* 175 */
++ { 0, 0, printargs, "gettid" }, /* 176 */
++ { 4, 0, sys_readahead, "readahead" }, /* 177 */
++ { 5, TF, sys_setxattr, "setxattr" }, /* 178 */
++ { 5, TF, sys_setxattr, "lsetxattr" }, /* 179 */
++ { 5, 0, sys_fsetxattr, "fsetxattr" }, /* 180 */
++ { 4, TF, sys_getxattr, "getxattr" }, /* 181 */
++ { 4, TF, sys_getxattr, "lgetxattr" }, /* 182 */
++ { 4, 0, sys_fgetxattr, "fgetxattr" }, /* 183 */
++ { 3, TF, sys_listxattr, "listxattr" }, /* 184 */
++ { 3, TF, sys_listxattr, "llistxattr" }, /* 185 */
++ { 3, 0, sys_flistxattr, "flistxattr" }, /* 186 */
++ { 2, TF, sys_removexattr, "removexattr" }, /* 187 */
++ { 2, TF, sys_removexattr, "lremovexattr" }, /* 188 */
++ { 2, 0, sys_fremovexattr, "fremovexattr" }, /* 189 */
++ { 2, TS, sys_kill, "tkill" }, /* 190 */
++ { 4, TF, sys_sendfile64, "sendfile64" }, /* 191 */
++ { 5, 0, sys_futex, "futex" }, /* 192 */
++ { 3, 0, sys_sched_setaffinity, "sched_setaffinity" },/* 193 */
++ { 3, 0, sys_sched_getaffinity, "sched_getaffinity" },/* 194 */
++ { 2, 0, sys_capget, "capget" }, /* 195 */
++ { 2, 0, sys_capset, "capset" }, /* 196 */
++ { 2, 0, sys_io_setup, "io_setup" }, /* 197 */
++ { 1, 0, sys_io_destroy, "io_destroy" }, /* 198 */
++ { 5, 0, sys_io_getevents, "io_getevents" }, /* 199 */
++ { 3, 0, sys_io_submit, "io_submit" }, /* 200 */
++ { 3, 0, sys_io_cancel, "io_cancel" }, /* 201 */
++ { 6, 0, sys_fadvise64, "fadvise64" }, /* 202 */
++ { 1, TP, sys_exit, "exit_group" }, /* 203 */
++ { 4, 0, printargs, "lookup_dcookie"}, /* 204 */
++ { 1, 0, sys_epoll_create, "epoll_create" }, /* 205 */
++ { 4, 0, sys_epoll_ctl, "epoll_ctl" }, /* 206 */
++ { 4, 0, sys_epoll_wait, "epoll_wait" }, /* 207 */
++ { 5, 0, sys_remap_file_pages, "remap_file_pages"}, /* 208 */
++ { 1, 0, printargs, "set_tid_address"}, /* 209 */
++ { 3, 0, sys_timer_create, "timer_create" }, /* 210 */
++ { 4, 0, sys_timer_settime, "timer_settime" }, /* 211 */
++ { 2, 0, sys_timer_gettime, "timer_gettime" }, /* 212 */
++ { 1, 0, sys_timer_getoverrun, "timer_getoverrun"}, /* 213 */
++ { 1, 0, sys_timer_delete, "timer_delete" }, /* 214 */
++ { 2, 0, sys_clock_settime, "clock_settime" }, /* 215 */
++ { 2, 0, sys_clock_gettime, "clock_gettime" }, /* 216 */
++ { 2, 0, sys_clock_getres, "clock_getres" }, /* 217 */
++ { 4, 0, sys_clock_nanosleep, "clock_nanosleep"}, /* 218 */
++ { 3, TF, sys_statfs64, "statfs64" }, /* 219 */
++ { 3, 0, sys_fstatfs64, "fstatfs64" }, /* 220 */
++ { 3, TS, sys_tgkill, "tgkill" }, /* 221 */
++ { 5, 0, printargs, "SYS_222" }, /* 222 */
++ { 2, TF, sys_utimes, "utimes" }, /* 223 */
++ { 6, 0, sys_fadvise64_64, "fadvise64_64" }, /* 224 */
++ { 3, 0, printargs, "cacheflush" }, /* 225 */
++ { 0, 0, printargs, "vserver" }, /* 226 */
++ { 4, 0, sys_mq_open, "mq_open" }, /* 227 */
++ { 1, 0, sys_mq_unlink, "mq_unlink" }, /* 228 */
++ { 5, 0, sys_mq_timedsend, "mq_timedsend" }, /* 229 */
++ { 5, 0, sys_mq_timedreceive, "mq_timedreceive" }, /* 230 */
++ { 2, 0, sys_mq_notify, "mq_notify" }, /* 231 */
++ { 3, 0, sys_mq_getsetattr, "mq_getsetattr" }, /* 232 */
++ { 4, 0, printargs, "kexec_load" }, /* 233 */
++ { 1, 0, sys_waitid, "waitid" }, /* 234 */
++ { 5, 0, printargs, "add_key" }, /* 235 */
++ { 4, 0, printargs, "request_key" }, /* 236 */
++ { 5, 0, printargs, "keyctl" }, /* 237 */
++ { 3, 0, printargs, "ioprio_set" }, /* 238 */
++ { 2, 0, printargs, "ioprio_get" }, /* 239 */
++ { 1, 0, printargs, "inotify_init" }, /* 240 */
++ { 3, 0, sys_inotify_add_watch, "inotify_add_watch" }, /* 241 */
++ { 2, 0, sys_inotify_rm_watch, "inotify_rm_watch" }, /* 242 */
++ { 4, 0, sys_openat, "openat" }, /* 243 */
++ { 3, 0, sys_mkdirat, "mkdirat" }, /* 244 */
++ { 4, 0, sys_mknodat, "mknodat" }, /* 245 */
++ { 5, 0, sys_fchownat, "fchownat" }, /* 246 */
++ { 3, 0, sys_futimesat, "futimesat" }, /* 247 */
++ { 4, 0, printargs, "fstatat64" }, /* 248 */
++ { 3, 0, sys_unlinkat, "unlinkat" }, /* 249 */
++ { 4, 0, sys_renameat, "renameat" }, /* 250 */
++ { 5, 0, sys_linkat, "linkat" }, /* 251 */
++ { 3, 0, sys_symlinkat, "symlinkat" }, /* 252 */
++ { 4, 0, sys_readlinkat, "readlinkat" }, /* 253 */
++ { 3, 0, sys_fchmodat, "fchmodat" }, /* 254 */
++ { 3, 0, sys_faccessat, "faccessat" }, /* 255 */
++ { 6, 0, sys_pselect6, "pselect6" }, /* 256 */
++ { 5, 0, sys_ppoll, "ppoll" }, /* 257 */
++ { 1, 0, sys_unshare, "unshare" }, /* 258 */
++ { 2, 0, printargs, "set_robust_list" }, /* 259 */
++ { 3, 0, printargs, "get_robust_list" }, /* 260 */
++ { 6, 0, printargs, "splice" }, /* 261 */
++ { 4, 0, printargs, "sync_file_range" }, /* 262 */
++ { 4, 0, printargs, "tee" }, /* 263 */
++ { 4, 0, printargs, "vmsplice" }, /* 264 */
++ { 6, 0, printargs, "sys_epoll_pwait" }, /* 265 */
++ { 2, TI, sys_msgget, "msgget" }, /* 266 */
++ { 4, TI, sys_msgsnd, "msgsnd" }, /* 267 */
++ { 5, TI, sys_msgrcv, "msgrcv" }, /* 268 */
++ { 3, TI, sys_msgctl, "msgctl" }, /* 269 */
++ { 3, TI, sys_semget, "semget" }, /* 270 */
++ { 3, TI, sys_semop, "semop" }, /* 271 */
++ { 4, TI, sys_semctl, "semctl" }, /* 272 */
++ { 4, TI, sys_semtimedop, "semtimedop" }, /* 273 */
++ { 3, TI, sys_shmat, "shmat" }, /* 274 */
++ { 3, TI, sys_shmget, "shmget" }, /* 275 */
++ { 1, TI, sys_shmdt, "shmdt" }, /* 276 */
++ { 3, TI, sys_shmctl, "shmctl" }, /* 277 */
+diff --git a/process.c b/process.c
+index 96e3676..dd11a0a 100644
+--- a/process.c
++++ b/process.c
+@@ -714,6 +714,10 @@ int new;
+ return -1;
+
+ return 0;
++#elif defined(AVR32)
++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_R8), new) < 0)
++ return -1;
++ return 0;
+ #else
+ #warning Do not know how to handle change_syscall for this architecture
+ #endif /* architecture */
+@@ -794,6 +798,28 @@ setarg(tcp, argnum)
+ if (errno)
+ return -1;
+ }
++#elif defined(AVR32)
++ {
++ errno = 0;
++ if (argnum == 0)
++ ptrace(PTRACE_POKEUSER, tcp->pid,
++ (char *)(REG_R12_ORIG),
++ tcp->u_arg[argnum]);
++ else if (argnum < 4)
++ /* r11 .. r9 */
++ ptrace(PTRACE_POKEUSER, tcp->pid,
++ (char *)(REG_R12 - 4 * argnum),
++ tcp->u_arg[argnum]);
++ else if (argnum < 6)
++ /* r6 .. r5 */
++ ptrace(PTRACE_POKEUSER, tcp->pid,
++ (char *)(REG_R10 - 4 * argnum),
++ tcp->u_arg[argnum]);
++ else
++ return -E2BIG;
++ if (errno)
++ return -1;
++ }
+ #else
+ # warning Sorry, setargs not implemented for this architecture.
+ #endif
+@@ -2882,8 +2908,27 @@ const struct xlat struct_user_offsets[] = {
+ { uoff(regs.ARM_pc), "pc" },
+ { uoff(regs.ARM_cpsr), "cpsr" },
+ #endif
+-
+-#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64)
++#ifdef AVR32
++ { uoff(regs.sr), "sr" },
++ { uoff(regs.pc), "pc" },
++ { uoff(regs.lr), "lr" },
++ { uoff(regs.sp), "sp" },
++ { uoff(regs.r12), "r12" },
++ { uoff(regs.r11), "r11" },
++ { uoff(regs.r10), "r10" },
++ { uoff(regs.r9), "r9" },
++ { uoff(regs.r8), "r8" },
++ { uoff(regs.r7), "r7" },
++ { uoff(regs.r6), "r6" },
++ { uoff(regs.r5), "r5" },
++ { uoff(regs.r4), "r4" },
++ { uoff(regs.r3), "r3" },
++ { uoff(regs.r2), "r2" },
++ { uoff(regs.r1), "r1" },
++ { uoff(regs.r0), "r0" },
++ { uoff(regs.r12_orig), "orig_r12" },
++#endif
++#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32)
+ { uoff(u_fpvalid), "offsetof(struct user, u_fpvalid)" },
+ #endif
+ #if defined(I386) || defined(X86_64)
+@@ -2899,20 +2944,20 @@ const struct xlat struct_user_offsets[] = {
+ #if !defined(SPARC64)
+ { uoff(start_code), "offsetof(struct user, start_code)" },
+ #endif
+-#ifdef SH64
++#if defined(SH64) || defined(AVR32)
+ { uoff(start_data), "offsetof(struct user, start_data)" },
+ #endif
+ #if !defined(SPARC64)
+ { uoff(start_stack), "offsetof(struct user, start_stack)" },
+ #endif
+ { uoff(signal), "offsetof(struct user, signal)" },
+-#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64)
++#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) && !defined(AVR32)
+ { uoff(reserved), "offsetof(struct user, reserved)" },
+ #endif
+ #if !defined(SPARC64)
+ { uoff(u_ar0), "offsetof(struct user, u_ar0)" },
+ #endif
+-#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64)
++#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(AVR32)
+ { uoff(u_fpstate), "offsetof(struct user, u_fpstate)" },
+ #endif
+ { uoff(magic), "offsetof(struct user, magic)" },
+diff --git a/syscall.c b/syscall.c
+index ade4f0d..9c26ecb 100644
+--- a/syscall.c
++++ b/syscall.c
+@@ -809,6 +809,8 @@ internal_syscall(struct tcb *tcp)
+ static long r9;
+ #elif defined(X86_64)
+ static long rax;
++#elif defined(AVR32)
++ static struct pt_regs regs;
+ #endif
+ #endif /* LINUX */
+ #ifdef FREEBSD
+@@ -1264,7 +1266,26 @@ struct tcb *tcp;
+ return 0;
+ }
+ }
+-#endif /* SH64 */
++#elif defined(AVR32)
++ /*
++ * Read complete register set in one go.
++ */
++ if (ptrace(PTRACE_GETREGS, pid, NULL, &regs) < 0)
++ return -1;
++
++ /*
++ * We only need to grab the syscall number on syscall entry.
++ */
++ if (!(tcp->flags & TCB_INSYSCALL)) {
++ scno = regs.r8;
++
++ /* Check if we return from execve. */
++ if (tcp->flags & TCB_WAITEXECVE) {
++ tcp->flags &= ~TCB_WAITEXECVE;
++ return 0;
++ }
++ }
++#endif /* AVR32 */
+ #endif /* LINUX */
+ #ifdef SUNOS4
+ if (upeek(pid, uoff(u_arg[7]), &scno) < 0)
+@@ -1623,6 +1644,17 @@ struct tcb *tcp;
+ tcp->u_rval = r9;
+ u_error = 0;
+ }
++#else
++#ifdef AVR32
++ if (regs.r12 && (unsigned) -regs.r12 < nerrnos) {
++ tcp->u_rval = -1;
++ u_error = -regs.r12;
++ }
++ else {
++ tcp->u_rval = regs.r12;
++ u_error = 0;
++ }
++#endif /* AVR32 */
+ #endif /* SH64 */
+ #endif /* SH */
+ #endif /* HPPA */
+@@ -1848,6 +1880,12 @@ force_result(tcp, error, rval)
+ r9 = error ? -error : rval;
+ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_GENERAL(9), r9) < 0)
+ return -1;
++#else
++#ifdef AVR32
++ regs.r12 = error ? -error : rval;
++ if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_R12, regs.r12) < 0)
++ return -1;
++#endif /* AVR32 */
+ #endif /* SH64 */
+ #endif /* SH */
+ #endif /* HPPA */
+@@ -2120,6 +2158,14 @@ struct tcb *tcp;
+ return -1;
+ }
+ }
++#elif defined(AVR32)
++ tcp->u_nargs = sysent[tcp->scno].nargs;
++ tcp->u_arg[0] = regs.r12;
++ tcp->u_arg[1] = regs.r11;
++ tcp->u_arg[2] = regs.r10;
++ tcp->u_arg[3] = regs.r9;
++ tcp->u_arg[4] = regs.r5;
++ tcp->u_arg[5] = regs.r3;
+ #else /* Other architecture (like i386) (32bits specific) */
+ {
+ int i;
+@@ -2382,7 +2428,7 @@ trace_syscall(struct tcb *tcp)
+
+ switch (known_scno(tcp)) {
+ #ifdef LINUX
+-#if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA)
++#if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA) && !defined(AVR32)
+ case SYS_socketcall:
+ decode_subcall(tcp, SYS_socket_subcall,
+ SYS_socket_nsubcalls, deref_style);
+@@ -2391,7 +2437,7 @@ trace_syscall(struct tcb *tcp)
+ decode_subcall(tcp, SYS_ipc_subcall,
+ SYS_ipc_nsubcalls, shift_style);
+ break;
+-#endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA */
++#endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA && !AVR32 */
+ #if defined (SPARC) || defined (SPARC64)
+ case SYS_socketcall:
+ sparc_socket_decode (tcp);
+diff --git a/util.c b/util.c
+index 6359110..5cb1f50 100644
+--- a/util.c
++++ b/util.c
+@@ -1069,6 +1069,9 @@ struct tcb *tcp;
+ #elif defined(SH64)
+ if (upeek(tcp->pid, REG_PC ,&pc) < 0)
+ return -1;
++#elif defined(AVR32)
++ if (upeek(tcp->pid, REG_PC, &pc) < 0)
++ return -1;
+ #endif
+ return pc;
+ #endif /* LINUX */
+@@ -1217,6 +1220,14 @@ struct tcb *tcp;
+ return;
+ }
+ tprintf("[%08lx] ", pc);
++#elif defined(AVR32)
++ long pc;
++
++ if (upeek(tcp->pid, REG_PC, &pc) < 0) {
++ tprintf("[????????] ");
++ return;
++ }
++ tprintf("[%08lx] ", pc);
+ #endif /* !architecture */
+ #endif /* LINUX */
+
+@@ -1398,6 +1409,9 @@ typedef struct regs arg_setup_state;
+ # define arg0_offset (REG_OFFSET+16)
+ # define arg1_offset (REG_OFFSET+24)
+ # define restore_arg0(tcp, state, val) 0
++# elif defined (AVR32)
++# define arg0_offset (REG_R12)
++# define arg1_offset (REG_R11)
+ # else
+ # define arg0_offset 0
+ # define arg1_offset 4
diff --git a/packages/strace/strace_4.5.14.bb b/packages/strace/strace_4.5.14.bb
index 50baef86dc..f2838271ba 100644
--- a/packages/strace/strace_4.5.14.bb
+++ b/packages/strace/strace_4.5.14.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "strace is a system call tracing tool."
SECTION = "console/utils"
LICENSE = "GPL"
-PR = "r4"
+PR = "r5"
SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
file://glibc-2.5.patch;patch=1 \
@@ -10,7 +10,13 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
file://sh-arch-update.patch;patch=1 \
file://sh-syscall-update.patch;patch=1 \
file://strace-fix-arm-bad-syscall.patch;patch=1 \
- file://strace-undef-syscall.patch;patch=1 "
+ file://strace-undef-syscall.patch;patch=1 \
+ "
+
+SRC_URI_avr32 = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
+ file://strace-4.5.14-avr32.patch;patch=1 \
+ file://strace-4.5.14-add-syscalls-up-to-sysvipc.patch;patch=1 \
+ "
inherit autotools
diff --git a/packages/strace/strace_4.5.15.bb b/packages/strace/strace_4.5.15.bb
new file mode 100644
index 0000000000..e73fb0f732
--- /dev/null
+++ b/packages/strace/strace_4.5.15.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "strace is a system call tracing tool."
+SECTION = "console/utils"
+LICENSE = "GPL"
+
+# this recipe is missing patches for arm and sh
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_avr32 = "1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
+ "
+
+SRC_URI_avr32 = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.bz2 \
+ file://strace-4.5.15.atmel.1.patch;patch=1 \
+ "
+
+inherit autotools
+
+export INCLUDES = "-I. -I./linux"
diff --git a/packages/subversion/subversion_1.4.5.bb b/packages/subversion/subversion_1.4.5.bb
index 5c15d67daf..d4f290590f 100644
--- a/packages/subversion/subversion_1.4.5.bb
+++ b/packages/subversion/subversion_1.4.5.bb
@@ -21,12 +21,7 @@ inherit autotools
export LDFLAGS += " -L${STAGING_LIBDIR} "
-do_configure() {
- gnu-configize
- libtoolize --force
- aclocal -I build/ -I build/ac-macros/ && autoconf
- oe_runconf
-}
+acpaths = "-I build/ -I build/ac-macros/"
do_stage() {
autotools_stage_all
diff --git a/packages/syslog-ng/syslog-ng_2.0.5.bb b/packages/syslog-ng/syslog-ng_2.0.5.bb
index 2db95969df..217af346de 100644
--- a/packages/syslog-ng/syslog-ng_2.0.5.bb
+++ b/packages/syslog-ng/syslog-ng_2.0.5.bb
@@ -10,7 +10,7 @@ S = "${WORKDIR}/${PN}-${PV}"
inherit autotools update-rc.d
-EXTRA_OECONF = "--with-libol=${STAGING_BINDIR_CROSS}/"
+EXTRA_OECONF = "--with-libol=${STAGING_BINDIR_CROSS}/ --enable-dynamic-linking"
do_install_append() {
install -d ${D}/${sysconfdir}/${PN}
diff --git a/packages/sysvinit/sysvinit_2.86.bb b/packages/sysvinit/sysvinit_2.86.bb
index f87c3f917a..a6765c4508 100644
--- a/packages/sysvinit/sysvinit_2.86.bb
+++ b/packages/sysvinit/sysvinit_2.86.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "System-V like init."
SECTION = "base"
LICENSE = "GPL"
HOMEPAGE = "http://freshmeat.net/projects/sysvinit/"
-PR = "r36"
+PR = "r40"
# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
# Set PACKAGE_ARCH appropriately.
@@ -104,27 +104,31 @@ EOF
}
pkg_postinst_${PN} () {
- update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 200
- update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 200
- update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 200
- update-alternatives --install ${bindir}/last last last.${PN} 200
- update-alternatives --install ${bindir}/mesg mesg mesg.${PN} 200
- update-alternatives --install ${bindir}/wall wall wall.${PN} 200
+#!/bin/sh
+update-alternatives --install ${base_sbindir}/halt halt halt.${PN} 200
+update-alternatives --install ${base_sbindir}/reboot reboot reboot.${PN} 200
+update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${PN} 200
+update-alternatives --install ${bindir}/last last last.${PN} 200
+update-alternatives --install ${bindir}/mesg mesg mesg.${PN} 200
+update-alternatives --install ${bindir}/wall wall wall.${PN} 200
}
pkg_prerm_${PN} () {
- update-alternatives --remove halt halt.${PN}
- update-alternatives --remove reboot reboot.${PN}
- update-alternatives --remove shutdown shutdown.${PN}
- update-alternatives --remove last last.${PN}
- update-alternatives --remove mesg mesg.${PN}
- update-alternatives --remove wall wall.${PN}
+#!/bin/sh
+update-alternatives --remove halt halt.${PN}
+update-alternatives --remove reboot reboot.${PN}
+update-alternatives --remove shutdown shutdown.${PN}
+update-alternatives --remove last last.${PN}
+update-alternatives --remove mesg mesg.${PN}
+update-alternatives --remove wall wall.${PN}
}
pkg_postinst_sysvinit-pidof () {
- update-alternatives --install ${base_bindir}/pidof pidof pidof.${PN} 200
+#!/bin/sh
+update-alternatives --install ${base_bindir}/pidof pidof pidof.${PN} 200
}
pkg_prerm_sysvinit-pidof () {
- update-alternatives --remove pidof pidof.${PN}
+#!/bin/sh
+update-alternatives --remove pidof pidof.${PN}
}
diff --git a/packages/tasks/task-base.bb b/packages/tasks/task-base.bb
index 15835508aa..a55d5dd504 100644
--- a/packages/tasks/task-base.bb
+++ b/packages/tasks/task-base.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Merge machine and distro options to create a basic machine task/package"
-PR = "r63"
+PR = "r66"
inherit task
@@ -206,7 +206,6 @@ RDEPENDS_task-base-alsa = "\
#
RRECOMMENDS_task-base-alsa = "\
alsa-state \
- alsa-states \
kernel-module-snd-mixer-oss \
kernel-module-snd-pcm-oss"
diff --git a/packages/tasks/task-gpe.bb b/packages/tasks/task-gpe.bb
index bbb3857b3b..bc5105f6a8 100644
--- a/packages/tasks/task-gpe.bb
+++ b/packages/tasks/task-gpe.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Task packages for GPE Palmtop Environment"
-PR = "r5"
+PR = "r6"
LICENSE = "MIT"
inherit task
@@ -126,7 +126,7 @@ RDEPENDS_gpe-task-desktopapps = "\
RDEPENDS_gpe-task-sectest = "\
mbmerlin \
nmap \
- ettercap \
+ ettercap-ng \
stunnel \
curl \
# dsniff \
diff --git a/packages/tasks/task-openmoko-ui.bb b/packages/tasks/task-openmoko-ui.bb
index 4f3399ac8f..33eab591ed 100644
--- a/packages/tasks/task-openmoko-ui.bb
+++ b/packages/tasks/task-openmoko-ui.bb
@@ -53,5 +53,6 @@ THEMES_rokre2 = "openmoko-icon-theme-standard2-qvga openmoko-theme-standard2-q
THEMES_rokre6 = "openmoko-icon-theme-standard2-qvga openmoko-theme-standard2-qvga"
THEMES_magician = "openmoko-icon-theme-standard2-qvga openmoko-theme-standard2-qvga"
THEMES_chumby = "openmoko-icon-theme-standard2-qvga openmoko-theme-standard2-qvga"
+THEMES_htcblueangel = "openmoko-icon-theme-standard2-qvga openmoko-theme-standard2-qvga"
RDEPENDS_task-openmoko-ui += "${THEMES}"
diff --git a/packages/tasks/task-python-everything.bb b/packages/tasks/task-python-everything.bb
index 18455f5b96..e4a185dde8 100644
--- a/packages/tasks/task-python-everything.bb
+++ b/packages/tasks/task-python-everything.bb
@@ -1,7 +1,7 @@
DESCRIPTION= "Everything Python"
HOMEPAGE = "http://www.vanille.de/projects/python.spy"
LICENSE = "MIT"
-PR = "ml26"
+PR = "ml27"
RDEPENDS = "\
python-ao \
@@ -10,14 +10,15 @@ RDEPENDS = "\
python-dbus \
python-dialog \
python-pydirectfb \
- python-efl \
- python-efl-examples \
+ task-python-efl \
+ task-python-efl-examples \
python-pycurl \
python-fam \
python-fnorb \
python-formencode \
python-fpconst \
python-fuse \
+ python-gammu \
python-gmpy \
python-gnosis \
python-gsmd \
@@ -32,6 +33,7 @@ RDEPENDS = "\
python-libgmail \
python-lightmediascanner \
python-lxml \
+ python-m2crypto \
python-mad \
python-numarray \
python-numeric \
@@ -90,8 +92,6 @@ RDEPENDS = "\
BROKEN_PACKAGES = "\
python-egenix-mx-base \
- python-gammu \
- python-m2crypto \
python-mysqldb \
python-pyqwt \
"
diff --git a/packages/tasks/task-slugos.bb b/packages/tasks/task-slugos.bb
index 01cdaa21b4..2d57cfee5a 100644
--- a/packages/tasks/task-slugos.bb
+++ b/packages/tasks/task-slugos.bb
@@ -6,7 +6,7 @@
DESCRIPTION = "Task packages for the SlugOS distribution"
HOMEPAGE = "http://www.nslu2-linux.org"
LICENSE = "MIT"
-PR = "r17"
+PR = "r18"
PACKAGE_ARCH = "${MACHINE_ARCH}"
ALLOW_EMPTY = "1"
@@ -122,6 +122,7 @@ RDEPENDS += "\
update-modules sysvinit tinylogin udev \
module-init-tools modutils-initscripts \
ipkg-collateral ipkg ipkg-link \
+ libgcc \
beep \
util-linux-mount \
util-linux-umount \
diff --git a/packages/thttpd/thttpd_2.25b.bb b/packages/thttpd/thttpd_2.25b.bb
index c8520f84af..d437d22427 100644
--- a/packages/thttpd/thttpd_2.25b.bb
+++ b/packages/thttpd/thttpd_2.25b.bb
@@ -16,6 +16,7 @@ INITSCRIPT_PARAMS = "defaults"
inherit autotools update-rc.d
EXTRA_OEMAKE += "'WEBDIR=${servicedir}/www'"
+FILES_${PN}-dbg_append = " ${servicedir}/www/cgi-bin/.debug"
FILES_${PN}_append = " ${servicedir}"
do_configure () {
diff --git a/packages/tzdata/tzdata_2007k.bb b/packages/tzdata/tzdata_2007k.bb
index 2fbe9ac884..c4a2adee19 100644
--- a/packages/tzdata/tzdata_2007k.bb
+++ b/packages/tzdata/tzdata_2007k.bb
@@ -3,12 +3,8 @@ SECTION = "base"
PRIORITY = "optional"
DEPENDS = "tzcode-native"
-PR = "r1"
+PR = "r2"
-PROVIDES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
- tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
- tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
-RPROVIDES = "tzdata"
RCONFLICTS= "timezones timezone-africa timezone-america timezone-antarctica \
timezone-arctic timezone-asia timezone-atlantic \
timezone-australia timezone-europe timezone-indian \
@@ -46,6 +42,8 @@ PACKAGES = "${PN}-dbg tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa
tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
+ALLOW_EMPTY_${PN}-dbg = "1"
+
FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
RPROVIDES_tzdata-africa = "tzdata-africa"
diff --git a/packages/u-boot/u-boot-openmoko_1.3.1+git+svn.bb b/packages/u-boot/u-boot-openmoko_1.3.1+git+svn.bb
index 1fb9be4f43..d8a51ea824 100644
--- a/packages/u-boot/u-boot-openmoko_1.3.1+git+svn.bb
+++ b/packages/u-boot/u-boot-openmoko_1.3.1+git+svn.bb
@@ -4,7 +4,7 @@ LICENSE = "GPL"
SECTION = "bootloader"
PRIORITY = "optional"
-UBOOT_UPSTREAM_REV = "10bbb38a402a2faf18858c451bcdc63d45888e6e"
+UBOOT_UPSTREAM_REV = "b29661fc1151077776454288051bc9a488351ce8"
UBOOT_MACHINES = "gta01bv2 gta01bv3 gta01bv4 gta02v2 gta02v3 gta02v4 gta02v5"
SRCREV_FORMAT = "+gitupstream+svnpatchset"
diff --git a/packages/uclibc/uclibc-0.9.29/avr32/.mtn2git_empty b/packages/uclibc/uclibc-0.9.29/avr32/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/avr32/.mtn2git_empty
diff --git a/packages/uclibc/uclibc-0.9.29/avr32/uClibc.machine b/packages/uclibc/uclibc-0.9.29/avr32/uClibc.machine
new file mode 100644
index 0000000000..d8d2416b90
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/avr32/uClibc.machine
@@ -0,0 +1,50 @@
+#
+# Automatically generated make config: don't edit
+#
+# TARGET_alpha is not set
+# TARGET_arm is not set
+TARGET_avr32=y
+# TARGET_bfin is not set
+# TARGET_cris is not set
+# TARGET_e1 is not set
+# TARGET_frv is not set
+# TARGET_h8300 is not set
+# TARGET_i386 is not set
+# TARGET_i960 is not set
+# TARGET_m68k is not set
+# TARGET_microblaze is not set
+# TARGET_mips is not set
+# TARGET_nios is not set
+# TARGET_nios2 is not set
+# TARGET_powerpc is not set
+# TARGET_sh is not set
+# TARGET_sh64 is not set
+# TARGET_sparc is not set
+# TARGET_v850 is not set
+# TARGET_x86_64 is not set
+
+#
+# Target Architecture Features and Options
+#
+HAVE_ELF=y
+TARGET_ARCH="avr32"
+ARCH_SUPPORTS_BIG_ENDIAN=y
+UCLIBC_COMPLETELY_PIC=y
+CONFIG_AP7000=y
+LINKRELAX=y
+# ARCH_LITTLE_ENDIAN is not set
+ARCH_BIG_ENDIAN=y
+# ARCH_HAS_NO_MMU is not set
+ARCH_HAS_MMU=y
+UCLIBC_HAS_FLOATS=y
+UCLIBC_HAS_FPU=n
+UCLIBC_HAS_SOFT_FLOAT=y
+DO_C99_MATH=y
+C_SYMBOL_PREFIX=""
+KERNEL_HEADERS="Dummy value, correct value substituted by uclibc.inc"
+HAVE_DOT_CONFIG=y
+
+
+
+
+
diff --git a/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-avr32-bzero.patch b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-avr32-bzero.patch
new file mode 100644
index 0000000000..8d6aba15a1
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-avr32-bzero.patch
@@ -0,0 +1,11 @@
+--- uClibc-0.9.29-orig/libc/string/avr32/bzero.S 2008-03-10 15:02:14.000000000 -0500
++++ uClibc-0.9.29/libc/string/avr32/bzero.S 2008-03-10 15:05:39.000000000 -0500
+@@ -6,6 +6,8 @@
+ * archive for more details.
+ */
+
++#include <features.h>
++
+ #ifdef __UCLIBC_SUSV3_LEGACY__
+
+ .text
diff --git a/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-nonposix_bashisms.patch b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-nonposix_bashisms.patch
new file mode 100644
index 0000000000..b9294b5471
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-nonposix_bashisms.patch
@@ -0,0 +1,13 @@
+Index: uClibc-0.9.29/extra/config/lxdialog/check-lxdialog.sh
+===================================================================
+--- uClibc-0.9.29.orig/extra/config/lxdialog/check-lxdialog.sh 2008-03-09 21:58:29.000000000 +0100
++++ uClibc-0.9.29/extra/config/lxdialog/check-lxdialog.sh 2008-03-09 21:58:39.000000000 +0100
+@@ -57,7 +57,7 @@
+ printf "Usage: $0 [-check compiler options|-header|-library]\n"
+ }
+
+-if [ $# == 0 ]; then
++if [ $# -eq 0 ]; then
+ usage
+ exit 1
+ fi
diff --git a/packages/uclibc/uclibc-initial_0.9.29.bb b/packages/uclibc/uclibc-initial_0.9.29.bb
index aa42fa3d19..57ac613b66 100644
--- a/packages/uclibc/uclibc-initial_0.9.29.bb
+++ b/packages/uclibc/uclibc-initial_0.9.29.bb
@@ -13,6 +13,7 @@ do_stage() {
RUNTIME_PREFIX=${UCLIBC_STAGE_PREFIX}/ \
pregen install_dev
+ install -d ${CROSS_DIR}/${TARGET_SYS}
ln -sf include ${CROSS_DIR}/${TARGET_SYS}/sys-include
# This conflicts with the c++ version of this header
diff --git a/packages/uclibc/uclibc.inc b/packages/uclibc/uclibc.inc
index 5965c0b8bd..3c8a90c589 100644
--- a/packages/uclibc/uclibc.inc
+++ b/packages/uclibc/uclibc.inc
@@ -70,7 +70,7 @@ UCLIBC_STAGE_PREFIX = "${STAGING_DIR_HOST}${layout_prefix}"
# do_stage barfs on a CC with whitepspace, therefore put the 'HOST_CC_ARCH' in
# the CFLAGS (for when building the utils).
-OEMAKE_NO_CC = "'OPTIMIZATION=' 'CPU_CFLAGS=${CFLAGS}' 'STRIPTOOL=true' 'LD=${LD}' \
+OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}' \
'LOCALE_DATA_FILENAME=${UCLIBC_LOCALE_FILE}'"
EXTRA_OEMAKE = "${OEMAKE_NO_CC} 'CC=${CC}'"
EXTRA_OEMAKE_task_do_populate_staging = "${OEMAKE_NO_CC}"
diff --git a/packages/uclibc/uclibc_0.9.29.bb b/packages/uclibc/uclibc_0.9.29.bb
index 9051029cdf..08eac1b7f0 100644
--- a/packages/uclibc/uclibc_0.9.29.bb
+++ b/packages/uclibc/uclibc_0.9.29.bb
@@ -7,7 +7,7 @@
# on whether the base patches apply to the selected (SRCDATE) svn release.
#
UCLIBC_BASE ?= "0.9.29"
-PR = "r9"
+PR = "r11"
require uclibc.inc
@@ -23,7 +23,8 @@ SRC_URI += "file://uClibc.machine file://uClibc.distro \
file://uClibc-0.9.29-fix-gethostent_r-failure-retval.patch;patch=1 \
file://uClibc-0.9.29-fix-internal_function-definition.patch;patch=1 \
file://uClibc-0.9.29-rm-whitespace.patch;patch=1 \
- "
+ file://uClibc-0.9.29-nonposix_bashisms.patch;patch=1 \
+"
# mmap-unsigned-shift_bugid1303.patch
# http://uclibc.org/lists/uclibc-cvs/2007-May/011360.html;patch=1"
diff --git a/packages/update-alternatives/update-alternatives-cworth-native_0.99.154.bb b/packages/update-alternatives/update-alternatives-cworth-native_0.99.154.bb
index 36f023ec3a..40534b4bb4 100644
--- a/packages/update-alternatives/update-alternatives-cworth-native_0.99.154.bb
+++ b/packages/update-alternatives/update-alternatives-cworth-native_0.99.154.bb
@@ -5,7 +5,7 @@ PROVIDES += "virtual/update-alternatives-native"
do_stage () {
install -d ${sbindir} \
- ${libdir}/ipkg/alternatives
+ ${libdir}/opkg/alternatives
install -m 0755 update-alternatives ${sbindir}/update-alternatives
}
diff --git a/packages/update-alternatives/update-alternatives-cworth.inc b/packages/update-alternatives/update-alternatives-cworth.inc
index d2d78c9a00..f23bfe8bb4 100644
--- a/packages/update-alternatives/update-alternatives-cworth.inc
+++ b/packages/update-alternatives/update-alternatives-cworth.inc
@@ -3,3 +3,5 @@ SECTION = "base"
SRC_URI = "${HANDHELDS_CVS};module=familiar/dist/ipkg;tag=${@'V' + bb.data.getVar('PV',d,1).replace('.', '-')}"
S = "${WORKDIR}/ipkg/C"
PACKAGE_ARCH = "all"
+
+PR = "r1"
diff --git a/packages/update-alternatives/update-alternatives-cworth_0.99.154.bb b/packages/update-alternatives/update-alternatives-cworth_0.99.154.bb
index 18dab4e65f..6cab1e55ec 100644
--- a/packages/update-alternatives/update-alternatives-cworth_0.99.154.bb
+++ b/packages/update-alternatives/update-alternatives-cworth_0.99.154.bb
@@ -5,7 +5,7 @@ RPROVIDES_${PN} = "update-alternatives"
do_install () {
install -d ${D}${sbindir} \
${D}${sysconfdir}/alternatives \
- ${D}${libdir}/ipkg/alternatives
+ ${D}${libdir}/opkg/alternatives
install -m 0755 update-alternatives ${D}${sbindir}/update-alternatives
}
diff --git a/packages/update-alternatives/update-alternatives-dpkg-native_1.13.22.bb b/packages/update-alternatives/update-alternatives-dpkg-native_1.13.22.bb
index 6c193f9603..70b5cb7c09 100644
--- a/packages/update-alternatives/update-alternatives-dpkg-native_1.13.22.bb
+++ b/packages/update-alternatives/update-alternatives-dpkg-native_1.13.22.bb
@@ -2,7 +2,7 @@ require update-alternatives-dpkg.inc
inherit native
PROVIDES += "virtual/update-alternatives-native"
-DEPENDS += "perl-native dpkg-native"
+DEPENDS = "perl-native dpkg-native"
DEFAULT_PREFERENCE = "-1"
do_stage () {
diff --git a/packages/vpnc/files/makeman.patch b/packages/vpnc/files/makeman.patch
new file mode 100644
index 0000000000..13a40ed746
--- /dev/null
+++ b/packages/vpnc/files/makeman.patch
@@ -0,0 +1,11 @@
+--- vpnc-0.5.1/makeman.pl.old 2008-03-16 02:17:59.000000000 -0500
++++ vpnc-0.5.1/makeman.pl 2008-03-16 02:29:34.000000000 -0500
+@@ -29,7 +29,7 @@ my $vpnc = './vpnc';
+ # indenting lists (those originally starting with an asterisk). I hope
+ # this pays off when converting the manpage to HTML or such.
+
+-open my $LONGHELP, '-|', "$vpnc --long-help";
++open my $LONGHELP, '-|', "cat ../vpnc0.5.1--long-help";
+ my $vpnc_options = '';
+ my $relative_indent = 0;
+ my $indent_needed = 0;
diff --git a/packages/vpnc/files/vpnc0.5.1--long-help b/packages/vpnc/files/vpnc0.5.1--long-help
new file mode 100644
index 0000000000..4afa2b75d2
--- /dev/null
+++ b/packages/vpnc/files/vpnc0.5.1--long-help
@@ -0,0 +1,173 @@
+Usage: vpnc [--version] [--print-config] [--help] [--long-help] [options] [config files]
+
+Options:
+ --gateway <ip/hostname>
+ IP/name of your IPSec gateway
+ conf-variable: IPSec gateway <ip/hostname>
+
+ --id <ASCII string>
+ your group name
+ conf-variable: IPSec ID <ASCII string>
+
+ (configfile only option)
+ your group password (cleartext)
+ conf-variable: IPSec secret <ASCII string>
+
+ (configfile only option)
+ your group password (obfuscated)
+ conf-variable: IPSec obfuscated secret <hex string>
+
+ --username <ASCII string>
+ your username
+ conf-variable: Xauth username <ASCII string>
+
+ (configfile only option)
+ your password (cleartext)
+ conf-variable: Xauth password <ASCII string>
+
+ (configfile only option)
+ your password (obfuscated)
+ conf-variable: Xauth obfuscated password <hex string>
+
+ --domain <ASCII string>
+ (NT-) Domain name for authentication
+ conf-variable: Domain <ASCII string>
+
+ --xauth-inter
+ enable interactive extended authentication (for challenge response auth)
+ conf-variable: Xauth interactive
+
+ --vendor <cisco/netscreen>
+ vendor of your IPSec gateway
+ Default: cisco
+ conf-variable: Vendor <cisco/netscreen>
+
+ --natt-mode <natt/none/force-natt/cisco-udp>
+ Which NAT-Traversal Method to use:
+ * natt -- NAT-T as defined in RFC3947
+ * none -- disable use of any NAT-T method
+ * force-natt -- always use NAT-T encapsulation even
+ without presence of a NAT device
+ (useful if the OS captures all ESP traffic)
+ * cisco-udp -- Cisco proprietary UDP encapsulation, commonly over Port 10000
+ Note: cisco-tcp encapsulation is not yet supported
+ Default: natt
+ conf-variable: NAT Traversal Mode <natt/none/force-natt/cisco-udp>
+
+ --script <command>
+ command is executed using system() to configure the interface,
+ routing and so on. Device name, IP, etc. are passed using enviroment
+ variables, see README. This script is executed right after ISAKMP is
+ done, but before tunneling is enabled. It is called when vpnc
+ terminates, too
+ Default: /etc/vpnc/vpnc-script
+ conf-variable: Script <command>
+
+ --dh <dh1/dh2/dh5>
+ name of the IKE DH Group
+ Default: dh2
+ conf-variable: IKE DH Group <dh1/dh2/dh5>
+
+ --pfs <nopfs/dh1/dh2/dh5/server>
+ Diffie-Hellman group to use for PFS
+ Default: server
+ conf-variable: Perfect Forward Secrecy <nopfs/dh1/dh2/dh5/server>
+
+ --enable-1des
+ enables weak single DES encryption
+ conf-variable: Enable Single DES
+
+ --enable-no-encryption
+ enables using no encryption for data traffic (key exchanged must be encrypted)
+ conf-variable: Enable no encryption
+
+ --application-version <ASCII string>
+ Application Version to report. Note: Default string is generated at runtime.
+ Default: Cisco Systems VPN Client 0.5.1:Linux
+ conf-variable: Application version <ASCII string>
+
+ --ifname <ASCII string>
+ visible name of the TUN/TAP interface
+ conf-variable: Interface name <ASCII string>
+
+ --ifmode <tun/tap>
+ mode of TUN/TAP interface:
+ * tun: virtual point to point interface (default)
+ * tap: virtual ethernet interface
+ Default: tun
+ conf-variable: Interface mode <tun/tap>
+
+ --debug <0/1/2/3/99>
+ Show verbose debug messages
+ * 0: Do not print debug information.
+ * 1: Print minimal debug information.
+ * 2: Show statemachine and packet/payload type information.
+ * 3: Dump everything exluding authentication data.
+ * 99: Dump everything including authentication data (e.g. passwords).
+ conf-variable: Debug <0/1/2/3/99>
+
+ --no-detach
+ Don't detach from the console after login
+ conf-variable: No Detach
+
+ --pid-file <filename>
+ store the pid of background process in <filename>
+ Default: /var/run/vpnc/pid
+ conf-variable: Pidfile <filename>
+
+ --local-addr <ip/hostname>
+ local IP to use for ISAKMP / ESP / ... (0.0.0.0 == automatically assign)
+ Default: 0.0.0.0
+ conf-variable: Local Addr <ip/hostname>
+
+ --local-port <0-65535>
+ local ISAKMP port number to use (0 == use random port)
+ Default: 500
+ conf-variable: Local Port <0-65535>
+
+ --udp-port <0-65535>
+ Local UDP port number to use (0 == use random port).
+ This is only relevant if cisco-udp nat-traversal is used.
+ This is the _local_ port, the remote udp port is discovered automatically.
+ It is especially not the cisco-tcp port.
+ Default: 10000
+ conf-variable: Cisco UDP Encapsulation Port <0-65535>
+
+ --dpd-idle <0,10-86400>
+ Send DPD packet after not receiving anything for <idle> seconds.
+ Use 0 to disable DPD completely (both ways).
+ Default: 300
+ conf-variable: DPD idle timeout (our side) <0,10-86400>
+
+ --non-inter
+ Don't ask anything, exit on missing options
+ conf-variable: Noninteractive
+
+ --auth-mode <psk/cert/hybrid>
+ Authentication mode:
+ * psk: pre-shared key (default)
+ * cert: server + client certificate (not implemented yet)
+ * hybrid: server certificate + xauth (if built with openssl support)
+ Default: psk
+ conf-variable: IKE Authmode <psk/cert/hybrid>
+
+ --ca-file <filename>
+ filename and path to the CA-PEM-File
+ conf-variable: CA-File <filename>
+
+ --ca-dir <directory>
+ path of the trusted CA-Directory
+ Default: /etc/ssl/certs
+ conf-variable: CA-Dir <directory>
+
+ --dns-update
+ DEPRECATED extension, see README.Debian for details
+ Default: Yes
+ conf-variable: DNSUpdate
+
+ --target-networks
+ DEPRECATED extension, see README.Debian for details
+ Default:
+ conf-variable: Target Networks
+
+Report bugs to vpnc@unix-ag.uni-kl.de
diff --git a/packages/vpnc/vpnc.inc b/packages/vpnc/vpnc.inc
new file mode 100644
index 0000000000..4ca82eb47d
--- /dev/null
+++ b/packages/vpnc/vpnc.inc
@@ -0,0 +1,19 @@
+DESCRIPTION = "A client for the Cisco3000 VPN Concentrator"
+HOMEPAGE = "http://www.unix-ag.uni-kl.de/~massar/vpnc/"
+AUTHOR = "Maurice Massar vpnc@unix-ag.uni-kl.de"
+SECTION = "console/network"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "libgcrypt"
+RDEPENDS = "kernel-module-tun"
+
+CFLAGS_append = ' -DVERSION=\\"${PV}\\"'
+LDFLAGS_append = " -lgcrypt -lgpg-error"
+
+do_install () {
+ oe_runmake 'DESTDIR=${D}' 'PREFIX=/usr' install
+ rm -f ${D}${sysconfdir}/vpnc/vpnc.conf #This file is useless
+ install ${WORKDIR}/default.conf ${D}${sysconfdir}/vpnc/default.conf
+}
+
+CONFFILES_${PN} = "${sysconfdir}/vpnc/default.conf"
diff --git a/packages/vpnc/vpnc_0.3.2.bb b/packages/vpnc/vpnc_0.3.2.bb
index d542408eb7..1a3f7fc011 100644
--- a/packages/vpnc/vpnc_0.3.2.bb
+++ b/packages/vpnc/vpnc_0.3.2.bb
@@ -1,15 +1,5 @@
-DESCRIPTION = "A client for the Cisco3000 VPN Concentrator"
-SECTION = "console/network"
-PRIORITY = "optional"
-LICENSE = "GPL"
-DEPENDS = "libgcrypt"
+require vpnc.inc
-SRC_URI = "http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-${PV}.tar.gz"
-
-CFLAGS_append = ' -DVERSION=\\"${PV}\\"'
-LDFLAGS_append = " -lgcrypt -lgpg-error"
+PR = "r1"
-do_install () {
- install -d ${D}${sbindir}
- install -m 0755 vpnc ${D}${sbindir}
-}
+SRC_URI = "http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-${PV}.tar.gz"
diff --git a/packages/vpnc/vpnc_0.3.3.bb b/packages/vpnc/vpnc_0.3.3.bb
index 8aee0fa5c0..3c8397607b 100644
--- a/packages/vpnc/vpnc_0.3.3.bb
+++ b/packages/vpnc/vpnc_0.3.3.bb
@@ -1,23 +1,7 @@
-DESCRIPTION = "A client for the Cisco3000 VPN Concentrator"
-SECTION = "console/network"
-PRIORITY = "optional"
-HOMEPAGE = "http://www.unix-ag.uni-kl.de/~massar/vpnc/"
-LICENSE = "GPL"
-DEPENDS = "libgcrypt"
-RDEPENDS = "kernel-module-tun"
-PR = "r1"
+require vpnc.inc
+
+PR = "r2"
SRC_URI = "http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-${PV}.tar.gz \
file://vpnc-script.patch;patch=1 \
file://default.conf"
-
-CFLAGS_append = ' -DVERSION=\\"${PV}\\"'
-LDFLAGS_append = " -lgcrypt -lgpg-error"
-
-do_install () {
- oe_runmake 'DESTDIR=${D}' 'PREFIX=/usr' install
- rm -f ${D}${sysconfdir}/vpnc/vpnc.conf #This file is useless
- install ${WORKDIR}/default.conf ${D}${sysconfdir}/vpnc/default.conf
-}
-
-CONFFILES_${PN} = "${sysconfdir}/vpnc/default.conf"
diff --git a/packages/vpnc/vpnc_0.5.1.bb b/packages/vpnc/vpnc_0.5.1.bb
new file mode 100644
index 0000000000..35919847c1
--- /dev/null
+++ b/packages/vpnc/vpnc_0.5.1.bb
@@ -0,0 +1,8 @@
+require vpnc.inc
+
+PR = "r0"
+
+SRC_URI = "http://www.unix-ag.uni-kl.de/~massar/vpnc/vpnc-${PV}.tar.gz \
+ file://makeman.patch;patch=1 \
+ file://vpnc${PV}--long-help \
+ file://default.conf"
diff --git a/packages/vte/vte_0.16.13.bb b/packages/vte/vte_0.16.13.bb
new file mode 100644
index 0000000000..9453fee206
--- /dev/null
+++ b/packages/vte/vte_0.16.13.bb
@@ -0,0 +1 @@
+require vte.inc
diff --git a/packages/wireless-tools/wireless-tools.inc b/packages/wireless-tools/wireless-tools.inc
index 857f63c91b..36ee3eddef 100644
--- a/packages/wireless-tools/wireless-tools.inc
+++ b/packages/wireless-tools/wireless-tools.inc
@@ -4,10 +4,15 @@ SECTION = "base"
PRIORITY = "optional"
LICENSE = "GPL"
-SRC_URI = "file://man.patch;patch=1 \
- file://wireless-tools.if-pre-up"
+SRC_URI += "\
+ http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.${PV}.tar.gz \
+ file://man.patch;patch=1 \
+ file://wireless-tools.if-pre-up \
+ file://zzz-wireless.if-pre-up"
+S = "${WORKDIR}/wireless_tools.${PV}"
CFLAGS =+ "-I${S}"
+
EXTRA_OEMAKE = "-e 'BUILD_SHARED=y' \
'INSTALL_DIR=${D}${base_sbindir}' \
'INSTALL_LIB=${D}${libdir}' \
@@ -24,6 +29,15 @@ do_stage() {
oe_libinstall -a -so libiw ${STAGING_LIBDIR}/
}
+do_install() {
+ oe_runmake PREFIX=${D} install-iwmulticall install-dynamic install-man install-hdr
+ install -d ${D}${sbindir}
+ install -m 0755 ifrename ${D}${sbindir}/ifrename
+ install -d ${D}${sysconfdir}/network/if-pre-up.d
+ install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools
+ install ${WORKDIR}/zzz-wireless.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/zzz-wireless
+}
+
PACKAGES += "libiw libiw-dev libiw-doc libiw-dbg ifrename ifrename-dbg ifrename-doc"
FILES_libiw += "${libdir}/*.so.*"
FILES_libiw-dbg += "${libdir}/.debug/*.so.*"
diff --git a/packages/wireless-tools/wireless-tools_28+29pre10.bb b/packages/wireless-tools/wireless-tools_28+29pre10.bb
deleted file mode 100644
index cf519cd9f1..0000000000
--- a/packages/wireless-tools/wireless-tools_28+29pre10.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require wireless-tools.inc
-
-PR = "r3"
-
-SRC_URI += "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.pre10.tar.gz"
-S = "${WORKDIR}/wireless_tools.29"
-
-do_install() {
- oe_runmake PREFIX=${D} install-iwmulticall install-dynamic install-man install-hdr
- install -d ${D}${sbindir}
- install -m 0755 ifrename ${D}${sbindir}/ifrename
- install -d ${D}${sysconfdir}/network/if-pre-up.d
- install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools
-}
diff --git a/packages/wireless-tools/wireless-tools_28+29pre21.bb b/packages/wireless-tools/wireless-tools_28+29pre21.bb
deleted file mode 100644
index 41bd546b6d..0000000000
--- a/packages/wireless-tools/wireless-tools_28+29pre21.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require wireless-tools.inc
-
-PR = "r1"
-
-SRC_URI += "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.pre21.tar.gz \
- file://zzz-wireless.if-pre-up"
-S = "${WORKDIR}/wireless_tools.29"
-
-do_install() {
- oe_runmake PREFIX=${D} install-iwmulticall install-dynamic install-man install-hdr
- install -d ${D}${sbindir}
- install -m 0755 ifrename ${D}${sbindir}/ifrename
- install -d ${D}${sysconfdir}/network/if-pre-up.d
- install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools
- install ${WORKDIR}/zzz-wireless.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/zzz-wireless
-}
diff --git a/packages/wireless-tools/wireless-tools_28.bb b/packages/wireless-tools/wireless-tools_28.bb
deleted file mode 100644
index 92a49daae2..0000000000
--- a/packages/wireless-tools/wireless-tools_28.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require wireless-tools.inc
-
-PR = "r1"
-
-SRC_URI += "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.28.pre13.tar.gz \
- file://zzz-wireless.if-pre-up"
-S = "${WORKDIR}/wireless_tools.28"
-
-do_install() {
- oe_runmake PREFIX=${D} install-iwmulticall install-dynamic
- install -d ${D}${sysconfdir}/network/if-pre-up.d
- install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools
- install ${WORKDIR}/zzz-wireless.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/zzz-wireless
-}
diff --git a/packages/wireless-tools/wireless-tools_29.bb b/packages/wireless-tools/wireless-tools_29.bb
new file mode 100644
index 0000000000..7f08db81c7
--- /dev/null
+++ b/packages/wireless-tools/wireless-tools_29.bb
@@ -0,0 +1,3 @@
+require wireless-tools.inc
+
+PR = "r0"
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/.mtn2git_empty b/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/.mtn2git_empty
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/config.in b/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/config.in
index a2bc086629..a2bc086629 100644
--- a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/config.in
+++ b/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/config.in
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/only-the-modules.patch b/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/only-the-modules.patch
index abb3b137da..abb3b137da 100644
--- a/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20071030/only-the-modules.patch
+++ b/packages/wlan-ng/wlan-ng-modules-0.2.8+svn20080315/only-the-modules.patch
diff --git a/packages/wlan-ng/wlan-ng-modules.inc b/packages/wlan-ng/wlan-ng-modules.inc
index 4cf0733e7a..20d7389512 100644
--- a/packages/wlan-ng/wlan-ng-modules.inc
+++ b/packages/wlan-ng/wlan-ng-modules.inc
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.linux-wlan.org"
SECTION = "kernel/modules"
DEPENDS = "virtual/kernel"
RRECOMMENDS = "wlan-ng-utils"
-RPROVIDES += "wlan-ng-modules-usb"
+RPROVIDES += "wlan-ng-modules-usb wlan-ng-modules"
LICENSE = "GPL"
SRC_URI = "file://no-compat.patch;patch=1 \
diff --git a/packages/wlan-ng/wlan-ng-modules_0.2.1-pre26.bb b/packages/wlan-ng/wlan-ng-modules_0.2.1-pre26.bb
index d9597febe4..cb6edc97dc 100644
--- a/packages/wlan-ng/wlan-ng-modules_0.2.1-pre26.bb
+++ b/packages/wlan-ng/wlan-ng-modules_0.2.1-pre26.bb
@@ -1,20 +1,11 @@
-DESCRIPTION = "linux-wlan-ng (prism2.x, prism3, pcmcia, pci, usb) driver for 11Mbps wireless lan cards"
-HOMEPAGE = "http://www.linux-wlan.org"
-SECTION = "kernel/modules"
-DEPENDS = "virtual/kernel"
-RRECOMMENDS = "wlan-ng-utils"
-LICENSE = "GPL"
-PR = "r2"
+require wlan-ng-modules.inc
+
+PR = "r3"
SRC_URI = "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/older/linux-wlan-ng-${PV}.tar.bz2 \
file://no-compat.patch;patch=1 \
file://only-the-modules.patch;patch=1 \
file://config.in"
-S = "${WORKDIR}/linux-wlan-ng-${PV}"
-
-inherit module
-
-PARALLEL_MAKE = ""
do_configure() {
install -m 0655 ${WORKDIR}/config.in ${S}/config.in
@@ -39,17 +30,3 @@ do_configure() {
ln -sf ${S}/src/include/wlan src/prism2/driver/include/wlan
ln -sf ${S}/src/prism2/include/prism2 src/prism2/driver/include/prism2
}
-
-do_compile() {
- oe_runmake -C src all
-}
-
-do_install() {
- oe_runmake install DESTDIR=${D}
-
- # Listen closely... sssshhh... can you hear the wlan-ng build system suck?
- rm -f ${KERNEL_SOURCE}/../config.mk
- rm -f ${KERNEL_SOURCE}/../../config.mk
-}
-
-FILES_${PN} = "/lib"
diff --git a/packages/wlan-ng/wlan-ng-modules_0.2.8+svn20071030.bb b/packages/wlan-ng/wlan-ng-modules_0.2.8+svn20080315.bb
index 8e885b5ad2..f1fadadd09 100644
--- a/packages/wlan-ng/wlan-ng-modules_0.2.8+svn20071030.bb
+++ b/packages/wlan-ng/wlan-ng-modules_0.2.8+svn20080315.bb
@@ -1,6 +1,6 @@
require wlan-ng-modules.inc
-SRCDATE = "20071030"
+SRCDATE = "20080315"
PV = "0.2.8+svn${SRCDATE}"
SRC_URI += "svn://svn.shaftnet.org/linux-wlan-ng;module=trunk "
diff --git a/packages/xorg-app/mkcomposecache_1.2.bb b/packages/xorg-app/mkcomposecache_1.2.bb
new file mode 100644
index 0000000000..5c80f67ccd
--- /dev/null
+++ b/packages/xorg-app/mkcomposecache_1.2.bb
@@ -0,0 +1,3 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "used for creating global (system-wide) Compose cache files"
diff --git a/packages/xorg-app/mkfontdir-native_1.0.4.bb b/packages/xorg-app/mkfontdir-native_1.0.4.bb
new file mode 100644
index 0000000000..645379e23f
--- /dev/null
+++ b/packages/xorg-app/mkfontdir-native_1.0.4.bb
@@ -0,0 +1,8 @@
+inherit native
+
+require mkfontdir_1.0.4.bb
+
+DEPENDS = "util-macros-native mkfontscale-native"
+
+S = "${WORKDIR}/mkfontdir-${PV}"
+XORG_PN = "mkfontdir"
diff --git a/packages/xorg-app/mkfontdir_1.0.4.bb b/packages/xorg-app/mkfontdir_1.0.4.bb
new file mode 100644
index 0000000000..601278dcb3
--- /dev/null
+++ b/packages/xorg-app/mkfontdir_1.0.4.bb
@@ -0,0 +1,8 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "a program to create an index of X font files in a directory"
+
+PE = "1"
+
+RDEPENDS += "mkfontscale"
+
diff --git a/packages/xorg-app/mkfontscale-native_1.0.4.bb b/packages/xorg-app/mkfontscale-native_1.0.4.bb
new file mode 100644
index 0000000000..c461f9aa95
--- /dev/null
+++ b/packages/xorg-app/mkfontscale-native_1.0.4.bb
@@ -0,0 +1,7 @@
+inherit native
+require mkfontscale_1.0.4.bb
+
+DEPENDS = "libx11-native libfontenc-native freetype-native"
+
+S="${WORKDIR}/mkfontscale-${PV}"
+XORG_PN="mkfontscale"
diff --git a/packages/xorg-app/mkfontscale_1.0.4.bb b/packages/xorg-app/mkfontscale_1.0.4.bb
new file mode 100644
index 0000000000..126918b065
--- /dev/null
+++ b/packages/xorg-app/mkfontscale_1.0.4.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "a program to create an index of scalable font files for X"
+
+DEPENDS += " zlib libfontenc freetype virtual/libx11"
diff --git a/packages/xorg-app/twm_1.0.4.bb b/packages/xorg-app/twm_1.0.4.bb
new file mode 100644
index 0000000000..b8e75b2bbd
--- /dev/null
+++ b/packages/xorg-app/twm_1.0.4.bb
@@ -0,0 +1,11 @@
+require xorg-app-common.inc
+PE = "1"
+
+DESCRIPTION = "tiny window manager"
+
+DEPENDS += " virtual/libx11 libxext libxt libxmu"
+
+ALTERNATIVE_PATH = "${bindir}/twm"
+ALTERNATIVE_NAME = "x-window-manager"
+ALTERNATIVE_LINK = "${bindir}/x-window-manager"
+ALTERNATIVE_PRIORITY = "1"
diff --git a/packages/xorg-app/x11perf_1.5.bb b/packages/xorg-app/x11perf_1.5.bb
new file mode 100644
index 0000000000..00b78c134c
--- /dev/null
+++ b/packages/xorg-app/x11perf_1.5.bb
@@ -0,0 +1,7 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X11 server performance test program"
+DEPENDS += "libxmu libxrender libxft libxext fontconfig"
+PE = "1"
+
+FILES_${PN} += "/usr/lib/X11/x11perfcomp/*"
diff --git a/packages/xorg-app/xauth_1.0.3.bb b/packages/xorg-app/xauth_1.0.3.bb
new file mode 100644
index 0000000000..e3cd44cec1
--- /dev/null
+++ b/packages/xorg-app/xauth_1.0.3.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X authority file utility"
+DEPENDS += "libxau libxext libxmu"
+PE = "1"
diff --git a/packages/xorg-app/xcompmgr_1.1.4.bb b/packages/xorg-app/xcompmgr_1.1.4.bb
new file mode 100644
index 0000000000..45f74d33f2
--- /dev/null
+++ b/packages/xorg-app/xcompmgr_1.1.4.bb
@@ -0,0 +1,6 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X Compositing Manager"
+LICENSE = "BSD-X"
+PRIORITY = "optional"
+DEPENDS += "libxdamage libxcomposite libxrender"
diff --git a/packages/xorg-app/xdm_1.1.7.bb b/packages/xorg-app/xdm_1.1.7.bb
new file mode 100644
index 0000000000..eb153b1da9
--- /dev/null
+++ b/packages/xorg-app/xdm_1.1.7.bb
@@ -0,0 +1,10 @@
+require xorg-app-common.inc
+PE = "1"
+
+DESCRIPTION = "X display manager"
+
+DEPENDS += " libxmu libxinerama libxpm libxdmcp libxau virtual/libx11 libxext libxdmcp libxt libxaw"
+
+EXTRA_OECONF += " --with-random-device=/dev/urandom"
+
+FILES_${PN}-dbg += "${libdir}/X11/xdm/.debug/*"
diff --git a/packages/xorg-app/xev-1.0.2/diet-x11.patch b/packages/xorg-app/xev-1.0.2/diet-x11.patch
deleted file mode 100644
index 9f515e8c73..0000000000
--- a/packages/xorg-app/xev-1.0.2/diet-x11.patch
+++ /dev/null
@@ -1,80 +0,0 @@
----
- xev.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-Index: xev-1.0.2/xev.c
-===================================================================
---- xev-1.0.2.orig/xev.c 2006-06-02 00:25:44.000000000 +0100
-+++ xev-1.0.2/xev.c 2007-05-10 15:22:07.000000000 +0100
-@@ -109,7 +109,7 @@ do_KeyPress (XEvent *eventp)
- nbytes = XLookupString (e, str, 256, &ks, NULL);
-
- /* not supposed to call XmbLookupString on a key release event */
-- if (e->type == KeyPress && xic) {
-+ /*if (e->type == KeyPress && xic) {
- do {
- nmbbytes = XmbLookupString (xic, e, buf, bsize - 1, &ks, &status);
- buf[nmbbytes] = '\0';
-@@ -119,7 +119,7 @@ do_KeyPress (XEvent *eventp)
- buf = realloc (buf, bsize);
- }
- } while (status == XBufferOverflow);
-- }
-+ }*/
-
- if (ks == NoSymbol)
- ksname = "NoSymbol";
-@@ -149,7 +149,7 @@ do_KeyPress (XEvent *eventp)
- }
-
- /* not supposed to call XmbLookupString on a key release event */
-- if (e->type == KeyPress && xic) {
-+ /*if (e->type == KeyPress && xic) {
- printf (" XmbLookupString gives %d bytes: ", nmbbytes);
- if (nmbbytes > 0) {
- dump (buf, nmbbytes);
-@@ -157,7 +157,7 @@ do_KeyPress (XEvent *eventp)
- } else {
- printf ("\n");
- }
-- }
-+ } */
-
- printf (" XFilterEvent returns: %s\n",
- XFilterEvent (eventp, e->window) ? "True" : "False");
-@@ -804,7 +804,7 @@ main (int argc, char **argv)
- fprintf (stderr, "%s: XSetLocaleModifiers failed\n", ProgramName);
- }
-
-- xim = XOpenIM (dpy, NULL, NULL, NULL);
-+ /*xim = XOpenIM (dpy, NULL, NULL, NULL);
- if (xim == NULL) {
- fprintf (stderr, "%s: XOpenIM failed\n", ProgramName);
- }
-@@ -831,7 +831,7 @@ main (int argc, char **argv)
- }
- XFree (xim_styles);
- }
-- }
-+ }*/
-
- screen = DefaultScreen (dpy);
-
-@@ -891,7 +891,7 @@ main (int argc, char **argv)
- printf ("Outer window is 0x%lx, inner window is 0x%lx\n", w, subw);
- }
-
-- if (xim && xim_style) {
-+ /*if (xim && xim_style) {
- xic = XCreateIC (xim,
- XNInputStyle, xim_style,
- XNClientWindow, w,
-@@ -901,7 +901,7 @@ main (int argc, char **argv)
- if (xic == NULL) {
- fprintf (stderr, "XCreateIC failed\n");
- }
-- }
-+ }*/
-
- for (done = 0; !done; ) {
- XEvent event;
diff --git a/packages/xorg-app/xev/diet-x11.patch b/packages/xorg-app/xev/diet-x11.patch
index 7e93f160a5..9f515e8c73 100644
--- a/packages/xorg-app/xev/diet-x11.patch
+++ b/packages/xorg-app/xev/diet-x11.patch
@@ -1,6 +1,12 @@
---- xev/xev.c 2004-02-06 11:00:37.000000000 -0800
-+++ xev/xev.new.c 2005-08-04 15:40:36.000000000 -0700
-@@ -149,7 +149,7 @@
+---
+ xev.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+Index: xev-1.0.2/xev.c
+===================================================================
+--- xev-1.0.2.orig/xev.c 2006-06-02 00:25:44.000000000 +0100
++++ xev-1.0.2/xev.c 2007-05-10 15:22:07.000000000 +0100
+@@ -109,7 +109,7 @@ do_KeyPress (XEvent *eventp)
nbytes = XLookupString (e, str, 256, &ks, NULL);
/* not supposed to call XmbLookupString on a key release event */
@@ -9,7 +15,7 @@
do {
nmbbytes = XmbLookupString (xic, e, buf, bsize - 1, &ks, &status);
buf[nmbbytes] = '\0';
-@@ -159,7 +159,7 @@
+@@ -119,7 +119,7 @@ do_KeyPress (XEvent *eventp)
buf = realloc (buf, bsize);
}
} while (status == XBufferOverflow);
@@ -18,7 +24,7 @@
if (ks == NoSymbol)
ksname = "NoSymbol";
-@@ -189,7 +189,7 @@
+@@ -149,7 +149,7 @@ do_KeyPress (XEvent *eventp)
}
/* not supposed to call XmbLookupString on a key release event */
@@ -27,16 +33,16 @@
printf (" XmbLookupString gives %d bytes: ", nmbbytes);
if (nmbbytes > 0) {
dump (buf, nmbbytes);
-@@ -200,7 +200,7 @@
-
- printf (" XFilterEvent returns: %s\n",
- XFilterEvent (eventp, e->window) ? "True" : "False");
+@@ -157,7 +157,7 @@ do_KeyPress (XEvent *eventp)
+ } else {
+ printf ("\n");
+ }
- }
-+ }*/
- }
++ } */
- static void
-@@ -857,7 +857,7 @@
+ printf (" XFilterEvent returns: %s\n",
+ XFilterEvent (eventp, e->window) ? "True" : "False");
+@@ -804,7 +804,7 @@ main (int argc, char **argv)
fprintf (stderr, "%s: XSetLocaleModifiers failed\n", ProgramName);
}
@@ -45,7 +51,7 @@
if (xim == NULL) {
fprintf (stderr, "%s: XOpenIM failed\n", ProgramName);
}
-@@ -884,7 +884,7 @@
+@@ -831,7 +831,7 @@ main (int argc, char **argv)
}
XFree (xim_styles);
}
@@ -54,7 +60,7 @@
screen = DefaultScreen (dpy);
-@@ -948,7 +948,7 @@
+@@ -891,7 +891,7 @@ main (int argc, char **argv)
printf ("Outer window is 0x%lx, inner window is 0x%lx\n", w, subw);
}
@@ -63,7 +69,7 @@
xic = XCreateIC (xim,
XNInputStyle, xim_style,
XNClientWindow, w,
-@@ -958,7 +958,7 @@
+@@ -901,7 +901,7 @@ main (int argc, char **argv)
if (xic == NULL) {
fprintf (stderr, "XCreateIC failed\n");
}
diff --git a/packages/xorg-app/xev_1.0.3.bb b/packages/xorg-app/xev_1.0.3.bb
new file mode 100644
index 0000000000..b7a4070a8f
--- /dev/null
+++ b/packages/xorg-app/xev_1.0.3.bb
@@ -0,0 +1,7 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X Event Viewer"
+LICENSE = "MIT"
+PE = "1"
+
+SRC_URI += "file://diet-x11.patch;patch=1"
diff --git a/packages/xorg-app/xfontsel_1.0.2.bb b/packages/xorg-app/xfontsel_1.0.2.bb
new file mode 100644
index 0000000000..5549860f92
--- /dev/null
+++ b/packages/xorg-app/xfontsel_1.0.2.bb
@@ -0,0 +1,4 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "point and click selection of X11 font names"
+DEPENDS += " libxaw"
diff --git a/packages/xorg-app/xfs_1.0.6.bb b/packages/xorg-app/xfs_1.0.6.bb
new file mode 100644
index 0000000000..8cef4bda9a
--- /dev/null
+++ b/packages/xorg-app/xfs_1.0.6.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X fontserver"
+DEPENDS += " libfs libxfont xtrans"
+PE = "1"
diff --git a/packages/xorg-app/xinit_1.0.8.bb b/packages/xorg-app/xinit_1.0.8.bb
new file mode 100644
index 0000000000..ce82fb05d4
--- /dev/null
+++ b/packages/xorg-app/xinit_1.0.8.bb
@@ -0,0 +1,6 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X Window System initializer"
+PE = "1"
+
+FILES_${PN} += "${libdir}X11/xinit"
diff --git a/packages/xorg-app/xinput_1.3.0.bb b/packages/xorg-app/xinput_1.3.0.bb
new file mode 100644
index 0000000000..a95753c1f9
--- /dev/null
+++ b/packages/xorg-app/xinput_1.3.0.bb
@@ -0,0 +1,4 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "a utility to configure and test XInput devices"
+DEPENDS += " libxi"
diff --git a/packages/xorg-app/xkbcomp_1.0.4.bb b/packages/xorg-app/xkbcomp_1.0.4.bb
new file mode 100644
index 0000000000..ca6cdb8898
--- /dev/null
+++ b/packages/xorg-app/xkbcomp_1.0.4.bb
@@ -0,0 +1,5 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "The X Keyboard Extension essentially replaces the core protocol definition of keyboard."
+
+DEPENDS += " virtual/libx11 libxkbfile"
diff --git a/packages/xorg-app/xprop_1.0.4.bb b/packages/xorg-app/xprop_1.0.4.bb
new file mode 100644
index 0000000000..1781fb1a1b
--- /dev/null
+++ b/packages/xorg-app/xprop_1.0.4.bb
@@ -0,0 +1,6 @@
+require xorg-app-common.inc
+PE = "1"
+
+DESCRIPTION = "a property displayer for X"
+
+DEPENDS += " libxmu virtual/libx11"
diff --git a/packages/xorg-app/xrandr_1.2.3.bb b/packages/xorg-app/xrandr_1.2.3.bb
new file mode 100644
index 0000000000..05ef6af95d
--- /dev/null
+++ b/packages/xorg-app/xrandr_1.2.3.bb
@@ -0,0 +1,8 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X Resize and Rotate extension command."
+LICENSE= "BSD-X"
+DEPENDS += "libxrandr libxrender"
+PE = "1"
+
+SRC_URI += "file://resolve_symbol_clash.patch;patch=1"
diff --git a/packages/xorg-app/xrdb_1.0.5.bb b/packages/xorg-app/xrdb_1.0.5.bb
new file mode 100644
index 0000000000..177d3ab23b
--- /dev/null
+++ b/packages/xorg-app/xrdb_1.0.5.bb
@@ -0,0 +1,6 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "X server resource database utility"
+LICENSE = "xrdb"
+DEPENDS += "libxmu"
+PE = "1"
diff --git a/packages/xorg-app/xset_1.0.4.bb b/packages/xorg-app/xset_1.0.4.bb
new file mode 100644
index 0000000000..fa2e4c25a2
--- /dev/null
+++ b/packages/xorg-app/xset_1.0.4.bb
@@ -0,0 +1,11 @@
+require xorg-app-common.inc
+
+DESCRIPTION = "user preference utility for X"
+LICENSE = "MIT"
+DEPENDS += "libxext libxxf86misc libxfontcache libxmu libxp libxau"
+PE = "1"
+
+SRC_URI += "file://disable-xkb.patch;patch=1"
+
+CFLAGS += "-D_GNU_SOURCE"
+EXTRA_OECONF = "--disable-xkb"
diff --git a/packages/xorg-driver/xf86-input-aiptek_1.1.1.bb b/packages/xorg-driver/xf86-input-aiptek_1.1.1.bb
new file mode 100644
index 0000000000..34a497438b
--- /dev/null
+++ b/packages/xorg-driver/xf86-input-aiptek_1.1.1.bb
@@ -0,0 +1,2 @@
+require xorg-driver-input.inc
+PE = "1"
diff --git a/packages/xorg-driver/xf86-video-ati_6.8.0.bb b/packages/xorg-driver/xf86-video-ati_6.8.0.bb
new file mode 100644
index 0000000000..4aae05a747
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-ati_6.8.0.bb
@@ -0,0 +1,5 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- ATI display driver"
+DEPENDS += " xineramaproto xf86miscproto drm xf86driproto"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-video-intel_2.2.1.bb b/packages/xorg-driver/xf86-video-intel_2.2.1.bb
new file mode 100644
index 0000000000..eed1fcb600
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-intel_2.2.1.bb
@@ -0,0 +1,5 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- Intel i8xx, i9xx display driver"
+DEPENDS += " virtual/libx11 libxvmc drm xf86driproto"
+PE = "1"
diff --git a/packages/xorg-driver/xf86-video-nv_2.1.8.bb b/packages/xorg-driver/xf86-video-nv_2.1.8.bb
new file mode 100644
index 0000000000..0d4ee2ed19
--- /dev/null
+++ b/packages/xorg-driver/xf86-video-nv_2.1.8.bb
@@ -0,0 +1,4 @@
+require xorg-driver-video.inc
+
+DESCRIPTION = "X.Org X server -- NV display driver"
+PE = "1"
diff --git a/packages/xorg-font/font-xfree86-type1_1.0.1.bb b/packages/xorg-font/font-xfree86-type1_1.0.1.bb
new file mode 100644
index 0000000000..f8fe553c62
--- /dev/null
+++ b/packages/xorg-font/font-xfree86-type1_1.0.1.bb
@@ -0,0 +1,3 @@
+require xorg-font-common.inc
+
+PE = "1"
diff --git a/packages/xorg-lib/libxext_1.0.4.bb b/packages/xorg-lib/libxext_1.0.4.bb
new file mode 100644
index 0000000000..3e8aa50f7c
--- /dev/null
+++ b/packages/xorg-lib/libxext_1.0.4.bb
@@ -0,0 +1,8 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "X11 miscellaneous extension library"
+DEPENDS += "xproto virtual/libx11 xextproto libxau"
+PROVIDES = "xext"
+PE = "1"
+
+XORG_PN = "libXext"
diff --git a/packages/xorg-lib/xtrans_1.1.bb b/packages/xorg-lib/xtrans_1.1.bb
new file mode 100644
index 0000000000..42cf655a3f
--- /dev/null
+++ b/packages/xorg-lib/xtrans_1.1.bb
@@ -0,0 +1,7 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "network API translation layer to insulate X applications and \
+libraries from OS network vageries."
+PE = "1"
+
+SRC_URI += "file://fix-missing-includepath.patch;patch=1"
diff --git a/packages/xorg-proto/inputproto_1.4.3.bb b/packages/xorg-proto/inputproto_1.4.3.bb
new file mode 100644
index 0000000000..3637929316
--- /dev/null
+++ b/packages/xorg-proto/inputproto_1.4.3.bb
@@ -0,0 +1,3 @@
+require xorg-proto-common.inc
+
+PE = "1"
diff --git a/packages/xorg-proto/printproto_1.0.4.bb b/packages/xorg-proto/printproto_1.0.4.bb
new file mode 100644
index 0000000000..3637929316
--- /dev/null
+++ b/packages/xorg-proto/printproto_1.0.4.bb
@@ -0,0 +1,3 @@
+require xorg-proto-common.inc
+
+PE = "1"
diff --git a/packages/xorg-util/util-macros_1.1.6.bb b/packages/xorg-util/util-macros_1.1.6.bb
new file mode 100644
index 0000000000..ae656f3707
--- /dev/null
+++ b/packages/xorg-util/util-macros_1.1.6.bb
@@ -0,0 +1,4 @@
+require xorg-util-common.inc
+
+DESCRIPTION = "X autotools macros"
+PE = "1"
diff --git a/packages/xorg-xserver/xserver-kdrive-1.4/pkgconfig_fix.patch b/packages/xorg-xserver/files/pkgconfig_fix.patch
index 0790d4c32b..e75e209cbe 100644
--- a/packages/xorg-xserver/xserver-kdrive-1.4/pkgconfig_fix.patch
+++ b/packages/xorg-xserver/files/pkgconfig_fix.patch
@@ -6,7 +6,7 @@ Index: xorg-server-1.4/xorg-server.pc.in
Name: xorg-server
Description: Modular X.Org X Server
-+Requires: pixman
++Requires: pixman-1
Version: @PACKAGE_VERSION@
-Cflags: -I${sdkdir} @PIXMAN_CFLAGS@
+Cflags: -I${sdkdir}
diff --git a/packages/xorg-xserver/files/sysroot_fix.patch b/packages/xorg-xserver/files/sysroot_fix.patch
new file mode 100644
index 0000000000..59753d5803
--- /dev/null
+++ b/packages/xorg-xserver/files/sysroot_fix.patch
@@ -0,0 +1,13 @@
+Index: xorg-server-1.4/xorg-server.m4
+===================================================================
+--- xorg-server-1.4.orig/xorg-server.m4 2008-03-15 20:09:36.000000000 +0100
++++ xorg-server-1.4/xorg-server.m4 2008-03-15 20:09:51.000000000 +0100
+@@ -30,7 +30,7 @@
+
+ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
+ SAVE_CFLAGS="$CFLAGS"
+- CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
++ CFLAGS="$CFLAGS `pkg-config --cflags xorg-server`"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include "xorg-server.h"
+ #if !defined $1
diff --git a/packages/xorg-xserver/xserver-xorg-1.4/.mtn2git_empty b/packages/xorg-xserver/xserver-xorg-1.4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/xorg-xserver/xserver-xorg-1.4/.mtn2git_empty
diff --git a/packages/xorg-xserver/xserver-xorg-1.4/drmfix.patch b/packages/xorg-xserver/xserver-xorg-1.4/drmfix.patch
new file mode 100644
index 0000000000..a62a767f23
--- /dev/null
+++ b/packages/xorg-xserver/xserver-xorg-1.4/drmfix.patch
@@ -0,0 +1,13 @@
+Index: xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am
+===================================================================
+--- xorg-server-1.4.orig/hw/xfree86/os-support/linux/Makefile.am 2007-08-23 21:04:53.000000000 +0200
++++ xorg-server-1.4/hw/xfree86/os-support/linux/Makefile.am 2008-03-13 18:27:23.000000000 +0100
+@@ -41,7 +41,7 @@
+
+ AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES)
+
+-INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) -I/usr/include/drm # FIXME this last part is crack
++INCLUDES = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS)
+
+ # FIXME: These need to be added to the build
+ LNX_EXTRA_SRCS = \
diff --git a/packages/xorg-xserver/xserver-xorg_1.4.bb b/packages/xorg-xserver/xserver-xorg_1.4.bb
new file mode 100644
index 0000000000..ee84cac779
--- /dev/null
+++ b/packages/xorg-xserver/xserver-xorg_1.4.bb
@@ -0,0 +1,16 @@
+require xorg-xserver-common.inc
+
+DESCRIPTION = "the X.Org X server"
+DEPENDS += "pixman"
+PE = "1"
+PR = "r1"
+
+SRC_URI += "file://drmfix.patch;patch=1 \
+ file://pkgconfig_fix.patch;patch=1 \
+ file://sysroot_fix.patch;patch=1"
+
+MESA_VER = "7.0.2"
+
+EXTRA_OECONF += " ac_cv_file__usr_share_X11_sgml_defs_ent=no "
+
+export LDFLAGS += " -ldl "
diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb b/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
index ef55e30c09..44084f1e22 100644
--- a/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
+++ b/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Common X11 scripts"
LICENSE = "GPL"
SECTION = "x11"
RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal xinit"
-PR = "r26"
+PR = "r27"
SRC_URI = "\
file://Xdefaults \
diff --git a/site/arm-linux-uclibc b/site/arm-linux-uclibc
index 5120795f7a..2933c3f3be 100644
--- a/site/arm-linux-uclibc
+++ b/site/arm-linux-uclibc
@@ -115,4 +115,3 @@ samba_cv_sig_atomic_t=${samba_cv_sig_atomic_t=yes}
samba_cv_socklen_t=${samba_cv_socklen_t=yes}
samba_cv_unixsocket=${samba_cv_unixsocket=yes}
samba_cv_volatile=${samba_cv_volatile=yes}
-
diff --git a/site/armeb-linux b/site/armeb-linux
index d75c1c8bb1..c852f00fee 100644
--- a/site/armeb-linux
+++ b/site/armeb-linux
@@ -51,4 +51,3 @@ samba_cv_STAT_STATVFS64=${samba_cv_STAT_STATVFS64=yes}
samba_cv_SIZEOF_OFF_T=${samba_cv_SIZEOF_OFF_T=yes}
samba_cv_SIZEOF_INO_T=${samba_cv_SIZEOF_INO_T=yes}
samba_cv_HAVE_STRUCT_FLOCK64=${samba_cv_HAVE_STRUCT_FLOCK64=yes}
-
diff --git a/site/avr32-common b/site/avr32-common
index b5b176cad7..5b5fae5e89 100644
--- a/site/avr32-common
+++ b/site/avr32-common
@@ -1,7 +1,9 @@
+#glib
glib_cv_stack_grows=${glib_cv_stack_grows=no}
ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
glib_cv_uscore=${glib_cv_uscore=no}
ac_cv_func_setpgrp_void=${ac_cv_func_setpgrp_void=yes}
+ac_cv_func_posix_getgrgid_r=${ac_cv_func_getgrgid_r=yes}
#dbus-glib
ac_cv_func_posix_getpwnam_r=${ac_cv_func_posix_getpwnam_r=yes}
@@ -23,3 +25,18 @@ ac_cv_func_realloc_works=${ac_cv_func_realloc_works=yes}
ac_cv_func_realloc_0_nonnull=${ac_cv_func_realloc_0_nonnull=yes}
lf_cv_sane_realloc=yes
+#sudo
+sudo_cv_uid_t_len=${sudo_cv_uid_t_len=10}
+
+#popt
+glib_cv_va_copy=${glib_cv_va_copy=yes}
+glib_cv___va_copy=${glib_cv___va_copy=yes}
+ac_cv_va_copy=${ac_cv_va_copy=yes}
+ac_cv___va_copy=${ac_cv___va_copy=yes}
+lftp_cv_va_copy=${lftp_cv_va_copy=yes}
+lftp_cv___va_copy=${lftp_cv___va_copy=yes}
+slrn_cv___va_copy=${slrn_cv___va_copy=yes}
+slrn_cv_va_copy=${slrn_cv_va_copy=yes}
+dpkg_cv_va_copy=${ac_cv_va_copy=yes}
+dpkg_cv___va_copy=${ac_cv___va_copy=yes}
+
diff --git a/site/common-linux b/site/common-linux
new file mode 100644
index 0000000000..aeb256b4a9
--- /dev/null
+++ b/site/common-linux
@@ -0,0 +1,2 @@
+# apr
+ac_cv_file__dev_zero=${ac_cv_file__dev_zero=yes}
diff --git a/site/powerpc-common b/site/powerpc-common
index 46dd9680fa..278736e74a 100644
--- a/site/powerpc-common
+++ b/site/powerpc-common
@@ -3,6 +3,7 @@ ac_cv_func_setpgrp_void=yes
ac_cv_func_setgrent_void=yes
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_malloc_works=yes
+ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
ac_cv_func_setvbuf_reversed=no
ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
@@ -33,7 +34,8 @@ ac_cv_ulong=${ac_cv_ulong=yes}
ac_cv_ushort=${ac_cv_ushort=yes}
ac_cv_time_r_type=${ac_cv_time_r_type=POSIX}
cookie_io_functions_use_off64_t=${cookie_io_functions_use_off64_t=yes}
-
+ac_cv_va_copy=${ac_cv_va_copy=yes}
+ac_cv___va_copy=${ac_cv___va_copy=yes}
# apache
ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
@@ -321,3 +323,6 @@ ac_cv_conv_longlong_to_float=${ac_cv_conv_longlong_to_float=yes}
# sudo
sudo_cv_uid_t_len=${sudo_cv_uid_t_len=10}
+# dpkg
+dpkg_cv_va_copy=${ac_cv_va_copy=yes}
+dpkg_cv___va_copy=${ac_cv___va_copy=yes}
diff --git a/site/sh-common b/site/sh-common
index e8228fdb31..b5605507fd 100644
--- a/site/sh-common
+++ b/site/sh-common
@@ -3,6 +3,7 @@ ac_cv_func_setgrent_void=yes
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_malloc_works=yes
ac_cv_func_posix_getpwuid_r=${ac_cv_func_posix_getpwuid_r=yes}
+ac_cv_func_posix_getgrgid_r=${ac_cv_func_posix_getgrgid_r=yes}
ac_cv_func_setvbuf_reversed=no
ac_cv_sizeof___int64=${ac_cv_sizeof___int64=0}
ac_cv_sizeof_char=${ac_cv_sizeof_char=1}