Эх сурвалжийг харах

Merge branch 'master' of git+ssh://openadk.org/git/openadk

Waldemar Brodkorb 15 жил өмнө
parent
commit
d22b78be7b
100 өөрчлөгдсөн 1724 нэмэгдсэн , 2192 устгасан
  1. 1 6
      TODO
  2. 4 2
      mk/build.mk
  3. 10 0
      mk/image.mk
  4. 7 7
      mk/modules.mk
  5. 7 2
      mk/rootfs.mk
  6. 4 1
      package/Config.in
  7. 22 4
      package/MesaLib/Makefile
  8. 11 0
      package/MesaLib/patches/patch-src_glsl_Makefile
  9. 0 11
      package/MesaLib/patches/patch-src_glsl_Makefile_template
  10. 1 1
      package/MesaLib/patches/patch-src_glsl_apps_Makefile
  11. 7 1
      package/adkinstall/Makefile
  12. 36 0
      package/adkinstall/src/adkinstall.rb4xx
  13. 6 0
      package/base-files/src/lib/mdev/init
  14. 4 0
      package/base-files/src/sbin/adkupdate
  15. 1 0
      package/bash/Makefile
  16. 1 4
      package/binutils/Makefile
  17. 29 0
      package/ccid/Makefile
  18. 1 1
      package/cfgfs/Makefile
  19. 2 0
      package/cyrus-sasl/Makefile
  20. 0 4
      package/davfs2/Config.in.kernel
  21. 2 2
      package/davfs2/Makefile
  22. 2 1
      package/firefox/Makefile
  23. 18 0
      package/firefox/patches/patch-gfx_qcms_iccread_c
  24. 3 2
      package/firefox/patches/patch-gfx_qcms_qcmstypes_h
  25. 5 3
      package/gdb/Makefile
  26. 2 0
      package/gdbserver/Makefile
  27. 28 0
      package/gpm/files/gpm.init
  28. 4 0
      package/gpm/files/gpm.postinst
  29. 18 0
      package/grep/patches/patch-src_system_h
  30. 2 0
      package/krb5/Makefile
  31. 2 2
      package/libXdamage/Makefile
  32. 2 2
      package/libXfixes/Makefile
  33. 1 1
      package/libXxf86vm/Makefile
  34. 10 0
      package/libpri/patches/patch-Makefile
  35. 10 10
      package/lynx/Makefile
  36. 34 0
      package/lynx/patches/patch-WWW_Library_Implementation_HTUtils_h
  37. 0 17
      package/lynx/patches/patch-WWW_Library_Implementation_www_tcp_h
  38. 0 15
      package/lynx/patches/patch-config_hin
  39. 0 236
      package/lynx/patches/patch-lynx_cfg
  40. 0 22
      package/lynx/patches/patch-makefile_in
  41. 0 15
      package/lynx/patches/patch-samples_lynx_lss
  42. 0 15
      package/lynx/patches/patch-src_LYUtils_c
  43. 0 11
      package/lynx/patches/patch-src_chrtrans_makefile_in
  44. 16 5
      package/lynx/patches/patch-src_chrtrans_makeuctb_c
  45. 0 65
      package/lynx/patches/patch-userdefs_h
  46. 1 1
      package/nand/Makefile
  47. 6 1
      package/nspr/Makefile
  48. 2 2
      package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in
  49. 21 0
      package/nspr/patches/patch-mozilla_nsprpub_configure
  50. 4 3
      package/nss/Makefile
  51. 3 2
      package/opensc/Makefile
  52. 2 0
      package/openswan/Makefile
  53. 2 2
      package/openvpn/Makefile
  54. 32 0
      package/pcmciautils/Makefile
  55. 34 0
      package/pcmciautils/files/config.opts
  56. 17 0
      package/pcmciautils/patches/patch-Makefile
  57. 36 0
      package/pcsc-lite/Makefile
  58. 27 0
      package/pcsc-lite/files/pcscd.init
  59. 3 0
      package/pcsc-lite/files/pcscd.postinst
  60. 16 0
      package/pcsc-lite/files/reader.conf
  61. 3 1
      package/pdnsd/Makefile
  62. 11 0
      package/pdnsd/patches/patch-src_Makefile_in
  63. 2 0
      package/php/Makefile
  64. 3 3
      package/pptpd/Makefile
  65. 0 20
      package/pptpd/patches/bad-pqueue-debug.patch
  66. 11 0
      package/pptpd/patches/patch-Makefile_in
  67. 5 6
      package/pptpd/patches/patch-ctrlpacket_c
  68. 20 0
      package/pptpd/patches/patch-plugins_Makefile
  69. 0 35
      package/pptpd/patches/pptpgre-use-debug-option.patch
  70. 2 2
      package/proftpd/Makefile
  71. 4 4
      package/proftpd/patches/patch-Make_rules_in
  72. 6 6
      package/proftpd/patches/patch-Makefile_in
  73. 29 0
      package/proftpd/patches/patch-modules_mod_auth_unix_c
  74. 1 1
      package/python/Makefile
  75. 0 32
      package/swconfig/Makefile
  76. 0 12
      package/swconfig/src/Makefile
  77. 0 255
      package/swconfig/src/cli.c
  78. 0 614
      package/swconfig/src/swlib.c
  79. 0 213
      package/swconfig/src/swlib.h
  80. 27 0
      package/sysfsutils/Makefile
  81. 3 2
      package/xorg-server/Makefile
  82. 0 17
      package/xorg-server/patches/patch-hw_xfree86_common_xf86VGAarbiter_c
  83. 14 21
      package/xorg-server/patches/patch-hw_xfree86_loader_sdksyms_c
  84. 13 4
      package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c
  85. 5 4
      scripts/scan-pkgs.sh
  86. 5 3
      scripts/scan-tools.sh
  87. 65 47
      target/Config.in
  88. 18 85
      target/ag241/patches/ar7.patch
  89. 2 2
      target/ag241/target.mk
  90. 4 4
      target/alix1c/Makefile
  91. 2 2
      target/alix1c/target.mk
  92. 4 3
      target/alix2d/Makefile
  93. 2 2
      target/alix2d/target.mk
  94. 4 4
      target/alix2d13/Makefile
  95. 2 2
      target/alix2d13/target.mk
  96. 32 0
      target/brcm/Makefile
  97. 2 1
      target/brcm/files/etc/mdev.conf
  98. 248 306
      target/brcm/kernel.config
  99. 433 0
      target/brcm/patches/flash-map.patch
  100. 223 0
      target/brcm/patches/nvram.patch

+ 1 - 6
TODO

@@ -1,9 +1,4 @@
-- php update
-- openssh update
+- add support for brcm 2.6
 - macos x build
-- test on OpenSuSE
-- test on Fedora Core
 - help text for config/ needs adoption
 - fix watchdog for alix1c (mfgpt timers problem)
-- implement rpm package backend 
-- implement dpkg package backend 

+ 4 - 2
mk/build.mk

@@ -13,9 +13,11 @@ CONFIG = config
 DEFCONFIG=		ADK_DEVELSYSTEM=n \
 			ADK_DEBUG=n \
 			ADK_STATIC=n \
-			ADK_MAKE_PARALLEL=n \
+			ADK_MAKE_PARALLEL=y \
+			ADK_MAKE_JOBS=4 \
 			ADK_FORCE_PARALLEL=n \
 			ADK_PACKAGE_GRUB=n \
+			ADK_PACKAGE_XORG_SERVER_WITH_DRI=n \
 			ADK_PACKAGE_AUFS2_UTIL=n \
 			ADK_PACKAGE_BASE_FILES=y \
 			ADK_PACKAGE_GCC=n \
@@ -431,7 +433,7 @@ bulk:
 			$(GMAKE) VERBOSE=1 all; \
 		rm .config; \
 	    ) 2>&1 | tee $(TOPDIR)/bin/$${target}_$$libc/$$target-$$libc-$$fs.log; \
-	done <${TOPDIR}/target/bulk.lst
+	done <${TOPDIR}/target/bulkdef.lst
 
 bulktoolchain:
 	@while read target libc; do \

+ 10 - 0
mk/image.mk

@@ -70,6 +70,8 @@ ${BIN_DIR}/${INITRAMFS}: ${TARGET_DIR}
 	    cpio -R 0:0 -oC512 -Mdist -Hnewc | ${ADK_COMPRESSION_TOOL} >$@
 
 ${BUILD_DIR}/${INITRAMFS_PIGGYBACK}: ${TARGET_DIR}
+	$(SED) 's#^CONFIG_INITRAMFS_SOURCE.*#CONFIG_INITRAMFS_SOURCE="${BUILD_DIR}/${INITRAMFS_PIGGYBACK}"#' \
+		$(LINUX_DIR)/.config
 	cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \
 	    cpio -R 0:0 -oC512 -Mdist -Hnewc >$@
 
@@ -81,5 +83,13 @@ ${BIN_DIR}/${ROOTFSSQUASHFS}: ${TARGET_DIR}
 		${BUILD_DIR}/root.squashfs > \
 		${BUILD_DIR}/${ROOTFSSQUASHFS}
 
+createinitramfs:
+	@-rm $(LINUX_DIR)/usr/initramfs_data.cpio* $(MAKE_TRACE)
+	echo N | \
+	$(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
+		ARCH=$(ARCH) CC="$(TARGET_CC)" oldconfig $(MAKE_TRACE) 
+	$(MAKE) -C $(LINUX_DIR) V=1 CROSS_COMPILE="$(TARGET_CROSS)" \
+		ARCH=$(ARCH) CC="$(TARGET_CC)" $(MAKE_TRACE)
+
 imageclean:
 	rm -f $(BIN_DIR)/$(ADK_TARGET)-* ${BUILD_DIR}/$(ADK_TARGET)-*

+ 7 - 7
mk/modules.mk

@@ -1047,18 +1047,18 @@ $(eval $(call KMOD_template,PCCARD,pccard,\
 	$(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia_core \
 ,40))
 
-$(eval $(call KMOD_template,PCMCIA,pcmcia,\
-	$(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia \
-,50))
-
-$(eval $(call KMOD_template,CARDBUS,cardbus,\
+$(eval $(call KMOD_template,YENTA,yenta,\
 	$(MODULES_DIR)/kernel/drivers/pcmcia/rsrc_nonstatic \
 	$(MODULES_DIR)/kernel/drivers/pcmcia/yenta_socket \
 ,50))
 
-$(eval $(call KMOD_template,PCMCIA_SERIAL_CS,pcmcia-serial-cs,\
+$(eval $(call KMOD_template,PCMCIA,pcmcia,\
+	$(MODULES_DIR)/kernel/drivers/pcmcia/pcmcia \
+,60))
+
+$(eval $(call KMOD_template,SERIAL_8250_CS,serial-8250-cs,\
 	$(MODULES_DIR)/kernel/drivers/serial/serial_cs \
-,55))
+,70))
 
 #
 # Input

+ 7 - 2
mk/rootfs.mk

@@ -10,6 +10,11 @@ endef
 
 ifeq ($(ADK_LINUX_MIPS_RB532),y)
 ROOTFS:=	root=/dev/sda2
+MTDDEV:=	root=/dev/mtdblock1
+endif
+
+ifeq ($(ADK_LINUX_MIPS_RB433),y)
+MTDDEV:=	root=/dev/mtdblock2
 endif
 
 ifeq ($(ADK_LINUX_ARM_FOXBOARD),y)
@@ -17,12 +22,12 @@ ROOTFS:=	root=/dev/mmcblk0p2 rootwait
 endif
 
 $(eval $(call rootfs_template,ext2-block,EXT2_BLOCK,$(ROOTFS)))
-$(eval $(call rootfs_template,usb,USB,root=/dev/sdb1 rootdelay=10))
+$(eval $(call rootfs_template,usb,USB,root=/dev/sdb1 rootdelay=5))
 $(eval $(call rootfs_template,archive,ARCHIVE))
 $(eval $(call rootfs_template,initramfs,INITRAMFS))
 $(eval $(call rootfs_template,initramfs-piggyback,INITRAMFS_PIGGYBACK))
 $(eval $(call rootfs_template,squashfs,SQUASHFS))
-$(eval $(call rootfs_template,yaffs,YAFFS,root=/dev/mtdblock1 panic=3))
+$(eval $(call rootfs_template,yaffs,YAFFS,$(MTDDEV) panic=3))
 $(eval $(call rootfs_template,nfsroot,NFSROOT,root=/dev/nfs ip=dhcp init=/init))
 $(eval $(call rootfs_template,encrypted,ENCRYPTED))
 

+ 4 - 1
package/Config.in

@@ -56,6 +56,7 @@ source "package/xz/Config.in"
 endmenu
 
 menu "Cryptography"
+source "package/ccid/Config.in"
 source "package/cryptsetup/Config.in"
 source "package/gnupg/Config.in"
 source "package/gnutls/Config.in"
@@ -65,6 +66,7 @@ source "package/openct/Config.in"
 source "package/opensc/Config.in"
 source "package/openssl/Config.in"
 source "package/openssl-pkcs11/Config.in"
+source "package/pcsc-lite/Config.in"
 source "package/rng-tools/Config.in"
 endmenu
 
@@ -579,11 +581,12 @@ source "package/hdparm/Config.in"
 source "package/usbutils/Config.in"
 source "package/patch/Config.in"
 source "package/pciutils/Config.in"
+source "package/pcmciautils/Config.in"
 source "package/procps/Config.in"
 source "package/sispmctl/Config.in"
 source "package/stress/Config.in"
+source "package/sysfsutils/Config.in"
 source "package/sysstat/Config.in"
-source "package/swconfig/Config.in"
 source "package/udev/Config.in"
 source "package/watchdog/Config.in"
 endmenu

+ 22 - 4
package/MesaLib/Makefile

@@ -9,14 +9,15 @@ PKG_RELEASE:=		1
 PKG_MD5SUM:=		62e8e47cbd63741b4bbe634dcdc8a56a
 PKG_DESCR:=		MESA library
 PKG_SECTION:=		libs
-PKG_DEPENDS:=		libxdamage libxfixes
-PKG_BUILDDEP+=		libXdamage libXfixes libXxf86vm
-PKG_URL:=		add project url
+PKG_DEPENDS:=		libxdamage libxfixes libdrm
+PKG_BUILDDEP+=		libXdamage libXfixes libXxf86vm libdrm 
+PKG_BUILDDEP+=		dri2proto glproto expat
+PKG_URL:=		http://www.mesa3d.org/
 PKG_SITES:=		ftp://ftp.freedesktop.org/pub/mesa/7.8.1/
 
 WRKDIST=		${WRKDIR}/Mesa-${PKG_VERSION}
 
-PKG_TARGET_DEPENDS:=  	x86 x86_64
+PKG_TARGET_DEPENDS:=  	ibmx40
 
 include $(TOPDIR)/mk/package.mk
 
@@ -24,10 +25,27 @@ $(eval $(call PKG_template,MESALIB,mesalib,$(PKG_VERSION)-${PKG_RELEASE},${PKG_D
 
 CONFIGURE_ARGS+=	--disable-static \
 			--disable-gallium \
+			--disable-glw \
+			--with-driver=dri \
 			--without-demos
 
 XAKE_FLAGS+=		APP_CC=${HOSTCC} HOST_CC=${HOSTCC}
 
+pre-configure:
+	(cd ${WRKBUILD}; rm -rf config.{cache,status}; \
+		./configure \
+		--disable-static \
+		--disable-glw \
+		--disable-gallium \
+		--with-driver=xlib \
+		--without-demos \
+	);
+	${MAKE} -C ${WRKBUILD}/src/glsl
+	${MAKE} -C ${WRKBUILD}/src/glsl/apps
+	cp ${WRKBUILD}/src/glsl/apps/compile \
+		${STAGING_TOOLS}/bin
+	${MAKE} -C ${WRKBUILD}/src/glsl clean
+
 post-install:
 	$(INSTALL_DIR) $(IDIR_MESALIB)/usr/lib
 	$(INSTALL_BIN) $(WRKINST)/usr/lib/libGL*.so* \

+ 11 - 0
package/MesaLib/patches/patch-src_glsl_Makefile

@@ -0,0 +1,11 @@
+--- Mesa-7.8.1.orig/src/glsl/Makefile	2010-04-05 01:46:26.000000000 +0200
++++ Mesa-7.8.1/src/glsl/Makefile	2010-05-21 17:17:54.621613561 +0200
+@@ -4,7 +4,7 @@ TOP = ../..
+ 
+ include $(TOP)/configs/current
+ 
+-SUBDIRS = pp cl apps
++SUBDIRS = pp cl
+ 
+ default install clean:
+ 	@for dir in $(SUBDIRS) ; do \

+ 0 - 11
package/MesaLib/patches/patch-src_glsl_Makefile_template

@@ -1,11 +0,0 @@
---- Mesa-7.8.1.orig/src/glsl/Makefile.template	2010-04-05 01:46:26.000000000 +0200
-+++ Mesa-7.8.1/src/glsl/Makefile.template	2010-04-19 21:18:45.000000000 +0200
-@@ -44,7 +44,7 @@ install:
- ##### RULES #####
- 
- .c.o:
--	$(CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
-+	$(HOST_CC) -c $(INCLUDES) $(CFLAGS) $(LIBRARY_DEFINES) $< -o $@
- 
- -include depend
- 

+ 1 - 1
package/MesaLib/patches/patch-src_glsl_apps_Makefile

@@ -1,5 +1,5 @@
 --- Mesa-7.8.1.orig/src/glsl/apps/Makefile	2010-04-05 01:46:26.000000000 +0200
-+++ Mesa-7.8.1/src/glsl/apps/Makefile	2010-04-19 21:20:55.000000000 +0200
++++ Mesa-7.8.1/src/glsl/apps/Makefile	2010-05-25 17:38:03.594714854 +0200
 @@ -26,10 +26,10 @@ INCLUDES = -I.
  .SUFFIXES: .c
  

+ 7 - 1
package/adkinstall/Makefile

@@ -10,7 +10,7 @@ PKG_DESCR:=		installer for cf, mmc, sd or mtd devices
 PKG_SECTION:=		base
 PKG_DEPENDS:=		parted sfdisk e2fsprogs
 
-PKG_TARGET_DEPENDS:=	alix wrap rb532 foxg20
+PKG_TARGET_DEPENDS:=	alix wrap routerboard foxg20
 
 WRKDIST=		${WRKDIR}/${PKG_NAME}-${PKG_VERSION}
 NO_DISTFILES:=		1
@@ -34,6 +34,12 @@ ifeq ($(ADK_LINUX_MIPS_RB532),y)
 else ifeq ($(ADK_LINUX_ARM_FOXBOARD),y)
 	${INSTALL_BIN} ./src/adkinstall.foxg20 \
 		$(IDIR_ADKINSTALL)/sbin/adkinstall
+else ifeq ($(ADK_LINUX_MIPS_RB433),y)
+	${INSTALL_BIN} ./src/adkinstall.rb4xx \
+		$(IDIR_ADKINSTALL)/sbin/adkinstall
+else ifeq ($(ADK_LINUX_MIPS_RB411),y)
+	${INSTALL_BIN} ./src/adkinstall.rb4xx \
+		$(IDIR_ADKINSTALL)/sbin/adkinstall
 else
 	${INSTALL_BIN} ./src/adkinstall $(IDIR_ADKINSTALL)/sbin
 endif

+ 36 - 0
package/adkinstall/src/adkinstall.rb4xx

@@ -0,0 +1,36 @@
+#!/bin/sh
+# installs a rootfs tar archive from OpenADK onto 
+# a NAND device
+# special script for routerboard rb4xx
+
+if [ -z $1 ];then
+        printf "Please give your root tar archive as parameter\n"
+        exit 1
+fi
+
+printf "Preparing mountpoints\n"
+mount -t yaffs2 /dev/mtdblock2 /mnt
+rm -rf /mnt/* >/dev/null 2>&1
+mkdir /mnt/boot
+mount -t yaffs2 /dev/mtdblock1 /mnt/boot
+
+printf "Extracting install archive\n"
+tar -C /mnt -xzpf $1
+if [ $? -ne 0 ];then
+	printf "Extracting of install archive failed"
+	exit 1
+fi
+
+chmod 1777 /mnt/tmp
+chmod 4755 /mnt/bin/busybox
+
+sync
+umount /mnt/boot
+umount /mnt
+if [ $? -ne 0 ];then
+	printf "Unmounting filesystem failed"
+	exit 1
+else
+	printf "Successfully installed.\n"
+	exit 0
+fi

+ 6 - 0
package/base-files/src/lib/mdev/init

@@ -14,3 +14,9 @@ if [ "$SUBSYSTEM" == "firmware" ];then
                 fi
         fi
 fi
+if [ "$SUBSYSTEM" == "pcmcia_socket" ];then
+	logger "Setting up PCMCIA socket resource database"
+	if [ "$ACTION" == "add" ];then
+		/usr/sbin/pcmcia-socket-startup
+	fi
+fi

+ 4 - 0
package/base-files/src/sbin/adkupdate

@@ -34,6 +34,8 @@ prepare() {
 	mount -o remount,rw /
 	if [ "$system" == "RB532" ];then
 		mount -t yaffs2 /dev/mtdblock0 /boot
+	elif [ "$system" == "AR7130" ];then
+		mount -t yaffs2 /dev/mtdblock1 /boot
 	elif [ "$system" == "FOXG20" ];then
 		mount -t vfat /dev/mmcblk0p1 /boot
 	fi
@@ -89,6 +91,8 @@ if [ -x /sbin/cfgfs ];then
 fi
 if [ "$system" == "RB532" ];then
 	umount -f /boot
+elif [ "$system" == "AR7130" ];then
+	umount -f /boot
 elif [ "$system" == "FOXG20" ];then
 	umount -f /boot
 fi

+ 1 - 0
package/bash/Makefile

@@ -16,6 +16,7 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,BASH,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+CONFIGURE_ENV+=		bash_cv_getenv_redef=no
 XAKE_FLAGS+=		LIBS_FOR_BUILD=''
 
 post-install:

+ 1 - 4
package/binutils/Makefile

@@ -6,6 +6,7 @@ include ${TOPDIR}/toolchain/binutils/Makefile.inc
 
 PKG_DESCR:=		binary utilities (nm, objdump, ar, as, ..)
 PKG_SECTION:=		comp
+PKG_HOST_DEPENDS:=      !cygwin
 
 include ${TOPDIR}/mk/package.mk
 
@@ -16,10 +17,6 @@ CONFIGURE_ARGS+=	--disable-werror \
 			--host=$(REAL_GNU_TARGET_NAME) \
 			--target=$(REAL_GNU_TARGET_NAME)
 
-post-patch:
-	${PREVENT_PATCH} ${PATCH} ${WRKDIST} \
-	    ${TOPDIR}/toolchain/binutils/patches \*.patch
-
 post-install:
 	${INSTALL_DIR} ${IDIR_BINUTILS}/usr/lib
 	$(CP) ${WRKINST}/usr/lib/*.so ${IDIR_BINUTILS}/usr/lib

+ 29 - 0
package/ccid/Makefile

@@ -0,0 +1,29 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=		ccid
+PKG_VERSION:=		1.3.12
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		7fcdbacacd955659286f988fa9b6e0be
+PKG_DESCR:=		a generic USB CCID and ICCD driver
+PKG_SECTION:=		security
+PKG_BUILDDEP+=		pcsc-lite
+PKG_URL:=		http://pcsclite.alioth.debian.org/ccid.html
+PKG_SITES:=		https://alioth.debian.org/frs/download.php/3281/
+
+DISTFILES:=             ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,CCID,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_ARGS+=	--enable-twinserial
+
+post-install:
+	$(INSTALL_DIR) $(IDIR_CCID)/usr/pcsc/drivers/serial
+	$(CP) $(WRKINST)/usr/pcsc/drivers/serial/libccidtwin.so* \
+		$(IDIR_CCID)/usr/pcsc/drivers/serial
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 1 - 1
package/cfgfs/Makefile

@@ -9,7 +9,7 @@ PKG_RELEASE:=		2
 PKG_DESCR:=		compressed config filesystem
 PKG_SECTION:=		base
 
-PKG_TARGET_DEPENDS:=	alix wrap foxboard ag241 rb532 foxg20
+PKG_TARGET_DEPENDS:=	alix wrap foxboard ag241 foxg20 routerboard
 
 WRKDIST=		${WRKDIR}/${PKG_NAME}-${PKG_VERSION}
 NO_DISTFILES:=		1

+ 2 - 0
package/cyrus-sasl/Makefile

@@ -14,6 +14,8 @@ PKG_BUILDDEP+=		openssl
 PKG_URL:=		http://asg.web.cmu.edu/sasl
 PKG_SITES:=		http://ftp.andrew.cmu.edu/pub/cyrus-mail/
 
+PKG_NOPARALLEL:=	1
+
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,LIBSASL2,libsasl2,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

+ 0 - 4
package/davfs2/Config.in.kernel

@@ -4,13 +4,9 @@ depends on ADK_PACKAGE_DAVFS2
 
 config ADK_PACKAGE_DAVFS2_FUSE
        bool "use the FUSE filesystem interface"
-       select ADK_PACKAGE_FUSE_UTILS
 config ADK_PACKAGE_DAVFS2_CODA
        bool "use the CODA filesystem interface"
-       select ADK_KPACKAGE_KMOD_CODA_FS
 config ADK_PACKAGE_DAVFS2_BOTH
        bool "use both filesystem interfaces"
-       select ADK_PACKAGE_FUSE_UTILS
-       select ADK_KPACKAGE_KMOD_CODA_FS
 endchoice
 

+ 2 - 2
package/davfs2/Makefile

@@ -16,8 +16,6 @@ endif
 PKG_URL:=		http://savannah.nongnu.org/projects/davfs2
 PKG_SITES=		${MASTER_SITE_SOURCEFORGE:=dav/}
 
-include ${TOPDIR}/mk/package.mk
-
 ifeq (${ADK_PACKAGE_DAVFS2_FUSE},y)
 PKG_DEPENDS:=			fuse-utils kmod-fuse-fs libiconv neon
 else ifeq (${ADK_PACKAGE_DAVFS2_CODA},y)
@@ -26,6 +24,8 @@ else
 PKG_DEPENDS:=			kmod-coda-fs fuse-utils kmod-fuse-fs libiconv neon
 endif
 
+include ${TOPDIR}/mk/package.mk
+
 $(eval $(call PKG_template,DAVFS2,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
 CONFIGURE_ARGS+=	--with-neon

+ 2 - 1
package/firefox/Makefile

@@ -11,6 +11,7 @@ PKG_DESCR:=		graphical webbrowser
 PKG_SECTION:=		x11
 PKG_DEPENDS:=		libpthread alsa-lib dbus-glib glib gtk+ libnotify libidl
 PKG_DEPENDS+=		nspr nss libjpeg atk pango cairo libxt libx11 libstdcxx
+PKG_DEPENDS+=		libxdamage libxfixes
 PKG_BUILDDEP+=		alsa-lib dbus-glib glib gtk+ libnotify libIDL libX11 libXt
 PKG_BUILDDEP+=		nspr nss jpeg
 PKG_URL:=		http://www.mozilla.org/
@@ -19,7 +20,7 @@ PKG_SITES:=		http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.6.3/
 DISTFILES:=             ${PKG_NAME}-${PKG_VERSION}.source.tar.bz2
 
 WRKDIST=		${WRKDIR}/mozilla-1.9.2
-PKG_TARGET_DEPENDS:=	alix1c x86_qemu x86_64_qemu shuttle
+PKG_TARGET_DEPENDS:=	alix1c x86_qemu x86_64_qemu shuttle ibmx40
 
 include $(TOPDIR)/mk/package.mk
 

+ 18 - 0
package/firefox/patches/patch-gfx_qcms_iccread_c

@@ -0,0 +1,18 @@
+--- mozilla-1.9.2.orig/gfx/qcms/iccread.c	2010-04-02 18:02:27.000000000 +0200
++++ mozilla-1.9.2/gfx/qcms/iccread.c	2010-04-30 14:00:52.430967966 +0200
+@@ -23,6 +23,7 @@
+ #include <math.h>
+ #include <assert.h>
+ #include <stdlib.h>
++#include <stdio.h>
+ #include "qcmsint.h"
+ 
+ //XXX: use a better typename
+@@ -771,7 +772,6 @@ void qcms_profile_release(qcms_profile *
+ 	qcms_profile_fini(profile);
+ }
+ 
+-#include <stdio.h>
+ qcms_profile* qcms_profile_from_file(FILE *file)
+ {
+ 	uint32_t length, remaining_length;

+ 3 - 2
package/firefox/patches/patch-gfx_qcms_qcmstypes_h

@@ -1,6 +1,6 @@
 --- mozilla-1.9.2.orig/gfx/qcms/qcmstypes.h	2010-04-02 18:02:27.000000000 +0200
-+++ mozilla-1.9.2/gfx/qcms/qcmstypes.h	2010-04-11 14:57:54.000000000 +0200
-@@ -11,22 +11,11 @@
++++ mozilla-1.9.2/gfx/qcms/qcmstypes.h	2010-04-30 17:58:33.490975825 +0200
+@@ -11,22 +11,12 @@
  /* int_types.h gets included somehow, so avoid redefining the types differently */
  #include <sys/int_types.h>
  #else
@@ -13,6 +13,7 @@
 -typedef PRInt64 int64_t;
 -typedef PRUint64 uint64_t;
 -
++#include <stdint.h>
  #ifdef __OS2__
  /* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
  #include <stdlib.h>

+ 5 - 3
package/gdb/Makefile

@@ -6,10 +6,12 @@ include ${TOPDIR}/toolchain/gdb/Makefile.inc
 
 PKG_DESCR:=		GNU debugger
 PKG_SECTION:=		comp
-PKG_DEPENDS:=		libthread-db libncurses libiconv
-PKG_BUILDDEP+=		ncurses readline libiconv
+PKG_DEPENDS:=		libthread-db libncurses libiconv libexpat
+PKG_BUILDDEP+=		ncurses readline libiconv expat
 PKG_TARGET_DEPENDS:=	!foxboard !ag241
 
+PKG_NOPARALLEL:=	1
+
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,GDB,gdb,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
@@ -19,7 +21,7 @@ CONFIGURE_ARGS+=	--without-uiout --enable-gdbmi \
 			--disable-tui --disable-gdbtk --without-x \
 			--without-included-gettext --disable-sim \
 			--enable-threads --with-curses --disable-werror \
-			--enable-static
+			--enable-static --without-python
 XAKE_FLAGS+=		LDFLAGS='${TLDFLAGS}'
 
 post-install:

+ 2 - 0
package/gdbserver/Makefile

@@ -8,6 +8,8 @@ PKG_DESCR:=		GNU debugger (small server)
 PKG_SECTION:=		comp
 PKG_DEPENDS:=		libthread-db
 
+PKG_TARGET_DEPENDS:=    !foxboard 
+
 include ${TOPDIR}/mk/package.mk
 
 WRKSRC=                 ${WRKDIST}/gdb/gdbserver

+ 28 - 0
package/gpm/files/gpm.init

@@ -0,0 +1,28 @@
+#!/bin/sh
+#PKG gpm
+#INIT 80
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+	test x"${gpm:-NO}" = x"NO" && exit 0
+	exec sh $0 start
+	;;
+start)
+	/usr/sbin/gpm $gpm_flags
+	;;
+stop)
+	pkill gpm
+	;;
+restart)
+	sh $0 stop
+	sh $0 start
+	;;
+*)
+	echo "Usage: $0 {start | stop | restart}"
+	exit 1
+	;;
+esac
+exit $?

+ 4 - 0
package/gpm/files/gpm.postinst

@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf 'options passed to gpm' gpm_flags "-m /dev/psaux -t ps2"
+add_rcconf gpm gpm NO

+ 18 - 0
package/grep/patches/patch-src_system_h

@@ -0,0 +1,18 @@
+--- grep-2.5.4.orig/src/system.h	2009-01-31 06:39:54.000000000 +0100
++++ grep-2.5.4/src/system.h	2010-05-29 00:08:24.703125000 +0200
+@@ -56,6 +56,7 @@ extern char *sys_errlist[];
+ #ifdef __BEOS__
+ # undef O_BINARY /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
+ #endif
++/*
+ #ifdef HAVE_DOS_FILE_CONTENTS
+ # include <io.h>
+ # ifdef HAVE_SETMODE
+@@ -64,6 +65,7 @@ extern char *sys_errlist[];
+ #  define SET_BINARY(fd)  _setmode (fd, O_BINARY)
+ # endif
+ #endif
++*/
+ 
+ #ifdef HAVE_DOS_FILE_NAMES
+ # define IS_SLASH(c) ((c) == '/' || (c) == '\\')

+ 2 - 0
package/krb5/Makefile

@@ -14,6 +14,8 @@ PKG_BUILDDEP+=		ncurses e2fsprogs
 PKG_URL:=		http://web.mit.edu/kerberos
 PKG_SITES:=		http://web.mit.edu/kerberos/dist/krb5/1.7/
 
+PKG_NOPARALLEL:=	1
+
 PKG_DESCR_LIB:=		MIT kerberos libraries
 PKG_SECTION_LIB:=	libs
 

+ 2 - 2
package/libXdamage/Makefile

@@ -7,7 +7,7 @@ PKG_NAME:=		libXdamage
 PKG_VERSION:=		1.1.2
 PKG_RELEASE:=		1
 PKG_MD5SUM:=		f8f19f747c8445213d5409ae8b8b2f0a
-PKG_DESCR:=		add short description
+PKG_DESCR:=		X Window System client interface to the DAMAGE extension to the X protocol
 PKG_SECTION:=		libs
 PKG_BUILDDEP+=		libXfixes damageproto
 PKG_URL:=		add project url
@@ -19,7 +19,7 @@ $(eval $(call PKG_template,LIBXDAMAGE,libxdamage,$(PKG_VERSION)-${PKG_RELEASE},$
 
 post-install:
 	$(INSTALL_DIR) $(IDIR_LIBXDAMAGE)/usr/lib
-	$(INSTALL_BIN) $(WRKINST)/usr/lib/libXdamage* \
+	$(INSTALL_BIN) $(WRKINST)/usr/lib/libXdamage*.so* \
 		$(IDIR_LIBXDAMAGE)/usr/lib
 
 include ${TOPDIR}/mk/pkg-bottom.mk

+ 2 - 2
package/libXfixes/Makefile

@@ -7,10 +7,10 @@ PKG_NAME:=		libXfixes
 PKG_VERSION:=		4.0.4
 PKG_RELEASE:=		1
 PKG_MD5SUM:=		86eb4b916cd5948c0e20d279107b3331
-PKG_DESCR:=		add short description
+PKG_DESCR:=		X Fixes Library
 PKG_SECTION:=		libs
 PKG_BUILDDEP+=		fixesproto
-PKG_URL:=		add project url
+PKG_URL:=		http://xorg.freedesktop.org
 PKG_SITES:=		http://xorg.freedesktop.org/archive/individual/lib/
 
 include $(TOPDIR)/mk/package.mk

+ 1 - 1
package/libXxf86vm/Makefile

@@ -9,7 +9,7 @@ PKG_RELEASE:=		1
 PKG_MD5SUM:=		52b49483eccbdd1566b8c560fe7f76e8
 PKG_DESCR:=		add short description
 PKG_SECTION:=		libs
-PKG_BUILDDEP+=		xf86vidmodeproto
+PKG_BUILDDEP+=		xf86vidmodeproto libXext
 PKG_SITES:=		http://xorg.freedesktop.org/archive/individual/lib/
 
 include $(TOPDIR)/mk/package.mk

+ 10 - 0
package/libpri/patches/patch-Makefile

@@ -0,0 +1,10 @@
+--- libpri-1.4.10.2.orig/Makefile	2008-08-06 20:20:51.000000000 +0200
++++ libpri-1.4.10.2/Makefile	2010-05-29 09:55:08.750000000 +0200
+@@ -146,7 +146,6 @@ $(STATIC_LIBRARY): $(STATIC_OBJS)
+ 
+ $(DYNAMIC_LIBRARY): $(DYNAMIC_OBJS)
+ 	$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
+-	$(LDCONFIG) $(LDCONFIG_FLAGS) .
+ 	ln -sf libpri.so.$(SONAME) libpri.so
+ 
+ version.c: FORCE

+ 10 - 10
package/lynx/Makefile

@@ -4,16 +4,15 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME=		lynx
-PKG_VERSION=		2.8.7dev.7
-PKG_RELEASE=		2
-PKG_MD5SUM=		83891107c873421e5ac917cc0ab53fe8
+PKG_VERSION=		2.8.7
+PKG_RELEASE=		1
+PKG_MD5SUM=		124253e635f7c76bdffc47b9d036c812
 PKG_DESCR:=		Standard text browser
 PKG_SECTION:=		text
 PKG_DEPENDS:=		libncurses libopenssl zlib
 PKG_BUILDDEP+=		ncurses openssl zlib
-PKG_URL:=		http://lynx.isc.org
-PKG_SITES=		http://lynx.isc.org/current/ \
-			${MASTER_SITE_MIRBSD}
+PKG_URL:=		http://lynx.isc.org/
+PKG_SITES=		http://lynx.isc.org/${PKG_NAME}${PKG_VERSION}/
 
 DISTFILES=		${PKG_NAME}${PKG_VERSION}.tar.gz
 WRKDIST=		${WRKDIR}/lynx2-8-7
@@ -22,7 +21,6 @@ include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,LYNX,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
-TCPPFLAGS+=		-DLYNX_VERSION=\"${PKG_VERSION}-${PKG_RELEASE}\"
 TCPPFLAGS+=		-I${STAGING_DIR}/include/openssl
 TCPPFLAGS+=		-DUSE_OPENSSL_INCL -DUSE_X509_SUPPORT
 TLDFLAGS+=		-lz
@@ -40,11 +38,11 @@ CONFIGURE_ENV+=		ac_cv_path_TELNET=telnet \
 			ac_cv_path_RM=rm \
 			ac_cv_path_UUDECODE=uudecode \
 			ac_cv_path_ZCAT=zcat \
-			ac_cv_path_ZIP=zip
+			ac_cv_path_ZIP=zip \
+			ac_cv_path_NCURSES_CONFIG=${STAGING_DIR}/scripts/ncurses5-config
 
 CONFIGURE_ARGS+=	\
 			--disable-warnings \
-			--disable-nls \
 			--without-gnutls \
 			--without-socks \
 			--without-socks5 \
@@ -63,6 +61,7 @@ CONFIGURE_ARGS+=	\
 			--without-x \
 			--with-zlib=${STAGING_DIR}/usr \
 			--with-ssl=${STAGING_DIR}/usr \
+			--with-curses-dir=${STAGING_DIR}/usr \
 			--disable-full-paths \
 			--with-cfg-file=/etc/lynx.cfg \
 			--with-lss-file=/etc/lynx.lss \
@@ -77,7 +76,8 @@ CONFIGURE_ARGS+=	\
 			--disable-dired \
 			--with-screen=ncurses \
 			--disable-widec \
-			--disable-locale-charset
+			--disable-locale-charset \
+			--with-build-cppflags="-I/usr/include/ncurses"
 
 MAKE_FILE:=		makefile
 

+ 34 - 0
package/lynx/patches/patch-WWW_Library_Implementation_HTUtils_h

@@ -0,0 +1,34 @@
+--- lynx2-8-7.orig/WWW/Library/Implementation/HTUtils.h	2009-05-25 23:05:31.000000000 +0200
++++ lynx2-8-7/WWW/Library/Implementation/HTUtils.h	2010-05-29 12:56:42.125000000 +0200
+@@ -677,6 +677,8 @@ extern int WWW_TraceMask;
+ 
+ #define SHORTENED_RBIND		/* FIXME: do this in configure-script */
+ 
++#ifdef DONT_USE_SSL
++#else
+ #ifdef USE_SSL
+ 
+ #define free_func free__func
+@@ -717,6 +719,7 @@ extern int WWW_TraceMask;
+ 
+ #undef free_func
+ #endif /* USE_SSL */
++#endif
+ 
+ #ifdef HAVE_LIBDMALLOC
+ #include <dmalloc.h>		/* Gray Watson's library */
+@@ -747,11 +750,14 @@ extern "C" {
+ 
+     extern FILE *TraceFP(void);
+ 
++#ifdef DONT_USE_SSL
++#else
+ #ifdef USE_SSL
+     extern SSL *HTGetSSLHandle(void);
+     extern void HTSSLInitPRNG(void);
+     extern int HTGetSSLCharacter(void *handle);
+ #endif				/* USE_SSL */
++#endif
+ 
+ #ifdef __cplusplus
+ }

+ 0 - 17
package/lynx/patches/patch-WWW_Library_Implementation_www_tcp_h

@@ -1,17 +0,0 @@
---- lynx2-8-7.orig/WWW/Library/Implementation/www_tcp.h	2007-08-03 01:24:27.000000000 +0200
-+++ lynx2-8-7/WWW/Library/Implementation/www_tcp.h	2009-06-13 12:34:28.000000000 +0200
-@@ -777,12 +777,14 @@ Defaults
- #ifndef NO_IOCTL
- #include <sys/ioctl.h>		/* EJB */
- #endif /* !NO_IOCTL */
-+#ifndef HOSTBUILD
- #include <sys/socket.h>
- #include <netinet/in.h>
- #ifdef HAVE_ARPA_INET_H
- #include <arpa/inet.h>		/* Must be after netinet/in.h */
- #endif
- #include <netdb.h>
-+#endif
- #endif /* TCP includes */
- 
- typedef unsigned short PortNumber;

+ 0 - 15
package/lynx/patches/patch-config_hin

@@ -1,15 +0,0 @@
-This will expand to
-| #define ICONV_CONST <tabs> AM_ICONV */
-otherwise.
-
---- lynx2-8-7.orig/config.hin	2007-08-03 01:24:27.000000000 +0200
-+++ lynx2-8-7/config.hin	2009-06-13 11:46:29.000000000 +0200
-@@ -176,7 +176,7 @@
- #undef HAVE___ARGZ_COUNT	/* AM_GNU_GETTEXT */
- #undef HAVE___ARGZ_NEXT		/* AM_GNU_GETTEXT */
- #undef HAVE___ARGZ_STRINGIFY	/* AM_GNU_GETTEXT */
--#undef ICONV_CONST		/* AM_ICONV */
-+#undef ICONV_CONST
- #undef IGNORE_CTRL_C		/* FIXME: make tests? */
- #undef INCLUDE_PROTOTYPES	/* CF_SOCKS5 */
- #undef INSTALL_ARGS		/* CF_PATH_PROG(install) */

+ 0 - 236
package/lynx/patches/patch-lynx_cfg

@@ -1,236 +0,0 @@
-$Id$
-$MirOS: ports/www/lynx/patches/patch-lynx_cfg,v 1.7 2007/05/20 12:06:19 tg Exp $
-
-	mostly site policy and compatibility, usability
-
---- lynx2-8-7.orig/lynx.cfg	2007-05-18 00:53:22.000000000 +0200
-+++ lynx2-8-7/lynx.cfg	2009-06-13 11:46:29.000000000 +0200
-@@ -93,12 +93,12 @@
- #
- # Normally we expect you will connect to a remote site, e.g., the Lynx starting
- # site:
--STARTFILE:http://lynx.isc.org/
-+#STARTFILE:http://lynx.isc.org/
- #
- # As an alternative, you may want to use a local URL.  A good choice for this is
- # the user's home directory:
- .ex
--#STARTFILE:file://localhost/~/
-+STARTFILE:file://localhost/~/
- #
- # Your choice of STARTFILE should reflect your site's needs, and be a URL that
- # you can connect to reliably.  Otherwise users will become confused and think
-@@ -409,7 +409,7 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # values and their relationship to the locale value is not.  GNU libiconv
- # happens to give useful values, but other implementations are not guaranteed
- # to do this.
--#LOCALE_CHARSET:FALSE
-+LOCALE_CHARSET:TRUE
- 
- 
- .h2 ASSUME_CHARSET
-@@ -424,7 +424,7 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # ASSUME_CHARSET can also be changed via the 'o'ptions menu but will
- # not be saved as permanent value in user's .lynxrc file to avoid more chaos.
- #
--#ASSUME_CHARSET:iso-8859-1
-+ASSUME_CHARSET:utf-8
- 
- 
- .h2 ASSUMED_DOC_CHARSET_CHOICE
-@@ -552,7 +552,7 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # the 'o'ptions menu and save that preference in their RC file.
- # This may be a comma-separated list of languages in decreasing preference.
- #
--#PREFERRED_LANGUAGE:en
-+#PREFERRED_LANGUAGE:
- 
- 
- .h2 PREFERRED_CHARSET
-@@ -571,7 +571,7 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # the sending of an unacceptable response is also allowed.  See RFC 2068
- # (http://www.ics.uci.edu/pub/ietf/uri/rfc2068.txt).
- #
--#PREFERRED_CHARSET:
-+PREFERRED_CHARSET:utf-8
- 
- 
- .h2 CHARSETS_DIRECTORY
-@@ -652,22 +652,22 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # Set the threshold # of lines Lynx must render before it
- # redraws the screen in PARTIAL mode.  Anything < 0 implies
- # use of the screen size.
--#PARTIAL_THRES:-1
-+PARTIAL_THRES:3
- 
- 
- .h2 SHOW_KB_RATE
- # While getting large files, Lynx shows the approximate rate of transfer.
--# Set this to change the units shown.  "Kilobytes" denotes 1024 bytes:
-+# Set this to change the units shown.
- #	NONE to disable the display of transfer rate altogether.
--#	TRUE or KB for Kilobytes/second.
-+#	TRUE or KB for Kibibytes/second.
- #	FALSE or BYTES for bytes/second.
--#	KB,ETA to show Kilobytes/second with estimated completion time.
--#	BYTES,ETA to show BYTES/second with estimated completion time.
-+#	KB,ETA to show Kibibytes/second with estimated completion time.
-+#	BYTES,ETA to show bytes/second with estimated completion time.
- # Note that the "ETA" values are available if USE_READPROGRESS was defined.
--#SHOW_KB_RATE:TRUE
-+SHOW_KB_RATE:BYTES,ETA
- 
- .h2 SHOW_KB_NAME
--# Set the abbreviation for Kilobytes (1024).
-+# Set the abbreviation for Kibibytes (1024 Bytes).
- # Quoting from
- #	http://www.romulus2.com/articles/guides/misc/bitsbytes.shtml
- # In December 1998, the International Electrotechnical Commission (IEC)
-@@ -677,9 +677,6 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # metric prefixes and adding the first two letters of the word "binary".  Thus,
- # for instance, instead of Kilobyte (KB) or Gigabyte (GB), the new terms would
- # be kibibyte (KiB) or gibibyte (GiB).
--#
--# If you prefer using the conventional (and more common) "KB", modify this
--# setting.
- #SHOW_KB_NAME:KiB
- 
- .h1 Timeouts
-@@ -1076,7 +1073,7 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # default or that defined here can be toggled via the -force_secure
- # command line switch.
- #
--#FORCE_SSL_COOKIES_SECURE:FALSE
-+FORCE_SSL_COOKIES_SECURE:TRUE
- 
- 
- .h1 Internal Behavior
-@@ -1263,7 +1260,7 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # line break.  Note that the valid way to insert extra blank lines in HTML
- # is via a PRE block with only newlines in the block.
- #
--#COLLAPSE_BR_TAGS:TRUE
-+COLLAPSE_BR_TAGS:FALSE
- 
- 
- .h2 TAGSOUP
-@@ -1366,7 +1363,7 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # The default is FALSE, so that the feature needs to be enabled here
- # explicitly if you want it.
- #
--#PERSISTENT_COOKIES:FALSE
-+PERSISTENT_COOKIES:TRUE
- 
- 
- .h2 COOKIE_FILE
-@@ -1920,7 +1917,7 @@ DEFAULT_INDEX_FILE:http://lynx.isc.org/
- # prefer the more conservative action of requiring an explicit Y or y to
- # confirm.  The default defined here will override that in userdefs.h.
- #
--#QUIT_DEFAULT_YES:TRUE
-+QUIT_DEFAULT_YES:FALSE
- 
- 
- .h1 HTML Parsing
-@@ -3208,7 +3205,7 @@ COLOR:6:brightred:black
- # otherwise. Set this setting to TRUE if you prefer numbered links, but wish
- # to get valid HTML source when printing or mailing when in psrc view.
- # Default is FALSE.
--#PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING:FALSE
-+PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING:TRUE
- 
- 
- .h1 HTML Parsing
-@@ -3241,13 +3238,11 @@ COLOR:6:brightred:black
- 
- .h2 JUSTIFY
- # JUSTIFY - Appearance
--# This option mirrors command-line option with same name.  Default is TRUE.  If
--# true, most of text (except headers and like this) will be justified.  This
--# has no influence on CJK text rendering.
--#
--# This option is only available if Lynx was compiled with EXP_JUSTIFY_ELTS.
-+# This option mirrors command-line option with same name.  Default is FALSE.
-+# If true, most of text (except headers and like this) will be justified.
-+# This has no influence on CJK text rendering.
- #
--#JUSTIFY:FALSE
-+JUSTIFY:TRUE
- 
- .h2 JUSTIFY_MAX_VOID_PERCENT
- # JUSTIFY_MAX_VOID_PERCENT - Appearance
-@@ -3275,7 +3270,7 @@ COLOR:6:brightred:black
- # explicit activation can also be requested with the -tna command line
- # option.
- #
--#TEXTFIELDS_NEED_ACTIVATION:FALSE
-+TEXTFIELDS_NEED_ACTIVATION:TRUE
- 
- .h2 LEFTARROW_IN_TEXTFIELD_PROMPT
- # LEFTARROW_IN_TEXTFIELD_PROMPT
-@@ -3285,7 +3280,7 @@ COLOR:6:brightred:black
- # only if the contents of the fields have been changed since entering it.
- # If set to TRUE, the confirmation prompt is always issued.
- #
--#LEFTARROW_IN_TEXTFIELD_PROMPT:FALSE
-+LEFTARROW_IN_TEXTFIELD_PROMPT:TRUE
- 
- 
- .h1 Timeouts
-@@ -3322,7 +3317,7 @@ COLOR:6:brightred:black
- # one lynx.cfg setting.
- .nf
- #ENABLE_LYNXRC:accept_all_cookies:ON
--#ENABLE_LYNXRC:assume_charset:OFF
-+ENABLE_LYNXRC:assume_charset:ON
- #ENABLE_LYNXRC:bookmark_file:ON
- #ENABLE_LYNXRC:case_sensitive_searching:ON
- #ENABLE_LYNXRC:character_set:ON
-@@ -3337,34 +3332,35 @@ COLOR:6:brightred:black
- #ENABLE_LYNXRC:emacs_keys:ON
- #ENABLE_LYNXRC:file_editor:ON
- #ENABLE_LYNXRC:file_sorting_method:ON
--#ENABLE_LYNXRC:force_cookie_prompt:OFF
--#ENABLE_LYNXRC:force_ssl_prompt:OFF
--#ENABLE_LYNXRC:ftp_passive:OFF
-+ENABLE_LYNXRC:force_cookie_prompt:ON
-+ENABLE_LYNXRC:force_ssl_prompt:ON
-+ENABLE_LYNXRC:ftp_passive:ON
- #ENABLE_LYNXRC:kblayout:ON
- #ENABLE_LYNXRC:keypad_mode:ON
- #ENABLE_LYNXRC:lineedit_mode:ON
- #ENABLE_LYNXRC:locale_charset:ON
--#ENABLE_LYNXRC:make_links_for_all_images:OFF
--#ENABLE_LYNXRC:make_pseudo_alts_for_inlines:OFF
-+ENABLE_LYNXRC:make_links_for_all_images:ON
-+ENABLE_LYNXRC:make_pseudo_alts_for_inlines:ON
- #ENABLE_LYNXRC:multi_bookmark:ON
- #ENABLE_LYNXRC:personal_mail_address:ON
- #ENABLE_LYNXRC:preferred_charset:ON
--#ENABLE_LYNXRC:preferred_encoding:OFF
-+ENABLE_LYNXRC:preferred_encoding:ON
- #ENABLE_LYNXRC:preferred_language:ON
--#ENABLE_LYNXRC:preferred_media_types:OFF
--#ENABLE_LYNXRC:raw_mode:OFF
-+ENABLE_LYNXRC:preferred_media_types:ON
-+ENABLE_LYNXRC:raw_mode:ON
- #ENABLE_LYNXRC:run_all_execution_links:ON
- #ENABLE_LYNXRC:run_execution_links_on_local_files:ON
--#ENABLE_LYNXRC:scrollbar:OFF
-+ENABLE_LYNXRC:scrollbar:ON
- #ENABLE_LYNXRC:select_popups:ON
--#ENABLE_LYNXRC:set_cookies:OFF
-+ENABLE_LYNXRC:set_cookies:ON
- #ENABLE_LYNXRC:show_color:ON
- #ENABLE_LYNXRC:show_cursor:ON
- #ENABLE_LYNXRC:show_dotfiles:ON
--#ENABLE_LYNXRC:show_kb_rate:OFF
-+ENABLE_LYNXRC:show_kb_name:OFF
-+ENABLE_LYNXRC:show_kb_rate:ON
- #ENABLE_LYNXRC:sub_bookmarks:ON
- #ENABLE_LYNXRC:tagsoup:OFF
--#ENABLE_LYNXRC:underline_links:OFF
-+ENABLE_LYNXRC:underline_links:ON
- #ENABLE_LYNXRC:user_mode:ON
- #ENABLE_LYNXRC:useragent:OFF
- #ENABLE_LYNXRC:verbose_images:ON

+ 0 - 22
package/lynx/patches/patch-makefile_in

@@ -1,22 +0,0 @@
-$Id$
-$MirOS: ports/www/lynx/patches/patch-makefile_in,v 1.2 2007/05/20 12:06:19 tg Exp $
---- lynx2-8-7.orig/makefile.in	2007-05-18 00:53:22.000000000 +0200
-+++ lynx2-8-7/makefile.in	2009-06-13 11:46:29.000000000 +0200
-@@ -161,13 +161,13 @@ SITE_DEFS = # Your defines here
- # for installation of local execution links, please see the file userdefs.h
- 
- WWW_CFLAGS = \
--	LY_CFLAGS="$(CFLAGS)" \
--	CPPFLAGS="$(CPPFLAGS)" \
-+	LY_CFLAGS='${CFLAGS}' \
-+	CPPFLAGS='${CPPFLAGS}' \
- 	LYFLAGS="$(SITE_LYDEFS)"
- 
- SRC_CFLAGS = \
--	CFLAGS="$(CFLAGS)" \
--	CPPFLAGS="$(CPPFLAGS)" \
-+	CFLAGS='${CFLAGS}' \
-+	CPPFLAGS='${CPPFLAGS}' \
- 	LIBS="$(LIBS) $(RESOLVLIB) $(WAISLIB) $(SITE_LIBS)" \
- 	SITE_DEFS="$(SITE_DEFS)" \
- 	WWWINC=$(WWWINC) \

+ 0 - 15
package/lynx/patches/patch-samples_lynx_lss

@@ -1,15 +0,0 @@
-$MirOS: ports/www/lynx/patches/patch-samples_lynx_lss,v 1.2 2007/05/20 12:06:19 tg Exp $
-
-	usability
-
---- lynx2-8-7.orig/samples/lynx.lss	2006-09-19 02:28:28.000000000 +0200
-+++ lynx2-8-7/samples/lynx.lss	2009-06-13 11:46:29.000000000 +0200
-@@ -6,7 +6,7 @@
- # If you really want the terminal's default colors, and if lynx is built using
- # ncurses' default-color support, remove these two lines:
- normal:		normal:			lightgray:black
--default:	normal:			white:black
-+default:	normal:			lightgray:black
- 
- # Normal type styles correspond to HTML tags.
- #

+ 0 - 15
package/lynx/patches/patch-src_LYUtils_c

@@ -1,15 +0,0 @@
-$MirOS: ports/www/lynx/patches/patch-src_LYUtils_c,v 1.3 2007/08/03 16:01:22 tg Exp $
-
-	Important for upstream too
-
---- lynx2-8-7.orig/src/LYUtils.c	2007-08-03 01:24:27.000000000 +0200
-+++ lynx2-8-7/src/LYUtils.c	2009-06-13 11:46:29.000000000 +0200
-@@ -5903,7 +5903,7 @@ static BOOL IsOurSymlink(const char *nam
- 
- 	    if (cutoff != 0) {
- 		HTSprintf0(&clone, "%.*s%s%s",
--			   cutoff - name,
-+			   (int)(cutoff - name),
- 			   name, PATHSEP_STR, buffer);
- 		FREE(buffer);
- 		buffer = clone;

+ 0 - 11
package/lynx/patches/patch-src_chrtrans_makefile_in

@@ -1,11 +0,0 @@
---- lynx2-8-7.orig/src/chrtrans/makefile.in	2007-08-03 01:24:27.000000000 +0200
-+++ lynx2-8-7/src/chrtrans/makefile.in	2009-06-13 12:29:28.000000000 +0200
-@@ -50,7 +50,7 @@ CPP_OPTS	= \
- 		-I$(top_srcdir)/$(WWWINC) \
- 		-I$(top_srcdir)/ \
- 		$(INTLDIR_CPPFLAGS) $(SITE_DEFS) $(BUILD_CPPFLAGS)
--CC_OPTS		= $(CPP_OPTS) $(BUILD_CFLAGS)
-+CC_OPTS		= $(CPP_OPTS) $(BUILD_CFLAGS) -DHOSTBUILD
- 
- #
- # This file contains the font map for the default (hardware) font

+ 16 - 5
package/lynx/patches/patch-src_chrtrans_makeuctb_c

@@ -1,11 +1,22 @@
---- lynx2-8-7.orig/src/chrtrans/makeuctb.c	2007-08-03 01:24:27.000000000 +0200
-+++ lynx2-8-7/src/chrtrans/makeuctb.c	2009-06-13 11:54:42.000000000 +0200
-@@ -31,6 +31,9 @@
+--- lynx2-8-7.orig/src/chrtrans/makeuctb.c	2009-02-02 02:41:02.000000000 +0100
++++ lynx2-8-7/src/chrtrans/makeuctb.c	2010-05-29 12:55:33.031250000 +0200
+@@ -18,6 +18,7 @@
+  *  version 2, or at your option any later version.
+  */
+ 
++
+ #ifndef HAVE_CONFIG_H
+ /* override HTUtils.h fallbacks for cross-compiling */
+ #undef HAVE_LSTAT
+@@ -28,10 +29,12 @@
+ 
+ #define DONT_USE_GETTEXT
+ #define DONT_USE_SOCKS5
++#define DONT_USE_SSL
  #include <UCDefs.h>
  #include <UCkd.h>
+ #include <LYUtils.h>
  
-+#include <stdlib.h>
-+#include <unistd.h>
 +
  /*
   *  Don't try to use LYexit() since this is a standalone file.

+ 0 - 65
package/lynx/patches/patch-userdefs_h

@@ -1,65 +0,0 @@
-$Id$
-$MirOS: ports/www/lynx/patches/patch-userdefs_h,v 1.9 2007/08/03 12:14:24 tg Exp $
---- lynx2-8-7.orig/userdefs.h	2007-08-03 01:24:27.000000000 +0200
-+++ lynx2-8-7/userdefs.h	2009-06-13 11:46:29.000000000 +0200
-@@ -461,7 +461,7 @@
-  * Normally we expect you will connect to a remote site, e.g., the Lynx starting
-  * site:
-  */
--#define STARTFILE "http://lynx.isc.org/"
-+/* #define STARTFILE "http://lynx.isc.org/" */
- /*
-  * As an alternative, you may want to use a local URL.  A good choice for this
-  * is the user's home directory:
-@@ -471,6 +471,7 @@
-  * you can connect to reliably.  Otherwise users will become confused and think
-  * that they cannot run Lynx.
-  */
-+#define STARTFILE "file://localhost/~/"
- 
- /*****************************
-  * HELPFILE must be defined as a URL and must have a
-@@ -727,7 +728,7 @@
-  * that preference in their RC file.  This may be a comma-separated list
-  * of languages in decreasing preference.
-  */
--#define PREFERRED_LANGUAGE "en"
-+#define PREFERRED_LANGUAGE ""
- 
- /*****************************
-  * PREFERRED_CHARSET specifies the character set in MIME notation (e.g.,
-@@ -802,8 +803,8 @@
-  * and use "http://" as the default (e.g., gopher.wfbr.edu or gopher.wfbr.
-  * will be made gopher://gopher.wfbr.edu).
-  */
--#define URL_DOMAIN_PREFIXES "www."
--#define URL_DOMAIN_SUFFIXES ".com,.edu,.net,.org"
-+#define URL_DOMAIN_PREFIXES ""
-+#define URL_DOMAIN_SUFFIXES ""
- 
- /********************************
-  * If LIST_NEWS_NUMBERS is set TRUE, Lynx will use an ordered list
-@@ -1371,7 +1372,9 @@
-  * the version definition with the Project Version on checkout.  Just
-  * ignore it. - kw */
- /* $Format: "#define LYNX_VERSION \"$ProjectVersion$\""$ */
-+#ifndef LYNX_VERSION
- #define LYNX_VERSION "2.8.7dev.7"
-+#endif
- #define LYNX_WWW_HOME "http://lynx.isc.org/"
- #define LYNX_WWW_DIST "http://lynx.isc.org/current/"
- /* $Format: "#define LYNX_DATE \"$ProjectDate$\""$ */
-@@ -1559,11 +1562,11 @@
- 
- /*****************************
-  * Uncomment the following line to enable the kanji code override routine.
-- * The code can be changed by pressing ^L.  More precisely, this allows
-+ * The code can be changed by pressing Shift-J.  More precisely, this allows
-  * the user to override the assumption about the kanji code for the document
-  * which Lynx has made on the basis of a META tag and HTTP response.
-  */
--/*#define KANJI_CODE_OVERRIDE */
-+#define KANJI_CODE_OVERRIDE
- 
- 
- /****************************************************************

+ 1 - 1
package/nand/Makefile

@@ -9,7 +9,7 @@ PKG_RELEASE:=		3
 PKG_DESCR:=		NAND utility
 PKG_SECTION:=		base
 
-PKG_TARGET_DEPENDS:=	rb532
+PKG_TARGET_DEPENDS:=	routerboard
 
 NO_DISTFILES:=		1
 

+ 6 - 1
package/nspr/Makefile

@@ -20,7 +20,12 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,NSPR,${PKG_NAME},$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
-CONFIGURE_ENV+=		OS_TARGET="Linux" HOST_CC="${HOSTCC}" HOST_CFLAGS="${HOSTCFLAGS}"
+CONFIGURE_ENV+=		OS_TARGET="Linux" HOST_CC="${HOSTCC}" HOST_CFLAGS="${HOSTCFLAGS}" \
+			cross_compiling=yes
+
+ifeq (${ADK_LINUX_64},y)
+CONFIGURE_ARGS+=	--enable-64bit
+endif
 
 post-install:
 	$(INSTALL_DIR) $(IDIR_NSPR)/usr/lib

+ 2 - 2
package/nspr/patches/patch-mozilla_nsprpub_config_Makefile_in

@@ -1,11 +1,11 @@
 --- nspr-4.8.2.orig/mozilla/nsprpub/config/Makefile.in	2009-03-03 23:04:23.000000000 +0100
-+++ nspr-4.8.2/mozilla/nsprpub/config/Makefile.in	2010-02-06 02:01:27.321836181 +0100
++++ nspr-4.8.2/mozilla/nsprpub/config/Makefile.in	2010-05-02 12:25:27.673464050 +0200
 @@ -145,7 +145,7 @@ endif
  
  $(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
  	@$(MAKE_OBJDIR)
 -	$(CC) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
-+	$(CC_FOR_BUILD) $(XCFLAGS) $< $(LDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
++	$(CC_FOR_BUILD) $(HOSTCFLAGS) $< $(HOSTLDFLAGS) $(XLDOPTS) $(OUTOPTION)$@
  
  install:: nspr.m4
  	$(NSINSTALL) -D $(DESTDIR)$(datadir)/aclocal

+ 21 - 0
package/nspr/patches/patch-mozilla_nsprpub_configure

@@ -0,0 +1,21 @@
+--- nspr-4.8.2.orig/mozilla/nsprpub/configure	2009-10-04 02:57:00.000000000 +0200
++++ nspr-4.8.2/mozilla/nsprpub/configure	2010-05-02 12:55:21.842224375 +0200
+@@ -1129,8 +1129,8 @@ EOF
+ fi
+ 
+ if test -z "$SKIP_COMPILER_CHECKS"; then
+-if test "$target" != "$host"; then
+-    echo "cross compiling from $host to $target"
++if test "$target" != "$build"; then
++    echo "cross compiling from $build to $target"
+     cross_compiling=yes
+ 
+     _SAVE_CC="$CC"
+@@ -2593,6 +2593,7 @@ case "$build:$target" in
+         ;;
+ esac
+ 
++cross_compiling=yes
+ if test "$cross_compiling"  = "yes"; then
+     CROSS_COMPILE=1
+ else

+ 4 - 3
package/nss/Makefile

@@ -15,6 +15,7 @@ PKG_URL:=		http://www.mozilla.org/projects/security/pki/nss/
 PKG_SITES:=		https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_12_6_RTM/src/
 
 PKG_TARGET_DEPENDS:=    !foxboard
+PKG_HOST_DEPENDS:=	!cygwin
 
 WRKSRC=			${WRKDIST}/mozilla/security/nss
 
@@ -26,7 +27,7 @@ CONFIG_STYLE:=		manual
 
 ifeq ($(ADK_LINUX_64),y)
 TCFLAGS+=		-DUSE_64
-MAKE_FLAGS+=		USE_64=1
+XAKE_FLAGS+=		USE_64=1
 endif
 
 MAKE_FLAGS+=		NATIVE_CC="${HOSTCC}" NATIVE_FLAGS="${HOSTCFLAGS}"
@@ -34,10 +35,10 @@ TCPPFLAGS+=		-I${STAGING_DIR}/usr/include/nspr
 TCFLAGS+=		-I${STAGING_DIR}/usr/include/nspr
 TLDFLAGS:=		''
 
-MAKE_FLAGS+=		SOURCE_MD_DIR=${WRKDIST}/dist DIST=${WRKDIST}/dist \
+XAKE_FLAGS+=		SOURCE_MD_DIR=${WRKDIST}/dist DIST=${WRKDIST}/dist \
 			ARCHFLAG="${TCFLAGS} ${TCPPFLAGS} -ldl"
 ALL_TARGET:=		build_coreconf all
-XAKE_FLAGS+=		OS_TEST=${ARCH} NSS_DISABLE_DBM=1 OS_TARGET=Linux OS_RELEASE=2.6
+XAKE_FLAGS+=		OS_TEST=${CPU_ARCH} NSS_DISABLE_DBM=1 OS_TARGET=Linux OS_RELEASE=2.6
 
 post-install:
 	$(INSTALL_DIR) $(IDIR_NSS)/usr/lib

+ 3 - 2
package/opensc/Makefile

@@ -4,11 +4,12 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		opensc
-PKG_VERSION:=		0.11.8
+PKG_VERSION:=		0.11.13
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		a269b478b18dddb648b9bd930206b5a8
+PKG_MD5SUM:=		98fa151e947941f9c3f27420fdf47c11
 PKG_DESCR:=		a set of libraries and utilities to access smart cards
 PKG_SECTION:=		crypto
+PKG_BUILDDEP+=		libtool
 PKG_URL:=		http://www.opensc-project.org/opensc
 PKG_SITES:=		http://www.opensc-project.org/files/opensc/
 

+ 2 - 0
package/openswan/Makefile

@@ -15,6 +15,8 @@ PKG_URL:=		http://www.openswan.org
 PKG_SITES:=		http://www.openswan.org/download/ \
 			ftp://ftp.openswan.org/openswan/
 
+PKG_NOPARALLEL:=	1
+
 include ${TOPDIR}/mk/package.mk
 
 $(eval $(call PKG_template,OPENSWAN,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))

+ 2 - 2
package/openvpn/Makefile

@@ -4,9 +4,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		openvpn
-PKG_VERSION:=		2.1.0
+PKG_VERSION:=		2.1.1
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		452a83326ae198cf961e9ae02539c8fb
+PKG_MD5SUM:=		b273ed2b5ec8616fb9834cde8634bce7
 PKG_DESCR:=		Open Source VPN solution using SSL
 PKG_SECTION:=		net
 PKG_DEPENDS:=		kmod-tun

+ 32 - 0
package/pcmciautils/Makefile

@@ -0,0 +1,32 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=		pcmciautils
+PKG_VERSION:=		017
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		ee5837214d297661c8b8189055a351fc
+PKG_DESCR:=		Utilities for PCMCIA subsystem
+PKG_SECTION:=		utils
+PKG_BUILDDEP+=		sysfsutils
+PKG_URL:=		http://www.kernel.org/pub/linux/utils/kernel/pcmcia/pcmcia.html
+PKG_SITES:=		http://www.kernel.org/pub/linux/utils/kernel/pcmcia/
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,PCMCIAUTILS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIG_STYLE=		manual
+
+post-install:
+	$(INSTALL_DIR) $(IDIR_PCMCIAUTILS)/etc/pcmcia
+	$(INSTALL_DATA) ./files/config.opts \
+		$(IDIR_PCMCIAUTILS)/etc/pcmcia
+	$(INSTALL_DIR) $(IDIR_PCMCIAUTILS)/usr/sbin
+	$(INSTALL_BIN) $(WRKINST)/sbin/pccardctl \
+		$(IDIR_PCMCIAUTILS)/usr/sbin
+	$(INSTALL_BIN) $(WRKINST)/lib/udev/pcmcia-socket-startup \
+		$(IDIR_PCMCIAUTILS)/usr/sbin
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 34 - 0
package/pcmciautils/files/config.opts

@@ -0,0 +1,34 @@
+#
+# Local PCMCIA Configuration File
+#
+#----------------------------------------------------------------------
+#
+# System resources available for PCMCIA cards
+#
+# NOTE: these settings have no effect on resources assigned to a
+# CardBus bridge device itself; this file only affects resources
+# assigned to cards.  Also, interrupt settings here will only affect
+# ISA bus interrupts assigned to 16-bit cards.  PCI interrupts
+# generally can't be reconfigured.
+#
+# With the kernel PCMCIA subsystem, these settings also have no effect
+# at all on resources used for 32-bit CardBus cards.  Those are set by
+# the PCI hotplug subsystem.
+#
+
+include port 0x100-0x3af
+include port 0x3e0-0x4ff
+include port 0x820-0x8ff
+include port 0xc00-0xcf7
+
+include memory 0xc0000-0xfffff
+include memory 0xa0000000-0xa0ffffff
+include memory 0x60000000-0x60ffffff
+
+# These may hurt on FSC.
+# include port 0x3c0-0x3d2
+# Exclude 0x3d3 as Radeon IGP MCE's if you touch these ports
+# include port 0x3d4-0x3df
+
+# High port numbers do not always work...
+# include port 0x1000-0x17ff

+ 17 - 0
package/pcmciautils/patches/patch-Makefile

@@ -0,0 +1,17 @@
+--- pcmciautils-017.orig/Makefile	2010-01-06 16:47:45.000000000 +0100
++++ pcmciautils-017/Makefile	2010-05-29 17:15:03.515625000 +0200
+@@ -94,12 +94,13 @@ PWD = $(shell pwd)
+ # If you are running a cross compiler, you may want to set this
+ # to something more interesting, like "arm-linux-".  If you want
+ # to compile vs uClibc, that can be done here as well.
+-CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
++CROSS ?= #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
+ CC = $(CROSS)gcc
+ LD = $(CROSS)gcc
+ AR = $(CROSS)ar
+ STRIP = $(CROSS)strip
+ RANLIB = $(CROSS)ranlib
++LEX = flex
+ HOSTCC = gcc
+ 
+ export CROSS CC AR STRIP RANLIB CFLAGS LDFLAGS LIB_OBJS ARCH_LIB_OBJS CRT0

+ 36 - 0
package/pcsc-lite/Makefile

@@ -0,0 +1,36 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=		pcsc-lite
+PKG_VERSION:=		1.6.0
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		fc3fd0e83090ecc81e5b32700fa246c2
+PKG_DESCR:=		middleware for smartcards
+PKG_SECTION:=		security
+PKG_BUILDDEP+=		libusb libusb-compat
+PKG_DEPENDS:=		libusb libusb-compat libpthread ccid
+PKG_URL:=		http://pcsclite.alioth.debian.org/
+PKG_SITES:=		https://alioth.debian.org/frs/download.php/3279/
+
+DISTFILES:=             ${PKG_NAME}-${PKG_VERSION}.tar.bz2
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,PCSC_LITE,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIGURE_ARGS+=	--disable-libhal
+
+post-install:
+	$(INSTALL_DIR) $(IDIR_PCSC_LITE)/etc
+	$(INSTALL_DIR) $(IDIR_PCSC_LITE)/usr/sbin
+	$(INSTALL_DIR) $(IDIR_PCSC_LITE)/usr/lib
+	$(INSTALL_DATA) ./files/reader.conf \
+		$(IDIR_PCSC_LITE)/etc
+	$(INSTALL_BIN) $(WRKINST)/usr/sbin/pcscd \
+		$(IDIR_PCSC_LITE)/usr/sbin
+	$(CP) $(WRKINST)/usr/lib/libpcsclite.so* \
+		$(IDIR_PCSC_LITE)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 27 - 0
package/pcsc-lite/files/pcscd.init

@@ -0,0 +1,27 @@
+#!/bin/sh
+#PKG pcscd
+#INIT 80
+
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+	test x"${pcscd:-NO}" = x"NO" && exit 0
+	exec sh $0 start
+	;;
+start)
+	pcscd
+  	;;
+stop)
+	pkill pcscd
+	;;
+restart)
+	sh $0 stop
+	sh $0 start
+	;;
+*)
+	echo "usage: $0 {start | stop | restart}"
+	;;
+esac
+exit $?

+ 3 - 0
package/pcsc-lite/files/pcscd.postinst

@@ -0,0 +1,3 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+add_rcconf pcscd pcscd NO

+ 16 - 0
package/pcsc-lite/files/reader.conf

@@ -0,0 +1,16 @@
+# FRIENDLYNAME   Any name
+# DEVICENAME     device filename used by the reader:
+#                /dev/ttyS0 for the first serial port
+#                or /dev/null if this is not used by the driver
+# LIBPATH        Location of the driver library for your reader
+# CHANNELID
+#             0x0103F8 or 1 for /dev/ttyS0 (COM1)
+#             0x0102F8 or 2 for /dev/ttyS1 (COM2)
+#             0x0103E8 or 3 for /dev/ttyS2 (COM3)
+#             0x0102E8 or 4 for /dev/ttyS3 (COM4)
+#
+
+FRIENDLYNAME      "GemPCTwin serial"
+DEVICENAME        /dev/ttyS0
+LIBPATH           /usr/pcsc/drivers/serial/libccidtwin.so
+CHANNELID         0

+ 3 - 1
package/pdnsd/Makefile

@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		pdnsd
 PKG_VERSION:=		1.2.7
-PKG_RELEASE:=		2
+PKG_RELEASE:=		3
 PKG_MD5SUM:=		114b3b21b09b43cbfcccdde726b84c12
 PKG_DESCR:=		Proxy DNS server with permanent caching
 PKG_SECTION:=		net
@@ -21,6 +21,8 @@ include $(TOPDIR)/mk/package.mk
 
 $(eval $(call PKG_template,PDNSD,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
 
+CONFIGURE_ARGS+=	--with-target=Linux
+
 post-install:
 	$(INSTALL_DIR) $(IDIR_PDNSD)/etc
 	${INSTALL_DATA} ./files/pdnsd.conf ${IDIR_PDNSD}/etc/

+ 11 - 0
package/pdnsd/patches/patch-src_Makefile_in

@@ -0,0 +1,11 @@
+--- pdnsd-1.2.7.orig/src/Makefile.in	2008-09-04 18:20:37.000000000 +0200
++++ pdnsd-1.2.7/src/Makefile.in	2010-05-29 17:45:45.937500000 +0200
+@@ -171,7 +171,7 @@ pdnsd_SOURCES = conf-parser.c conff.c co
+ 	rr_types.h servers.h status.h thread.h cache.h hash.h pdnsd_assert.h \
+ 	freebsd_netinet_ip_icmp.h
+ 
+-SUBDIRS = pdnsd-ctl rc test
++SUBDIRS = pdnsd-ctl rc
+ all: all-recursive
+ 
+ .SUFFIXES:

+ 2 - 0
package/php/Makefile

@@ -44,6 +44,8 @@ PKG_SITES:=		http://de.php.net/distributions/
 
 PKG_DESCR_FCGI:=	PHP for FastCGI usage
 
+PKG_HOST_DEPENDS:=	!cygwin
+
 # FIX PKG_DEPENDS
 
 include $(TOPDIR)/mk/package.mk

+ 3 - 3
package/pptpd/Makefile

@@ -4,9 +4,9 @@
 include ${TOPDIR}/rules.mk
 
 PKG_NAME:=		pptpd
-PKG_VERSION:=		1.3.0
-PKG_RELEASE:=		9
-PKG_MD5SUM:=		75d494e881f7027f4e60b114163f6b67
+PKG_VERSION:=		1.3.4
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		b38df9c431041922c997c1148bedf591
 PKG_DESCR:=		a Point-to-Point Tunneling Protocol (PPTP) server
 PKG_SECTION:=		net
 PKG_DEPENDS:=	 	ppp kmod-crypto kmod-mppe kmod-ppp

+ 0 - 20
package/pptpd/patches/bad-pqueue-debug.patch

@@ -1,20 +0,0 @@
-diff -urN pptpd-1.3.0/pqueue.c.orig pptpd-1.3.0/pqueue.c
---- pptpd-1.3.0.orig/pqueue.c	2005-03-31 06:55:53.000000000 +0200
-+++ pptpd-1.3.0/pqueue.c	2008-10-14 13:30:20.000000000 +0200
-@@ -6,14 +6,11 @@
- #include "pqueue.h"
- 
- #ifdef DEBUG_PQUEUE
--#define DEBUG_ON 1
-+#define DEBUG_CMD(_a) { _a }
- #else
--#define DEBUG_ON 0
-+#define DEBUG_CMD(_a)
- #endif
- 
--#define DEBUG_CMD(_a) if (DEBUG_ON) { _a }
--
--
- #define MIN_CAPACITY 128 /* min allocated buffer for a packet */
- 
- static int pqueue_alloc (int seq, unsigned char *packet, int packlen, pqueue_t **new);

+ 11 - 0
package/pptpd/patches/patch-Makefile_in

@@ -0,0 +1,11 @@
+--- pptpd-1.3.4.orig/Makefile.in	2007-04-16 03:10:27.000000000 +0200
++++ pptpd-1.3.4/Makefile.in	2010-05-29 18:48:12.250000000 +0200
+@@ -104,7 +104,7 @@ AUTOMAKE = @AUTOMAKE@
+ AWK = @AWK@
+ CC = @CC@
+ CCDEPMODE = @CCDEPMODE@
+-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
++CFLAGS = -Wall -DSBINDIR='"$(sbindir)"'
+ CPP = @CPP@
+ CPPFLAGS = @CPPFLAGS@
+ CYGPATH_W = @CYGPATH_W@

+ 5 - 6
package/pptpd/patches/patch-ctrlpacket_c

@@ -1,15 +1,14 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- pptpd-1.3.0.orig/ctrlpacket.c	2004-04-29 08:58:45.000000000 +0200
-+++ pptpd-1.3.0/ctrlpacket.c	2008-10-14 13:43:14.000000000 +0200
-@@ -376,9 +376,9 @@ void deal_start_ctrl_conn(unsigned char 
+--- pptpd-1.3.4.orig/ctrlpacket.c	2005-08-03 11:10:59.000000000 +0200
++++ pptpd-1.3.4/ctrlpacket.c	2010-06-03 14:37:05.610979335 +0200
+@@ -377,9 +377,9 @@ void deal_start_ctrl_conn(unsigned char 
  	start_ctrl_conn_rply.bearer_cap = htons(OUR_BEARER);
  	start_ctrl_conn_rply.max_channels = htons(MAX_CHANNELS);
  	start_ctrl_conn_rply.firmware_rev = htons(PPTP_FIRMWARE_VERSION);
 -	bzero(start_ctrl_conn_rply.hostname, MAX_HOSTNAME_SIZE);
 +	memset(start_ctrl_conn_rply.hostname, 0, MAX_HOSTNAME_SIZE);
- 	strncpy(start_ctrl_conn_rply.hostname, PPTP_HOSTNAME, MAX_HOSTNAME_SIZE);
+ 	strncpy((char *)start_ctrl_conn_rply.hostname, PPTP_HOSTNAME, MAX_HOSTNAME_SIZE);
 -	bzero(start_ctrl_conn_rply.vendor, MAX_VENDOR_SIZE);
 +	memset(start_ctrl_conn_rply.vendor, 0, MAX_VENDOR_SIZE);
- 	strncpy(start_ctrl_conn_rply.vendor, PPTP_VENDOR, MAX_VENDOR_SIZE);
+ 	strncpy((char *)start_ctrl_conn_rply.vendor, PPTP_VENDOR, MAX_VENDOR_SIZE);
  	COPY_CTRL_PACKET(start_ctrl_conn_rply, rply_packet, rply_size);
  	DEBUG_PACKET("START CTRL CONN RPLY");

+ 20 - 0
package/pptpd/patches/patch-plugins_Makefile

@@ -0,0 +1,20 @@
+--- pptpd-1.3.4.orig/plugins/Makefile	2006-08-03 04:02:01.000000000 +0200
++++ pptpd-1.3.4/plugins/Makefile	2010-06-03 14:39:12.120974815 +0200
+@@ -1,6 +1,6 @@
+-CC	= gcc
++CC	?= gcc
+ COPTS	= -O2 -g
+-CFLAGS	= $(COPTS) -I.. -I../../include -fPIC
++CFLAGS	?= $(COPTS) -I.. -I../../include -fPIC
+ LDFLAGS	= -shared
+ LDADD   = -lutil
+ INSTALL	= install -o root
+@@ -18,7 +18,7 @@ all:	$(PLUGINS)
+ %.so: %.c
+ 	$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
+ 
+-LIBDIR	?= $(DESTDIR)$(prefix)/lib/pptpd
++LIBDIR	= $(DESTDIR)$(prefix)/lib/pptpd
+ 
+ install: $(PLUGINS)
+ 	$(INSTALL) -d $(LIBDIR)

+ 0 - 35
package/pptpd/patches/pptpgre-use-debug-option.patch

@@ -1,35 +0,0 @@
-diff -Nur pptpd-1.3.0/pptpgre.c.orig pptpd-1.3.0/pptpgre.c
---- pptpd-1.3.0.orig/pptpgre.c	2005-08-02 13:33:31.000000000 +0200
-+++ pptpd-1.3.0/pptpgre.c	2008-10-14 13:30:20.000000000 +0200
-@@ -46,6 +46,9 @@
- 
- #define PACKET_MAX 8196
- 
-+/* Command Line Variable Args */
-+extern int pptpctrl_debug;
-+
- typedef int (*callback_t)(int cl, void *pack, unsigned int len);
- 
- /* test for a 32 bit counter overflow */
-@@ -319,7 +322,9 @@ static int dequeue_gre (callback_t callb
- 			stats.rx_lost += head->seq - gre.seq_recv - 1;
- 			syslog(LOG_DEBUG, "GRE: timeout waiting for %d packets", head->seq - gre.seq_recv - 1);        
- 		}
--		syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq);
-+		if (pptpctrl_debug) {
-+			syslog(LOG_DEBUG, "GRE: accepting #%d from queue", head->seq);
-+		}
- 		gre.seq_recv = head->seq;
- 		status = callback(cl, head->packet, head->packlen);
- 		pqueue_del(head);
-@@ -399,7 +404,9 @@ int decaps_gre(int fd, int (*cb) (int cl
- 		}
- 		/* check for out-of-order sequence number */
- 		if (seq_greater(seq, gre.seq_recv)) {
--			syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq);
-+			if (pptpctrl_debug) {
-+				syslog(LOG_DEBUG, "GRE: accepting packet #%d", seq);
-+			}
- 			stats.rx_accepted++;
- 			gre.seq_recv = seq;
- 			return cb(cl, buffer + ip_len + headersize, payload_len);

+ 2 - 2
package/proftpd/Makefile

@@ -4,9 +4,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		proftpd
-PKG_VERSION:=		1.3.2b
+PKG_VERSION:=		1.3.3
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		4918908fcae9e591ba84c66edff73410
+PKG_MD5SUM:=		97ad29f31f4fe633a9f8d021bab2df20
 PKG_DESCR:=		An advanced and very configurable FTP server
 PKG_SECTION:=		utils
 PKG_NOPARALLEL:=	1

+ 4 - 4
package/proftpd/patches/patch-Make_rules_in

@@ -1,7 +1,7 @@
 	do not try to set user or group id when installing
---- proftpd-1.3.2b.orig/Make.rules.in	2008-11-19 04:51:38.000000000 +0100
-+++ proftpd-1.3.2b/Make.rules.in	2010-01-27 23:00:19.000000000 +0100
-@@ -29,9 +29,9 @@ UTILS_LIBS=@UTILS_LIBS@ @LIBS@
+--- proftpd-1.3.3.orig/Make.rules.in	2009-11-18 22:48:25.000000000 +0100
++++ proftpd-1.3.3/Make.rules.in	2010-05-30 12:47:38.265625000 +0200
+@@ -28,9 +28,9 @@ UTILS_LIBS=@UTILS_LIBS@ @LIBS@
  INSTALL=@INSTALL@
  INSTALL_USER=@install_user@
  INSTALL_GROUP=@install_group@
@@ -13,4 +13,4 @@
 +INSTALL_MAN=$(INSTALL) -m 0644
  
  RM=rm -f
- SHELL=/bin/sh
+ SHELL=@CONFIG_SHELL@

+ 6 - 6
package/proftpd/patches/patch-Makefile_in

@@ -1,15 +1,15 @@
 	hiding it won't help, we install as non-root so no chown possible
---- proftpd-1.3.2b.orig/Makefile.in	2008-11-19 04:51:38.000000000 +0100
-+++ proftpd-1.3.2b/Makefile.in	2010-01-20 18:03:40.552178286 +0100
-@@ -76,7 +76,6 @@ check: proftpd$(EXEEXT)
- $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(rundir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8:
+--- proftpd-1.3.3.orig/Makefile.in	2009-12-16 00:24:42.000000000 +0100
++++ proftpd-1.3.3/Makefile.in	2010-05-30 12:47:41.187500000 +0200
+@@ -79,7 +79,6 @@ check: proftpd$(EXEEXT)
+ $(DESTDIR)$(localedir) $(DESTDIR)$(includedir) $(DESTDIR)$(includedir)/proftpd $(DESTDIR)$(libdir) $(DESTDIR)$(pkgconfigdir) $(DESTDIR)$(libdir)/proftpd $(DESTDIR)$(libexecdir) $(DESTDIR)$(localstatedir) $(DESTDIR)$(sysconfdir) $(DESTDIR)$(bindir) $(DESTDIR)$(sbindir) $(DESTDIR)$(mandir) $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man8:
  	@if [ ! -d $@ ]; then \
  		mkdir -p $@; \
 -		chown $(INSTALL_USER):$(INSTALL_GROUP) $@; \
  		chmod 0755 $@; \
  	fi
  
-@@ -86,7 +85,6 @@ install-proftpd: proftpd $(DESTDIR)$(inc
+@@ -89,7 +88,6 @@ install-proftpd: proftpd $(DESTDIR)$(inc
  		rm -f $(DESTDIR)$(sbindir)/in.proftpd ; \
  	fi
  	ln -s proftpd $(DESTDIR)$(sbindir)/in.proftpd
@@ -17,7 +17,7 @@
  
  install-libs: $(DESTDIR)$(libdir)/proftpd
  	cd lib/ && $(MAKE) install
-@@ -121,11 +119,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DE
+@@ -125,11 +123,11 @@ install-utils: $(DESTDIR)$(sbindir) $(DE
  	$(INSTALL_SBIN) ftpshut  $(DESTDIR)$(sbindir)/ftpshut
  	$(INSTALL_BIN)  ftptop   $(DESTDIR)$(bindir)/ftptop
  	$(INSTALL_BIN)  ftpwho   $(DESTDIR)$(bindir)/ftpwho

+ 29 - 0
package/proftpd/patches/patch-modules_mod_auth_unix_c

@@ -0,0 +1,29 @@
+--- proftpd-1.3.3.orig/modules/mod_auth_unix.c	2009-10-14 20:49:31.000000000 +0200
++++ proftpd-1.3.3/modules/mod_auth_unix.c	2010-05-30 13:02:15.515625000 +0200
+@@ -77,6 +77,7 @@
+ # endif
+ #endif /* PR_USE_SIA */
+ 
++/*
+ #ifdef CYGWIN
+ typedef void *HANDLE;
+ typedef unsigned long DWORD;
+@@ -85,7 +86,8 @@ typedef unsigned long DWORD;
+ DWORD WINAPI GetVersion(void);
+ extern HANDLE cygwin_logon_user (const struct passwd *, const char *);
+ extern void cygwin_set_impersonation_token (const HANDLE);
+-#endif /* CYGWIN */
++#endif 
++*/
+ 
+ #ifdef SETGRENT_VOID
+ # define RETSETGRENTTYPE	void
+@@ -738,7 +740,7 @@ MODRET pw_check(cmd_rec *cmd) {
+ 
+ #else /* !PR_USE_SIA */
+ 
+-# ifdef CYGWIN
++# if 0
+   /* We have to do special Windows NT voodoo with Cygwin in order to be
+    * able to switch UID/GID. More info at
+    * http://cygwin.com/cygwin-ug-net/ntsec.html#NTSEC-SETUID

+ 1 - 1
package/python/Makefile

@@ -12,7 +12,7 @@ PKG_SECTION:=		lang
 PKG_URL:=		http://www.python.org
 PKG_SITES:=		http://www.python.org/ftp/python/3.1.1/
 
-PKG_HOST_DEPENDS:=	!netbsd !openbsd
+PKG_HOST_DEPENDS:=	!netbsd !openbsd !cygwin
 
 DISTFILES=		Python-${PKG_VERSION}.tgz
 WRKDIST=		${WRKDIR}/Python-${PKG_VERSION}

+ 0 - 32
package/swconfig/Makefile

@@ -1,32 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-include ${TOPDIR}/rules.mk
-
-PKG_NAME:=		swconfig
-PKG_VERSION:=		1.0
-PKG_RELEASE:=		1
-PKG_DESCR:=		switch configuration utility
-PKG_SECTION:=		misc
-PKG_DEPENDS:=		libnl
-PKG_BUILDDEP+=		libnl
-
-PKG_TARGET_CONFIG:=	rb433
-
-NO_DISTFILES:=		1
-
-include ${TOPDIR}/mk/package.mk
-
-$(eval $(call PKG_template,SWCONFIG,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-
-CONFIG_STYLE:=		manual
-INSTALL_STYLE:=		manual
-
-XAKE_FLAGS:=		LIBS="-lnl -lm" CFLAGS="$(TARGET_CFLAGS) \
-			-I$(LINUX_DIR)/include"
-
-do-install:
-	${INSTALL_DIR} ${IDIR_SWCONFIG}/sbin
-	${INSTALL_BIN} ${WRKBUILD}/swconfig ${IDIR_SWCONFIG}/sbin/
-
-include ${TOPDIR}/mk/pkg-bottom.mk

+ 0 - 12
package/swconfig/src/Makefile

@@ -1,12 +0,0 @@
-ifndef CFLAGS
-CFLAGS = -O2 -g -I ../src
-endif
-LIBS=-lnl
-
-all: swconfig
-
-%.o: %.c
-	$(CC) $(CFLAGS) -c -o $@ $^
-
-swconfig: cli.o swlib.o
-	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

+ 0 - 255
package/swconfig/src/cli.c

@@ -1,255 +0,0 @@
-/*
- * swconfig.c: Switch configuration utility
- *
- * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
- *
- * 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 Foundatio.
- *
- * 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 <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <stdint.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <linux/types.h>
-#include <linux/netlink.h>
-#include <linux/genetlink.h>
-#include <netlink/netlink.h>
-#include <netlink/genl/genl.h>
-#include <netlink/genl/ctrl.h>
-#include <linux/switch.h>
-#include "swlib.h"
-
-#define GET		1
-#define SET		2
-
-void print_attrs(struct switch_attr *attr)
-{
-	int i = 0;
-	while (attr) {
-		const char *type;
-		switch(attr->type) {
-			case SWITCH_TYPE_INT:
-				type = "int";
-				break;
-			case SWITCH_TYPE_STRING:
-				type = "string";
-				break;
-			case SWITCH_TYPE_PORTS:
-				type = "ports";
-				break;
-			case SWITCH_TYPE_NOVAL:
-				type = "none";
-				break;
-			default:
-				type = "unknown";
-				break;
-		}
-		printf("\tAttribute %d (%s): %s (%s)\n", ++i, type, attr->name, attr->description);
-		attr = attr->next;
-	}
-}
-
-void list_attributes(struct switch_dev *dev)
-{
-	printf("Switch %d: %s(%s), ports: %d, vlans: %d\n", dev->id, dev->dev_name, dev->name, dev->ports, dev->vlans);
-	printf("     --switch\n");
-	print_attrs(dev->ops);
-	printf("     --vlan\n");
-	print_attrs(dev->vlan_ops);
-	printf("     --port\n");
-	print_attrs(dev->port_ops);
-}
-
-void print_usage(void)
-{
-	printf("swconfig dev <dev> [port <port>|vlan <vlan>] (help|set <key> <value>|get <key>)\n");
-	exit(0);
-}
-
-int main(int argc, char **argv)
-{
-	int retval = 0;
-	struct switch_dev *dev;
-	struct switch_attr *a;
-	struct switch_val val;
-	int err;
-	int i;
-
-	struct switch_port *ports;
-
-	int cmd = 0;
-	char *cdev = NULL;
-	int cport = -1;
-	int cvlan = -1;
-	char *ckey = NULL;
-	char *cvalue = NULL;
-	int chelp = 0;
-
-	if(argc < 4)
-		print_usage();
-
-	if(strcmp(argv[1], "dev"))
-		print_usage();
-
-	cdev = argv[2];
-
-	for(i = 3; i < argc; i++)
-	{
-		int p;
-		if(!strcmp(argv[i], "help"))
-		{
-			chelp = 1;
-			continue;
-		}
-		if(i + 1 >= argc)
-			print_usage();
-		p = atoi(argv[i + 1]);
-		if(!strcmp(argv[i], "port"))
-		{
-			cport = p;
-		} else if(!strcmp(argv[i], "vlan"))
-		{
-			cvlan = p;
-		} else if(!strcmp(argv[i], "set"))
-		{
-			if(argc <= i + 1)
-				print_usage();
-			cmd = SET;
-			ckey = argv[i + 1];
-			if (argc > i + 2)
-				cvalue = argv[i + 2];
-			else
-				cvalue = NULL;
-			i++;
-		} else if(!strcmp(argv[i], "get"))
-		{
-			cmd = GET;
-			ckey = argv[i + 1];
-		} else{
-			print_usage();
-		}
-		i++;
-	}
-
-	if(cport > -1 && cvlan > -1)
-		print_usage();
-
-	dev = swlib_connect(cdev);
-	if (!dev) {
-		fprintf(stderr, "Failed to connect to the switch\n");
-		return 1;
-	}
-
-	ports = malloc(sizeof(struct switch_port) * dev->ports);
-	memset(ports, 0, sizeof(struct switch_port) * dev->ports);
-	swlib_scan(dev);
-
-	if(chelp)
-	{
-		list_attributes(dev);
-		goto out;
-	}
-
-	if(cport > -1)
-		a = swlib_lookup_attr(dev, SWLIB_ATTR_GROUP_PORT, ckey);
-	else if(cvlan > -1)
-		a = swlib_lookup_attr(dev, SWLIB_ATTR_GROUP_VLAN, ckey);
-	else
-		a = swlib_lookup_attr(dev, SWLIB_ATTR_GROUP_GLOBAL, ckey);
-
-	if(!a)
-	{
-		fprintf(stderr, "Unknown attribute \"%s\"\n", ckey);
-		goto out;
-	}
-
-	switch(cmd)
-	{
-	case SET:
-		if ((a->type != SWITCH_TYPE_NOVAL) &&
-				(cvalue == NULL))
-			print_usage();
-
-		switch(a->type) {
-		case SWITCH_TYPE_INT:
-			val.value.i = atoi(cvalue);
-			break;
-		case SWITCH_TYPE_STRING:
-			val.value.s = cvalue;
-			break;
-		case SWITCH_TYPE_PORTS:
-			val.len = 0;
-			while(cvalue && *cvalue)
-			{
-				ports[val.len].flags = 0;
-				ports[val.len].id = strtol(cvalue, &cvalue, 10);
-				while(*cvalue && !isspace(*cvalue)) {
-					if (*cvalue == 't')
-						ports[val.len].flags |= SWLIB_PORT_FLAG_TAGGED;
-					cvalue++;
-				}
-				if (*cvalue)
-					cvalue++;
-				val.len++;
-			}
-			val.value.ports = ports;
-			break;
-		default:
-			break;
-		}
-		if(cvlan > -1)
-			val.port_vlan = cvlan;
-		if(cport > -1)
-			val.port_vlan = cport;
-		if(swlib_set_attr(dev, a, &val) < 0)
-		{
-			fprintf(stderr, "failed\n");
-			retval = -1;
-			goto out;
-		}
-		break;
-	case GET:
-		if(cvlan > -1)
-			val.port_vlan = cvlan;
-		if(cport > -1)
-			val.port_vlan = cport;
-		if(swlib_get_attr(dev, a, &val) < 0)
-		{
-			fprintf(stderr, "failed\n");
-			retval = -1;
-			goto out;
-		}
-		switch(a->type) {
-		case SWITCH_TYPE_INT:
-			printf("%d\n", val.value.i);
-			break;
-		case SWITCH_TYPE_STRING:
-			printf("%s\n", val.value.s);
-			break;
-		case SWITCH_TYPE_PORTS:
-			for(i = 0; i < val.len; i++)
-				printf("%d ", val.value.ports[i]);
-			printf("\n");
-			break;
-		}
-	}
-
-out:
-	swlib_free_all(dev);
-	free(ports);
-
-	return 0;
-}

+ 0 - 614
package/swconfig/src/swlib.c

@@ -1,614 +0,0 @@
-/*
- * swlib.c: Switch configuration API (user space part)
- *
- * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * 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 <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <stdint.h>
-#include <getopt.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <linux/switch.h>
-#include "swlib.h"
-
-//#define DEBUG 1
-#ifdef DEBUG
-#define DPRINTF(fmt, ...) fprintf(stderr, "%s(%d): " fmt, __func__, __LINE__, ##__VA_ARGS__)
-#else
-#define DPRINTF(fmt, ...) do {} while (0)
-#endif
-
-static struct nl_handle *handle;
-static struct nl_cache *cache;
-static struct genl_family *family;
-static struct nlattr *tb[SWITCH_ATTR_MAX];
-static int refcount = 0;
-
-static struct nla_policy port_policy[] = {
-	[SWITCH_PORT_ID] = { .type = NLA_U32 },
-	[SWITCH_PORT_FLAG_TAGGED] = { .type = NLA_FLAG },
-};
-
-static inline void *
-swlib_alloc(size_t size)
-{
-	void *ptr;
-
-	ptr = malloc(size);
-	if (!ptr)
-		goto done;
-	memset(ptr, 0, size);
-
-done:
-	return ptr;
-}
-
-static int
-wait_handler(struct nl_msg *msg, void *arg)
-{
-	int *finished = arg;
-
-	*finished = 1;
-	return NL_STOP;
-}
-
-/* helper function for performing netlink requests */
-static int
-swlib_call(int cmd, int (*call)(struct nl_msg *, void *),
-		int (*data)(struct nl_msg *, void *), void *arg)
-{
-	struct nl_msg *msg;
-	struct nl_cb *cb = NULL;
-	int finished;
-	int flags = 0;
-	int err;
-
-	msg = nlmsg_alloc();
-	if (!msg) {
-		fprintf(stderr, "Out of memory!\n");
-		exit(1);
-	}
-
-	if (!data)
-		flags |= NLM_F_DUMP;
-
-	genlmsg_put(msg, NL_AUTO_PID, NL_AUTO_SEQ, genl_family_get_id(family), 0, flags, cmd, 0);
-	if (data) {
-		if (data(msg, arg) < 0)
-			goto nla_put_failure;
-	}
-
-	cb = nl_cb_alloc(NL_CB_CUSTOM);
-	if (!cb) {
-		fprintf(stderr, "nl_cb_alloc failed.\n");
-		exit(1);
-	}
-
-	err = nl_send_auto_complete(handle, msg);
-	if (err < 0) {
-		fprintf(stderr, "nl_send_auto_complete failed: %d\n", err);
-		goto out;
-	}
-
-	finished = 0;
-
-	if (call)
-		nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, call, arg);
-
-	if (data)
-		nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, wait_handler, &finished);
-	else
-		nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, wait_handler, &finished);
-
-	err = nl_recvmsgs(handle, cb);
-	if (err < 0) {
-		goto out;
-	}
-
-	if (!finished)
-		err = nl_wait_for_ack(handle);
-
-out:
-	if (cb)
-		nl_cb_put(cb);
-nla_put_failure:
-	nlmsg_free(msg);
-	return err;
-}
-
-static int
-send_attr(struct nl_msg *msg, void *arg)
-{
-	struct switch_val *val = arg;
-	struct switch_attr *attr = val->attr;
-
-	NLA_PUT_U32(msg, SWITCH_ATTR_ID, attr->dev->id);
-	NLA_PUT_U32(msg, SWITCH_ATTR_OP_ID, attr->id);
-	switch(attr->atype) {
-	case SWLIB_ATTR_GROUP_PORT:
-		NLA_PUT_U32(msg, SWITCH_ATTR_OP_PORT, val->port_vlan);
-		break;
-	case SWLIB_ATTR_GROUP_VLAN:
-		NLA_PUT_U32(msg, SWITCH_ATTR_OP_VLAN, val->port_vlan);
-		break;
-	default:
-		break;
-	}
-
-	return 0;
-
-nla_put_failure:
-	return -1;
-}
-
-static int
-store_port_val(struct nl_msg *msg, struct nlattr *nla, struct switch_val *val)
-{
-	struct nlattr *p;
-	int ports = val->attr->dev->ports;
-	int err = 0;
-	int remaining;
-
-	if (!val->value.ports)
-		val->value.ports = malloc(sizeof(struct switch_port) * ports);
-
-	nla_for_each_nested(p, nla, remaining) {
-		struct nlattr *tb[SWITCH_PORT_ATTR_MAX+1];
-		struct switch_port *port;
-
-		if (val->len >= ports)
-			break;
-
-		err = nla_parse_nested(tb, SWITCH_PORT_ATTR_MAX, p, port_policy);
-		if (err < 0)
-			goto out;
-
-		if (!tb[SWITCH_PORT_ID])
-			continue;
-
-		port = &val->value.ports[val->len];
-		port->id = nla_get_u32(tb[SWITCH_PORT_ID]);
-		port->flags = 0;
-		if (tb[SWITCH_PORT_FLAG_TAGGED])
-			port->flags |= SWLIB_PORT_FLAG_TAGGED;
-
-		val->len++;
-	}
-
-out:
-	return err;
-}
-
-static int
-store_val(struct nl_msg *msg, void *arg)
-{
-	struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
-	struct switch_val *val = arg;
-	struct switch_attr *attr = val->attr;
-
-	if (!val)
-		goto error;
-
-	if (nla_parse(tb, SWITCH_ATTR_MAX - 1, genlmsg_attrdata(gnlh, 0),
-			genlmsg_attrlen(gnlh, 0), NULL) < 0) {
-		goto error;
-	}
-
-	if (tb[SWITCH_ATTR_OP_VALUE_INT])
-		val->value.i = nla_get_u32(tb[SWITCH_ATTR_OP_VALUE_INT]);
-	else if (tb[SWITCH_ATTR_OP_VALUE_STR])
-		val->value.s = strdup(nla_get_string(tb[SWITCH_ATTR_OP_VALUE_STR]));
-	else if (tb[SWITCH_ATTR_OP_VALUE_PORTS])
-		val->err = store_port_val(msg, tb[SWITCH_ATTR_OP_VALUE_PORTS], val);
-
-	val->err = 0;
-	return 0;
-
-error:
-	return NL_SKIP;
-}
-
-int
-swlib_get_attr(struct switch_dev *dev, struct switch_attr *attr, struct switch_val *val)
-{
-	int cmd;
-	int err;
-
-	switch(attr->atype) {
-	case SWLIB_ATTR_GROUP_GLOBAL:
-		cmd = SWITCH_CMD_GET_GLOBAL;
-		break;
-	case SWLIB_ATTR_GROUP_PORT:
-		cmd = SWITCH_CMD_GET_PORT;
-		break;
-	case SWLIB_ATTR_GROUP_VLAN:
-		cmd = SWITCH_CMD_GET_VLAN;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	memset(&val->value, 0, sizeof(val->value));
-	val->len = 0;
-	val->attr = attr;
-	val->err = -EINVAL;
-	err = swlib_call(cmd, store_val, send_attr, val);
-	if (!err)
-		err = val->err;
-
-	return err;
-}
-
-static int
-send_attr_ports(struct nl_msg *msg, struct switch_val *val)
-{
-	struct nlattr *n;
-	int i;
-
-	/* TODO implement multipart? */
-	if (val->len == 0)
-		goto done;
-	n = nla_nest_start(msg, SWITCH_ATTR_OP_VALUE_PORTS);
-	if (!n)
-		goto nla_put_failure;
-	for (i = 0; i < val->len; i++) {
-		struct switch_port *port = &val->value.ports[i];
-		struct nlattr *np;
-
-		np = nla_nest_start(msg, SWITCH_ATTR_PORT);
-		if (!np)
-			goto nla_put_failure;
-
-		NLA_PUT_U32(msg, SWITCH_PORT_ID, port->id);
-		if (port->flags & SWLIB_PORT_FLAG_TAGGED)
-			NLA_PUT_FLAG(msg, SWITCH_PORT_FLAG_TAGGED);
-
-		nla_nest_end(msg, np);
-	}
-	nla_nest_end(msg, n);
-done:
-	return 0;
-
-nla_put_failure:
-	return -1;
-}
-
-static int
-send_attr_val(struct nl_msg *msg, void *arg)
-{
-	struct switch_val *val = arg;
-	struct switch_attr *attr = val->attr;
-
-	if (send_attr(msg, arg))
-		goto nla_put_failure;
-
-	switch(attr->type) {
-	case SWITCH_TYPE_NOVAL:
-		break;
-	case SWITCH_TYPE_INT:
-		NLA_PUT_U32(msg, SWITCH_ATTR_OP_VALUE_INT, val->value.i);
-		break;
-	case SWITCH_TYPE_STRING:
-		if (!val->value.s)
-			goto nla_put_failure;
-		NLA_PUT_STRING(msg, SWITCH_ATTR_OP_VALUE_STR, val->value.s);
-		break;
-	case SWITCH_TYPE_PORTS:
-		if (send_attr_ports(msg, val) < 0)
-			goto nla_put_failure;
-		break;
-	default:
-		goto nla_put_failure;
-	}
-	return 0;
-
-nla_put_failure:
-	return -1;
-}
-
-int
-swlib_set_attr(struct switch_dev *dev, struct switch_attr *attr, struct switch_val *val)
-{
-	int cmd;
-
-	switch(attr->atype) {
-	case SWLIB_ATTR_GROUP_GLOBAL:
-		cmd = SWITCH_CMD_SET_GLOBAL;
-		break;
-	case SWLIB_ATTR_GROUP_PORT:
-		cmd = SWITCH_CMD_SET_PORT;
-		break;
-	case SWLIB_ATTR_GROUP_VLAN:
-		cmd = SWITCH_CMD_SET_VLAN;
-		break;
-	default:
-		return -EINVAL;
-	}
-
-	val->attr = attr;
-	return swlib_call(cmd, NULL, send_attr_val, val);
-}
-
-
-struct attrlist_arg {
-	int id;
-	int atype;
-	struct switch_dev *dev;
-	struct switch_attr *prev;
-	struct switch_attr **head;
-};
-
-static int
-add_id(struct nl_msg *msg, void *arg)
-{
-	struct attrlist_arg *l = arg;
-
-	NLA_PUT_U32(msg, SWITCH_ATTR_ID, l->id);
-
-	return 0;
-nla_put_failure:
-	return -1;
-}
-
-static int
-add_attr(struct nl_msg *msg, void *ptr)
-{
-	struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
-	struct attrlist_arg *arg = ptr;
-	struct switch_attr *new;
-
-	if (nla_parse(tb, SWITCH_ATTR_MAX - 1, genlmsg_attrdata(gnlh, 0),
-			genlmsg_attrlen(gnlh, 0), NULL) < 0)
-		goto done;
-
-	new = swlib_alloc(sizeof(struct switch_attr));
-	if (!new)
-		goto done;
-
-	new->dev = arg->dev;
-	new->atype = arg->atype;
-	if (arg->prev) {
-		arg->prev->next = new;
-	} else {
-		arg->prev = *arg->head;
-	}
-	*arg->head = new;
-	arg->head = &new->next;
-
-	if (tb[SWITCH_ATTR_OP_ID])
-		new->id = nla_get_u32(tb[SWITCH_ATTR_OP_ID]);
-	if (tb[SWITCH_ATTR_OP_TYPE])
-		new->type = nla_get_u32(tb[SWITCH_ATTR_OP_TYPE]);
-	if (tb[SWITCH_ATTR_OP_NAME])
-		new->name = strdup(nla_get_string(tb[SWITCH_ATTR_OP_NAME]));
-	if (tb[SWITCH_ATTR_OP_DESCRIPTION])
-		new->description = strdup(nla_get_string(tb[SWITCH_ATTR_OP_DESCRIPTION]));
-
-done:
-	return NL_SKIP;
-}
-
-int
-swlib_scan(struct switch_dev *dev)
-{
-	struct attrlist_arg arg;
-
-	if (dev->ops || dev->port_ops || dev->vlan_ops)
-		return 0;
-
-	arg.atype = SWLIB_ATTR_GROUP_GLOBAL;
-	arg.dev = dev;
-	arg.id = dev->id;
-	arg.prev = NULL;
-	arg.head = &dev->ops;
-	swlib_call(SWITCH_CMD_LIST_GLOBAL, add_attr, add_id, &arg);
-
-	arg.atype = SWLIB_ATTR_GROUP_PORT;
-	arg.prev = NULL;
-	arg.head = &dev->port_ops;
-	swlib_call(SWITCH_CMD_LIST_PORT, add_attr, add_id, &arg);
-
-	arg.atype = SWLIB_ATTR_GROUP_VLAN;
-	arg.prev = NULL;
-	arg.head = &dev->vlan_ops;
-	swlib_call(SWITCH_CMD_LIST_VLAN, add_attr, add_id, &arg);
-
-	return 0;
-}
-
-struct switch_attr *swlib_lookup_attr(struct switch_dev *dev,
-		enum swlib_attr_group atype, const char *name)
-{
-	struct switch_attr *head;
-
-	if (!name || !dev)
-		return NULL;
-
-	switch(atype) {
-	case SWLIB_ATTR_GROUP_GLOBAL:
-		head = dev->ops;
-		break;
-	case SWLIB_ATTR_GROUP_PORT:
-		head = dev->port_ops;
-		break;
-	case SWLIB_ATTR_GROUP_VLAN:
-		head = dev->vlan_ops;
-		break;
-	}
-	while(head) {
-		if (!strcmp(name, head->name))
-			return head;
-		head = head->next;
-	}
-
-	return NULL;
-}
-
-static void
-swlib_priv_free(void)
-{
-	if (cache)
-		nl_cache_free(cache);
-	if (handle)
-		nl_handle_destroy(handle);
-	handle = NULL;
-	cache = NULL;
-}
-
-static int
-swlib_priv_init(void)
-{
-	handle = nl_handle_alloc();
-	if (!handle) {
-		DPRINTF("Failed to create handle\n");
-		goto err;
-	}
-
-	if (genl_connect(handle)) {
-		DPRINTF("Failed to connect to generic netlink\n");
-		goto err;
-	}
-
-	cache = genl_ctrl_alloc_cache(handle);
-	if (!cache) {
-		DPRINTF("Failed to allocate netlink cache\n");
-		goto err;
-	}
-
-	family = genl_ctrl_search_by_name(cache, "switch");
-	if (!family) {
-		DPRINTF("Switch API not present\n");
-		goto err;
-	}
-	return 0;
-
-err:
-	swlib_priv_free();
-	return -EINVAL;
-}
-
-struct swlib_scan_arg {
-	const char *name;
-	struct switch_dev *head;
-	struct switch_dev *ptr;
-};
-
-static int
-add_switch(struct nl_msg *msg, void *arg)
-{
-	struct swlib_scan_arg *sa = arg;
-	struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
-	struct switch_dev *dev;
-	const char *name;
-
-	if (nla_parse(tb, SWITCH_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL) < 0)
-		goto done;
-
-	if (!tb[SWITCH_ATTR_DEV_NAME])
-		goto done;
-
-	name = nla_get_string(tb[SWITCH_ATTR_DEV_NAME]);
-	if (sa->name && (strcmp(name, sa->name) != 0))
-		goto done;
-
-	dev = swlib_alloc(sizeof(struct switch_dev));
-	if (!dev)
-		goto done;
-
-	dev->dev_name = strdup(name);
-	if (tb[SWITCH_ATTR_ID])
-		dev->id = nla_get_u32(tb[SWITCH_ATTR_ID]);
-	if (tb[SWITCH_ATTR_NAME])
-		dev->name = strdup(nla_get_string(tb[SWITCH_ATTR_DEV_NAME]));
-	if (tb[SWITCH_ATTR_PORTS])
-		dev->ports = nla_get_u32(tb[SWITCH_ATTR_PORTS]);
-	if (tb[SWITCH_ATTR_VLANS])
-		dev->vlans = nla_get_u32(tb[SWITCH_ATTR_VLANS]);
-
-	if (!sa->head) {
-		sa->head = dev;
-		sa->ptr = dev;
-	} else {
-		sa->ptr->next = dev;
-		sa->ptr = dev;
-	}
-
-	refcount++;
-done:
-	return NL_SKIP;
-}
-
-
-struct switch_dev *
-swlib_connect(const char *name)
-{
-	struct swlib_scan_arg arg;
-	int err;
-
-	if (!refcount) {
-		if (swlib_priv_init() < 0)
-			return NULL;
-	};
-
-	arg.head = NULL;
-	arg.ptr = NULL;
-	arg.name = name;
-	swlib_call(SWITCH_CMD_GET_SWITCH, add_switch, NULL, &arg);
-
-	if (!refcount)
-		swlib_priv_free();
-
-	return arg.head;
-}
-
-static void
-swlib_free_attributes(struct switch_attr **head)
-{
-	struct switch_attr *a = *head;
-	struct switch_attr *next;
-
-	while (a) {
-		next = a->next;
-		free(a);
-		a = next;
-	}
-	*head = NULL;
-}
-
-void
-swlib_free(struct switch_dev *dev)
-{
-	swlib_free_attributes(&dev->ops);
-	swlib_free_attributes(&dev->port_ops);
-	swlib_free_attributes(&dev->vlan_ops);
-	free(dev);
-
-	if (--refcount == 0)
-		swlib_priv_free();
-}
-
-void
-swlib_free_all(struct switch_dev *dev)
-{
-	struct switch_dev *p;
-
-	while (dev) {
-		p = dev->next;
-		swlib_free(dev);
-		dev = p;
-	}
-}

+ 0 - 213
package/swconfig/src/swlib.h

@@ -1,213 +0,0 @@
-/*
- * swlib.h: Switch configuration API (user space part)
- *
- * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * 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.
- *
-
-Usage of the library functions:
-
-  The main datastructure for a switch is the struct switch_device
-  To get started, you first need to use switch_connect() to probe
-  for switches and allocate an instance of this struct.
-
-  There are two possible usage modes:
-    dev = switch_connect("eth0");
-      - this call will look for a switch registered for the linux device
-  	  "eth0" and only allocate a switch_device for this particular switch.
-
-    dev = switch_connect(NULL)
-      - this will return one switch_device struct for each available
-  	  switch. The switch_device structs are chained with by ->next pointer
-
-  Then to query a switch for all available attributes, use:
-    swlib_scan(dev);
-
-  All allocated datastructures for the switch_device struct can be freed with
-    swlib_free(dev);
-  or
-    swlib_free_all(dev);
-
-  The latter traverses a whole chain of switch_device structs and frees them all
-
-  Switch attributes (struct switch_attr) are divided into three groups:
-    dev->ops:
-      - global settings
-    dev->port_ops:
-      - per-port settings
-    dev->vlan_ops:
-      - per-vlan settings
-
-  switch_lookup_attr() is a small helper function to locate attributes
-  by name.
-
-  switch_set_attr() and switch_get_attr() can alter or request the values
-  of attributes.
-
-Usage of the switch_attr struct:
-
-  ->atype: attribute group, one of:
-    - SWLIB_ATTR_GROUP_GLOBAL
-    - SWLIB_ATTR_GROUP_VLAN
-    - SWLIB_ATTR_GROUP_PORT
-
-  ->id: identifier for the attribute
-
-  ->type: data type, one of:
-    - SWITCH_TYPE_INT
-    - SWITCH_TYPE_STRING
-    - SWITCH_TYPE_PORT
-
-  ->name: short name of the attribute
-  ->description: longer description
-  ->next: pointer to the next attribute of the current group
-
-
-Usage of the switch_val struct:
-
-  When setting attributes, following members of the struct switch_val need
-  to be set up:
-
-    ->len (for attr->type == SWITCH_TYPE_PORT)
-    ->port_vlan:
-      - port number (for attr->atype == SWLIB_ATTR_GROUP_PORT), or:
-      - vlan number (for attr->atype == SWLIB_ATTR_GROUP_VLAN)
-    ->value.i (for attr->type == SWITCH_TYPE_INT)
-    ->value.s (for attr->type == SWITCH_TYPE_STRING)
-      - owned by the caller, not stored in the library internally
-    ->value.ports (for attr->type == SWITCH_TYPE_PORT)
-      - must point to an array of at lest val->len * sizeof(struct switch_port)
-
-  When getting string attributes, val->value.s must be freed by the caller
-  When getting port list attributes, an internal static buffer is used,
-  which changes from call to call.
-
- */
-
-#ifndef __SWLIB_H
-#define __SWLIB_H
-
-enum swlib_attr_group {
-	SWLIB_ATTR_GROUP_GLOBAL,
-	SWLIB_ATTR_GROUP_VLAN,
-	SWLIB_ATTR_GROUP_PORT,
-};
-
-enum swlib_port_flags {
-	SWLIB_PORT_FLAG_TAGGED = (1 << 0),
-};
-
-
-struct switch_dev;
-struct switch_attr;
-struct switch_port;
-struct switch_val;
-
-struct switch_dev {
-	int id;
-	const char *name;
-	const char *dev_name;
-	int ports;
-	int vlans;
-	struct switch_attr *ops;
-	struct switch_attr *port_ops;
-	struct switch_attr *vlan_ops;
-	struct switch_dev *next;
-	void *priv;
-};
-
-struct switch_val {
-	struct switch_attr *attr;
-	int len;
-	int err;
-	int port_vlan;
-	union {
-		const char *s;
-		int i;
-		struct switch_port *ports;
-	} value;
-};
-
-struct switch_attr {
-	struct switch_dev *dev;
-	int atype;
-	int id;
-	int type;
-	const char *name;
-	const char *description;
-	struct switch_attr *next;
-};
-
-struct switch_port {
-	unsigned int id;
-	unsigned int flags;
-};
-
-/**
- * swlib_connect: connect to the switch through netlink
- * @name: name of the ethernet interface,
- *
- * if name is NULL, it connect and builds a chain of all switches
- */
-struct switch_dev *swlib_connect(const char *name);
-
-/**
- * swlib_free: free all dynamically allocated data for the switch connection
- * @dev: switch device struct
- *
- * all members of a switch device chain (generated by swlib_connect(NULL))
- * must be freed individually
- */
-void swlib_free(struct switch_dev *dev);
-
-/**
- * swlib_free_all: run swlib_free on all devices in the chain
- * @dev: switch device struct
- */
-void swlib_free_all(struct switch_dev *dev);
-
-/**
- * swlib_scan: probe the switch driver for available commands/attributes
- * @dev: switch device struct
- */
-int swlib_scan(struct switch_dev *dev);
-
-/**
- * swlib_lookup_attr: look up a switch attribute
- * @dev: switch device struct
- * @type: global, port or vlan
- * @name: name of the attribute
- */
-struct switch_attr *swlib_lookup_attr(struct switch_dev *dev,
-		enum swlib_attr_group atype, const char *name);
-
-/**
- * swlib_set_attr: set the value for an attribute
- * @dev: switch device struct
- * @attr: switch attribute struct
- * @val: attribute value pointer
- * returns 0 on success
- */
-int swlib_set_attr(struct switch_dev *dev, struct switch_attr *attr,
-		struct switch_val *val);
-
-/**
- * swlib_get_attr: get the value for an attribute
- * @dev: switch device struct
- * @attr: switch attribute struct
- * @val: attribute value pointer
- * returns 0 on success
- * for string attributes, the result string must be freed by the caller
- */
-int swlib_get_attr(struct switch_dev *dev, struct switch_attr *attr,
-		struct switch_val *val);
-
-#endif

+ 27 - 0
package/sysfsutils/Makefile

@@ -0,0 +1,27 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=		sysfsutils
+PKG_VERSION:=		2.1.0
+PKG_RELEASE:=		1
+PKG_MD5SUM:=		14e7dcd0436d2f49aa403f67e1ef7ddc
+PKG_DESCR:=		utilites built upon sysfs
+PKG_SECTION:=		utils
+PKG_URL:=		http://linux-diag.sourceforge.net/Sysfsutils.html
+PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=linux-diag/sysfsutils/2.1.0/}
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,SYSFSUTILS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+post-install:
+	$(INSTALL_DIR) $(IDIR_SYSFSUTILS)/usr/bin
+	$(INSTALL_DIR) $(IDIR_SYSFSUTILS)/usr/lib
+	$(CP) $(WRKINST)/usr/lib/libsysfs.so* \
+		$(IDIR_SYSFSUTILS)/usr/lib
+	$(INSTALL_BIN) $(WRKINST)/usr/bin/systool \
+		$(IDIR_SYSFSUTILS)/usr/bin
+
+include ${TOPDIR}/mk/pkg-bottom.mk

+ 3 - 2
package/xorg-server/Makefile

@@ -4,9 +4,9 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=		xorg-server
-PKG_VERSION:=		1.7.5
+PKG_VERSION:=		1.7.6
 PKG_RELEASE:=		1
-PKG_MD5SUM:=		866917789c71e7616a016ad256fe9b8f
+PKG_MD5SUM:=		ba0360b4ec1f6e541b264e45906bf5f2
 PKG_DESCR:=		Xorg server
 PKG_SECTION:=		x11
 PKG_DEPENDS:=		libopenssl libxfont pixman libpciaccess libxkbfile \
@@ -42,6 +42,7 @@ CONFIGURE_ARGS+=	\
 			--enable-xorg \
 			--enable-xv \
 			--enable-xaa \
+			--enable-vgahw \
 			--disable-aiglx \
 			--disable-config-hal \
 			--disable-dpms \

+ 0 - 17
package/xorg-server/patches/patch-hw_xfree86_common_xf86VGAarbiter_c

@@ -1,17 +0,0 @@
---- xorg-server-1.7.1.orig/hw/xfree86/common/xf86VGAarbiter.c	2009-10-09 06:08:28.000000000 +0200
-+++ xorg-server-1.7.1/hw/xfree86/common/xf86VGAarbiter.c	2009-12-10 17:14:01.000000000 +0100
-@@ -38,14 +38,8 @@
- #include "xf86Priv.h"
- #include "pciaccess.h"
- 
--#ifdef DEBUG
--#error "no, really, you dont want to do this"
--#define DPRINT_S(x,y) ErrorF(x ": %i\n",y);
--#define DPRINT(x) ErrorF(x "\n");
--#else
- #define DPRINT_S(x,y)
- #define DPRINT(x)
--#endif
- 
- static GCFuncs VGAarbiterGCFuncs = {
-     VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC,

+ 14 - 21
package/xorg-server/patches/patch-hw_xfree86_loader_sdksyms_c

@@ -1,15 +1,6 @@
---- xorg-server-1.7.5.orig/hw/xfree86/loader/sdksyms.c	2010-02-16 02:42:49.000000000 +0100
-+++ xorg-server-1.7.5/hw/xfree86/loader/sdksyms.c	2010-04-21 19:50:58.000000000 +0200
-@@ -429,8 +429,6 @@ _X_HIDDEN void *xorg_symbols[] = {
-     (void *) &AbortDDX,
-     (void *) &ddxGiveUp,
-     (void *) &TimeSinceLastInputEvent,
--    (void *) &strlcpy,
--    (void *) &strlcat,
-     (void *) &LogInit,
-     (void *) &LogClose,
-     (void *) &LogSetParameter,
-@@ -634,7 +632,6 @@ _X_HIDDEN void *xorg_symbols[] = {
+--- xorg-server-1.7.6.orig/hw/xfree86/loader/sdksyms.c	2010-03-17 01:56:04.000000000 +0100
++++ xorg-server-1.7.6/hw/xfree86/loader/sdksyms.c	2010-05-14 15:54:56.232212764 +0200
+@@ -634,7 +634,6 @@ _X_HIDDEN void *xorg_symbols[] = {
      (void *) &NewCurrentScreen,
      (void *) &PointerConfinedToScreen,
      (void *) &GetSpritePosition,
@@ -17,7 +8,7 @@
      (void *) &GEExtensions,
      (void *) &GERegisterExtension,
      (void *) &GEInitEvent,
-@@ -724,7 +721,6 @@ _X_HIDDEN void *xorg_symbols[] = {
+@@ -724,7 +723,6 @@ _X_HIDDEN void *xorg_symbols[] = {
      (void *) &PickPointer,
      (void *) &PickKeyboard,
      (void *) &IsInterferingGrab,
@@ -25,7 +16,7 @@
      (void *) &ScreenRestructured,
      (void *) &ffs,
      (void *) &AddCallback,
-@@ -874,8 +870,6 @@ _X_HIDDEN void *xorg_symbols[] = {
+@@ -874,8 +872,6 @@ _X_HIDDEN void *xorg_symbols[] = {
      (void *) &CreateLinearGradientPicture,
      (void *) &CreateRadialGradientPicture,
      (void *) &CreateConicalGradientPicture,
@@ -34,7 +25,7 @@
      (void *) &PictTransform_from_xRenderTransform,
      (void *) &xRenderTransform_from_PictTransform,
      (void *) &PictureTransformPoint,
-@@ -977,25 +971,6 @@ _X_HIDDEN void *xorg_symbols[] = {
+@@ -977,25 +973,6 @@ _X_HIDDEN void *xorg_symbols[] = {
      (void *) &ShmSegType,
      (void *) &ShmCompletionCode,
      (void *) &BadShmSegCode,
@@ -60,7 +51,7 @@
      (void *) &xf86CreateI2CBusRec,
      (void *) &xf86DestroyI2CBusRec,
      (void *) &xf86I2CBusInit,
-@@ -1034,19 +1009,9 @@ _X_HIDDEN void *xorg_symbols[] = {
+@@ -1034,31 +1011,17 @@ _X_HIDDEN void *xorg_symbols[] = {
      (void *) &noTestExtensions,
      (void *) &dixScreenOrigins,
      (void *) &ConnectionInfo,
@@ -80,16 +71,18 @@
      (void *) &noScreenSaverExtension,
      (void *) &noMITShmExtension,
      (void *) &noRRExtension,
-@@ -1054,9 +1019,7 @@ _X_HIDDEN void *xorg_symbols[] = {
+     (void *) &noRenderExtension,
      (void *) &noResExtension,
      (void *) &noXFree86DGAExtension,
-     (void *) &noXFree86DRIExtension,
+-    (void *) &noXFree86DRIExtension,
 -    (void *) &noXFree86VidModeExtension,
      (void *) &noXFixesExtension,
 -    (void *) &noPanoramiXExtension,
      (void *) &noXvExtension,
-     (void *) &noDRI2Extension,
+-    (void *) &noDRI2Extension,
      (void *) &defaultTextFont,
+     (void *) &defaultCursorFont,
+     (void *) &MaxClients,
 @@ -1193,7 +1156,6 @@ _X_HIDDEN void *xorg_symbols[] = {
      (void *) &ProcRRQueryOutputProperty,
      (void *) &ProcRRConfigureOutputProperty,
@@ -116,7 +109,7 @@
      (void *) &xf86fpFlag,
      (void *) &xf86sFlag,
      (void *) &xf86bsEnableFlag,
-@@ -1935,7 +1893,6 @@ _X_HIDDEN void *xorg_symbols[] = {
+@@ -1937,7 +1895,6 @@ _X_HIDDEN void *xorg_symbols[] = {
      (void *) &ProcGrabButton,
      (void *) &ProcUngrabButton,
      (void *) &ProcRecolorCursor,
@@ -124,7 +117,7 @@
      (void *) &SetDefaultFont,
      (void *) &QueueFontWakeup,
      (void *) &RemoveFontWakeup,
-@@ -2185,15 +2142,6 @@ _X_HIDDEN void *xorg_symbols[] = {
+@@ -2187,15 +2144,6 @@ _X_HIDDEN void *xorg_symbols[] = {
      (void *) &SProcUngrabButton,
      (void *) &SProcUngrabKey,
      (void *) &SProcWarpPointer,

+ 13 - 4
package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c

@@ -1,6 +1,15 @@
---- xorg-server-1.7.5.orig/hw/xfree86/os-support/linux/lnx_video.c	2010-02-16 01:24:23.000000000 +0100
-+++ xorg-server-1.7.5/hw/xfree86/os-support/linux/lnx_video.c	2010-03-08 21:31:20.000000000 +0100
-@@ -497,7 +497,7 @@ volatile unsigned char *ioBase = NULL;
+--- xorg-server-1.7.6.orig/hw/xfree86/os-support/linux/lnx_video.c	2010-03-12 05:38:22.000000000 +0100
++++ xorg-server-1.7.6/hw/xfree86/os-support/linux/lnx_video.c	2010-05-14 19:06:06.873473002 +0200
+@@ -64,6 +64,8 @@ static Bool ExtendedEnabled = FALSE;
+       !defined(__mips__) && \
+       !defined(__arm__)
+ 
++#include "compiler.h"
++
+ /*
+  * Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare
+  * these.
+@@ -497,7 +499,7 @@ volatile unsigned char *ioBase = NULL;
  Bool
  xf86EnableIO(void)
  {
@@ -9,7 +18,7 @@
  	int fd;
  	unsigned int ioBase_phys;
  #endif
-@@ -524,6 +524,20 @@ xf86EnableIO(void)
+@@ -524,6 +526,20 @@ xf86EnableIO(void)
  #endif
  	}
  	close(fd);

+ 5 - 4
scripts/scan-pkgs.sh

@@ -38,14 +38,15 @@ if [[ -n $ADK_PACKAGE_FIREFOX ]]; then
 	NEED_LIBIDL="$NEED_LIBIDL firefox"
 fi
 
-if [[ -n $ADK_PACKAGE_LIBUSB ]]; then
-	NEED_BISON="$NEED_BISON libusb"
-fi
-
 if [[ -n $ADK_COMPILE_HEIMDAL ]]; then
 	NEED_BISON="$NEED_BISON heimdal-server"
 fi
 
+if [[ -n $ADK_COMPILE_PCMCIAUTILS ]]; then
+	NEED_BISON="$NEED_BISON pcmciautils"
+	NEED_FLEX="$NEED_FLEX pcmciautils"
+fi
+
 if [[ -n $ADK_PACKAGE_XKEYBOARD_CONFIG ]]; then
 	NEED_XKBCOMP="$NEED_XKBCOMP xkeyboard-config"
 fi

+ 5 - 3
scripts/scan-tools.sh

@@ -192,9 +192,11 @@ fi
 
 if [[ ! -s /usr/include/ncurses.h ]]; then
 	if [[ ! -s /usr/include/curses.h ]]; then
-		echo Install ncurses header files, please.
-		echo
-		out=1
+		if [[ ! -s /usr/include/ncurses/ncurses.h ]]; then
+			echo Install ncurses header files, please.
+			echo
+			out=1
+		fi
 	fi
 fi
 

+ 65 - 47
target/Config.in

@@ -116,10 +116,7 @@ config ADK_x86_64_qemu
 config ADK_rb532
 	tristate
 
-config ADK_rb411
-	tristate
-
-config ADK_rb433
+config ADK_rb4xx
 	tristate
 
 config ADK_zaurus
@@ -149,6 +146,9 @@ config ADK_mips_rescue
 config ADK_mipsel_rescue
 	tristate
 
+config ADK_brcm
+	tristate
+
 config ADK_ag241
 	tristate
 
@@ -164,6 +164,7 @@ config ADK_TARGET
 	default "alix2d"  if ADK_alix2d
 	default "alix2d13"  if ADK_alix2d13
 	default "wrap"  if ADK_wrap
+	default "brcm"  if ADK_brcm
 	default "toolchain-arm"  if ADK_arm_toolchain
 	default "toolchain-armel"  if ADK_armel_toolchain
 	default "toolchain-mips"  if ADK_mips_toolchain
@@ -175,6 +176,7 @@ config ADK_TARGET
 	default "qemu-arm"  if ADK_arm_qemu
 	default "qemu-cris"  if ADK_cris_qemu
 	default "qemu-mips"  if ADK_mips_qemu
+	default "qemu-mips64"  if ADK_mips64_qemu
 	default "qemu-mipsel"  if ADK_mipsel_qemu
 	default "qemu-x86"  if ADK_x86_qemu
 	default "qemu-x86_64"  if ADK_x86_64_qemu
@@ -182,8 +184,7 @@ config ADK_TARGET
 	default "foxg20"  if ADK_foxg20
 	default "native"  if ADK_NATIVE
 	default "rb532"  if ADK_rb532
-	default "rb411"  if ADK_rb411
-	default "rb433"  if ADK_rb433
+	default "rb4xx"  if ADK_rb4xx
 	default "zaurus"  if ADK_arm
 	default "lemote"  if ADK_lemote
 	default "ibmx40"  if ADK_ibmx40
@@ -238,6 +239,7 @@ config ADK_LINUX_ARM_FOXG20
 	select ADK_EABI
 	select ADK_KERNEL_NLS
 	select ADK_KERNEL_EXT2_FS
+	select ADK_KERNEL_USB
 	select ADK_KPACKAGE_KMOD_VFAT_FS
 	select ADK_PACKAGE_KMOD_USB_CONTROLLER
 	select ADK_KERNEL_NETDEVICES
@@ -254,7 +256,9 @@ config ADK_LINUX_CRIS_FOXBOARD
 	bool "Foxboard (ETRAX LX100)"
 	select ADK_foxboard
 	select ADK_PACKAGE_KMOD_USB_CONTROLLER
+	select ADK_KERNEL_USB
 	select ADK_KERNEL_NLS
+	select ADK_KERNEL_NETDEVICES
 	select ADK_TARGET_WITH_USB
 	help
 	  Support for Foxboard targets.
@@ -265,6 +269,7 @@ config ADK_LINUX_MIPS64_LEMOTE
 	bool "Lemote Subnotebook Yeeloong"
 	select ADK_lemote
 	select ADK_LINUX_64
+	select ADK_KERNEL_USB
 	select ADK_KERNEL_EXT2_FS
 	select ADK_KERNEL_SCSI
 	select ADK_KERNEL_ATA
@@ -322,6 +327,17 @@ config ADK_LINUX_MIPS_AG241
 	  (Texas Instruments AR7 platform)
 	  Status: stable
 
+config ADK_LINUX_MIPS_BRCM
+	bool "Linksys/Asus Broadcom 47xx Routers"
+	select ADK_KERNEL_NETDEVICES
+	select ADK_KERNEL_NET_PCI
+	select ADK_KERNEL_NET_ETHERNET
+	select ADK_KERNEL_MII
+	select ADK_brcm
+	help
+	  Linksys/Asus Broadcom 47xx based router.
+	  Status: development
+
 config ADK_LINUX_XSCALE_ZAURUS
 	bool "Zaurus SL-C3200"
 	select ADK_zaurus
@@ -362,6 +378,7 @@ config ADK_LINUX_X86_IBMX40
 	select ADK_TARGET_WITH_VGA
 	select ADK_TARGET_WITH_PCI
 	select ADK_TARGET_WITH_INPUT
+	select ADK_TARGET_WITH_CARDBUS
 	select ADK_KERNEL_INPUT_KEYBOARD
 	select ADK_KERNEL_SCSI
 	select ADK_KERNEL_NETDEVICES
@@ -589,6 +606,7 @@ config ADK_LINUX_X86_QEMU
 config ADK_LINUX_X86_64_QEMU
 	bool "x86_64"
 	select ADK_x86_64_qemu
+	select ADK_LINUX_64
 	select ADK_KERNEL_NETDEV_1000
 	select ADK_KPACKAGE_KMOD_E1000
 	select ADK_KERNEL_INPUT_KEYBOARD
@@ -610,6 +628,8 @@ depends on ADK_LINUX_ALIX
 config ADK_LINUX_X86_ALIX1C
 	bool "PC Engines Alix1C"
 	select ADK_alix1c
+	select ADK_KERNEL_USB
+	select ADK_KERNEL_NLS
 	select ADK_KERNEL_SCSI
 	select ADK_KERNEL_ATA
 	select ADK_KERNEL_BLK_DEV_SD
@@ -631,6 +651,8 @@ config ADK_LINUX_X86_ALIX1C
 config ADK_LINUX_X86_ALIX2D
 	bool "PC Engines Alix2D"
 	select ADK_alix2d
+	select ADK_KERNEL_USB
+	select ADK_KERNEL_NLS
 	select ADK_KERNEL_SCSI
 	select ADK_KERNEL_ATA
 	select ADK_KERNEL_BLK_DEV_SD
@@ -652,6 +674,8 @@ config ADK_LINUX_X86_ALIX2D
 config ADK_LINUX_X86_ALIX2D13
 	bool "PC Engines Alix2D13"
 	select ADK_alix2d13
+	select ADK_KERNEL_USB
+	select ADK_KERNEL_NLS
 	select ADK_KERNEL_SCSI
 	select ADK_KERNEL_ATA
 	select ADK_KERNEL_BLK_DEV_SD
@@ -696,35 +720,30 @@ prompt "Routerboard model"
 default ADK_LINUX_MIPS_RB532
 depends on ADK_LINUX_MIKROTIK
 
-config ADK_LINUX_MIPS_RB411
-	bool "Mikrotik Routerboard 411"
-	select ADK_rb411
-	select ADK_KERNEL_NETDEVICES
-	select ADK_KERNEL_NET_PCI
-	select ADK_KERNEL_NETDEV_1000
-	select ADK_KERNEL_NET_ETHERNET
-	select ADK_TARGET_WITH_MINIPCI
-	depends on ADK_BROKEN
-	help
-	 Support for Mikrotik RB411.
-	 Status: development
-
-config ADK_LINUX_MIPS_RB433
-	bool "Mikrotik Routerboard 433"
-	select ADK_rb433
+config ADK_LINUX_MIPS_RB4XX
+	bool "Mikrotik Routerboard 411/433"
+	select ADK_rb4xx
+	select ADK_KERNEL_MISC_FILESYSTEMS
+	select ADK_KERNEL_YAFFS_FS
+	select ADK_KERNEL_YAFFS_YAFFS2
+	select ADK_KERNEL_YAFFS_AUTO_YAFFS2
 	select ADK_KERNEL_NETDEVICES
 	select ADK_KERNEL_NET_PCI
 	select ADK_KERNEL_NETDEV_1000
 	select ADK_KERNEL_NET_ETHERNET
 	select ADK_TARGET_WITH_MINIPCI
-	depends on ADK_BROKEN
+	select ADK_TARGET_WITH_WATCHDOG
 	help
-	 Support for Mikrotik RB433.
-	 Status: development
+	 Support for Mikrotik RB411/RB433.
+	 Status: stable
 
 config ADK_LINUX_MIPS_RB532
 	bool "Mikrotik Routerboard 532"
 	select ADK_rb532
+	select ADK_KERNEL_MISC_FILESYSTEMS
+	select ADK_KERNEL_YAFFS_FS
+	select ADK_KERNEL_YAFFS_YAFFS2
+	select ADK_KERNEL_YAFFS_AUTO_YAFFS2
 	select ADK_KERNEL_NETDEVICES
 	select ADK_KERNEL_NET_PCI
 	select ADK_KERNEL_NET_ETHERNET
@@ -782,8 +801,7 @@ config ADK_TARGET_LIB_EGLIBC
 		ADK_LINUX_X86_ALIX2D || \
 		ADK_LINUX_X86_ALIX2D13 || \
 		ADK_LINUX_X86_WRAP || \
-		ADK_LINUX_MIPS_RB411 || \
-		ADK_LINUX_MIPS_RB433 || \
+		ADK_LINUX_MIPS_RB4XX || \
 		ADK_LINUX_MIPS_RB532 || \
 		ADK_LINUX_X86_64_SHUTTLE || \
 		ADK_LINUX_MIPS64_LEMOTE || \
@@ -802,6 +820,7 @@ config ADK_TARGET_LIB_GLIBC
 		ADK_LINUX_X86_ALIX2D13 || \
 		ADK_LINUX_X86_WRAP || \
 		ADK_LINUX_MIPS_RB532 || \
+		ADK_LINUX_MIPS_RB4XX || \
 		ADK_LINUX_X86_64_SHUTTLE || \
 		ADK_LINUX_RESCUE || \
 		ADK_LINUX_MIPS64_LEMOTE || \
@@ -865,8 +884,7 @@ config ADK_TARGET_ROOTFS_YAFFS
 	select ADK_KERNEL_YAFFS_YAFFS2
 	depends on \
 		ADK_LINUX_MIPS_RB532 || \
-		ADK_LINUX_MIPS_RB433 || \
-		ADK_LINUX_MIPS_RB411
+		ADK_LINUX_MIPS_RB4XX
 	help
 	  Root filesystem on NAND.
 
@@ -879,9 +897,9 @@ config ADK_TARGET_ROOTFS_NFSROOT
 		ADK_LINUX_X86_ALIX2D || \
 		ADK_LINUX_X86_ALIX2D13 || \
 		ADK_LINUX_X86_WRAP || \
+		ADK_LINUX_MIPS_BRCM || \
 		ADK_LINUX_MIPS_RB532 || \
-		ADK_LINUX_MIPS_RB433 || \
-		ADK_LINUX_MIPS_RB411 || \
+		ADK_LINUX_MIPS_RB4XX || \
 		ADK_LINUX_MIPS_WAG54G || \
 		ADK_LINUX_MIPS_AG241 || \
 		ADK_LINUX_MIPS64_LEMOTE
@@ -977,6 +995,14 @@ choice
 prompt "Compression method for initramfs and kernel"
 	depends on ADK_TARGET_ROOTFS_INITRAMFS || ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK
 	
+config ADK_TARGET_INITRAMFS_COMPRESSION_LZMA
+	boolean
+	prompt "lzma"
+	select ADK_KERNEL_RD_LZMA
+	select ADK_KERNEL_KERNEL_LZMA
+	help
+	  Select LZMA compression.
+
 config ADK_TARGET_INITRAMFS_COMPRESSION_GZIP
 	boolean
 	prompt "gzip"
@@ -993,14 +1019,6 @@ config ADK_TARGET_INITRAMFS_COMPRESSION_BZIP2
 	help
 	  Select BZIP2 compression.
 
-config ADK_TARGET_INITRAMFS_COMPRESSION_LZMA
-	boolean
-	prompt "lzma"
-	select ADK_KERNEL_RD_LZMA
-	select ADK_KERNEL_KERNEL_LZMA
-	help
-	  Select LZMA compression.
-
 config ADK_TARGET_INITRAMFS_COMPRESSION_LZO
 	boolean
 	prompt "lzo"
@@ -1013,8 +1031,15 @@ endchoice
 
 choice
 prompt "Compression method for Kernel"
-	depends on !(ADK_TARGET_ROOTFS_INITRAMFS || ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK || ADK_TOOLCHAIN_ONLY)
+	depends on !(ADK_TARGET_ROOTFS_INITRAMFS || ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK || ADK_TOOLCHAIN_ONLY || ADK_LINUX_ARM_FOXG20 || ADK_LINUX_ARM_QEMU )
 	
+config ADK_TARGET_KERNEL_COMPRESSION_LZMA
+	boolean
+	prompt "lzma"
+	select ADK_KERNEL_KERNEL_LZMA
+	help
+	  Select LZMA compression for Kernel.
+
 config ADK_TARGET_KERNEL_COMPRESSION_GZIP
 	boolean
 	prompt "gzip"
@@ -1029,13 +1054,6 @@ config ADK_TARGET_KERNEL_COMPRESSION_BZIP2
 	help
 	  Select BZIP2 compression for Kernel.
 
-config ADK_TARGET_KERNEL_COMPRESSION_LZMA
-	boolean
-	prompt "lzma"
-	select ADK_KERNEL_KERNEL_LZMA
-	help
-	  Select LZMA compression for Kernel.
-
 config ADK_TARGET_KERNEL_COMPRESSION_LZO
 	boolean
 	prompt "lzo"

+ 18 - 85
target/ag241/patches/ar7.patch

@@ -1,29 +1,8 @@
-diff -Nur linux-2.6.33.1.orig/arch/mips/ar7/platform.c linux-2.6.33.1/arch/mips/ar7/platform.c
---- linux-2.6.33.1.orig/arch/mips/ar7/platform.c	2010-03-15 17:09:39.000000000 +0100
-+++ linux-2.6.33.1/arch/mips/ar7/platform.c	2010-03-28 19:26:53.000000000 +0200
-@@ -509,7 +509,7 @@
- 
- 	memset(uart_port, 0, sizeof(struct uart_port) * 2);
- 
--	uart_port[0].type = PORT_16550A;
-+	uart_port[0].type = PORT_AR7;
- 	uart_port[0].line = 0;
- 	uart_port[0].irq = AR7_IRQ_UART0;
- 	uart_port[0].uartclk = ar7_bus_freq() / 2;
-@@ -524,7 +524,7 @@
- 
- 	/* Only TNETD73xx have a second serial port */
- 	if (ar7_has_second_uart()) {
--		uart_port[1].type = PORT_16550A;
-+		uart_port[1].type = PORT_AR7;
- 		uart_port[1].line = 1;
- 		uart_port[1].irq = AR7_IRQ_UART1;
- 		uart_port[1].uartclk = ar7_bus_freq() / 2;
-diff -Nur linux-2.6.33.1.orig/arch/mips/ar7/prom.c linux-2.6.33.1/arch/mips/ar7/prom.c
---- linux-2.6.33.1.orig/arch/mips/ar7/prom.c	2010-03-15 17:09:39.000000000 +0100
-+++ linux-2.6.33.1/arch/mips/ar7/prom.c	2010-03-28 19:26:53.000000000 +0200
-@@ -219,6 +219,14 @@
- 	if (strstr(prom_getcmdline(), "console="))
+diff -Nur linux-2.6.34.orig/arch/mips/ar7/prom.c linux-2.6.34/arch/mips/ar7/prom.c
+--- linux-2.6.34.orig/arch/mips/ar7/prom.c	2010-05-16 23:17:36.000000000 +0200
++++ linux-2.6.34/arch/mips/ar7/prom.c	2010-05-28 15:52:26.960965976 +0200
+@@ -206,6 +206,14 @@
+ 	if (strstr(arcs_cmdline, "console="))
  		return;
  
 +#ifdef CONFIG_KGDB
@@ -37,26 +16,9 @@ diff -Nur linux-2.6.33.1.orig/arch/mips/ar7/prom.c linux-2.6.33.1/arch/mips/ar7/
  	s = prom_getenv("modetty0");
  	if (s) {
  		baud = simple_strtoul(s, &p, 10);
-diff -Nur linux-2.6.33.1.orig/arch/mips/include/asm/page.h linux-2.6.33.1/arch/mips/include/asm/page.h
---- linux-2.6.33.1.orig/arch/mips/include/asm/page.h	2010-03-15 17:09:39.000000000 +0100
-+++ linux-2.6.33.1/arch/mips/include/asm/page.h	2010-03-28 19:26:53.000000000 +0200
-@@ -200,8 +200,11 @@
- #define VM_DATA_DEFAULT_FLAGS	(VM_READ | VM_WRITE | VM_EXEC | \
- 				 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
- 
--#define UNCAC_ADDR(addr)	((addr) - PAGE_OFFSET + UNCAC_BASE)
--#define CAC_ADDR(addr)		((addr) - UNCAC_BASE + PAGE_OFFSET)
-+#define UNCAC_ADDR(addr)       ((addr) - PAGE_OFFSET + UNCAC_BASE +    \
-+                                PHYS_OFFSET)
-+#define CAC_ADDR(addr)         ((addr) - UNCAC_BASE + PAGE_OFFSET -    \
-+                                PHYS_OFFSET)
-+
- 
- #include <asm-generic/memory_model.h>
- #include <asm-generic/getorder.h>
-diff -Nur linux-2.6.33.1.orig/arch/mips/Kconfig linux-2.6.33.1/arch/mips/Kconfig
---- linux-2.6.33.1.orig/arch/mips/Kconfig	2010-03-15 17:09:39.000000000 +0100
-+++ linux-2.6.33.1/arch/mips/Kconfig	2010-03-28 19:26:53.000000000 +0200
+diff -Nur linux-2.6.34.orig/arch/mips/Kconfig linux-2.6.34/arch/mips/Kconfig
+--- linux-2.6.34.orig/arch/mips/Kconfig	2010-05-16 23:17:36.000000000 +0200
++++ linux-2.6.34/arch/mips/Kconfig	2010-05-28 15:52:27.142223192 +0200
 @@ -34,7 +34,6 @@
  	select CEVT_R4K
  	select CSRC_R4K
@@ -65,38 +27,9 @@ diff -Nur linux-2.6.33.1.orig/arch/mips/Kconfig linux-2.6.33.1/arch/mips/Kconfig
  	select SWAP_IO_SPACE
  	select SYS_HAS_CPU_MIPS32_R1
  	select SYS_HAS_EARLY_PRINTK
-diff -Nur linux-2.6.33.1.orig/arch/mips/kernel/traps.c linux-2.6.33.1/arch/mips/kernel/traps.c
---- linux-2.6.33.1.orig/arch/mips/kernel/traps.c	2010-03-15 17:09:39.000000000 +0100
-+++ linux-2.6.33.1/arch/mips/kernel/traps.c	2010-03-28 19:26:53.000000000 +0200
-@@ -1283,9 +1283,22 @@
- 
- 	exception_handlers[n] = handler;
- 	if (n == 0 && cpu_has_divec) {
--		*(u32 *)(ebase + 0x200) = 0x08000000 |
--					  (0x03ffffff & (handler >> 2));
--		local_flush_icache_range(ebase + 0x200, ebase + 0x204);
-+              if ((handler ^ (ebase + 4)) & 0xfc000000) {
-+                      /* lui k0, 0x0000 */
-+                      *(u32 *)(ebase + 0x200) = 0x3c1a0000 | (handler >> 16);
-+                      /* ori k0, 0x0000 */
-+                      *(u32 *)(ebase + 0x204) =
-+                                      0x375a0000 | (handler & 0xffff);
-+                      /* jr k0 */
-+                      *(u32 *)(ebase + 0x208) = 0x03400008;
-+                      /* nop */
-+                      *(u32 *)(ebase + 0x20C) = 0x00000000;
-+                      flush_icache_range(ebase + 0x200, ebase + 0x210);
-+              } else {
-+                      *(u32 *)(ebase + 0x200) =
-+                              0x08000000 | (0x03ffffff & (handler >> 2));
-+                      flush_icache_range(ebase + 0x200, ebase + 0x204);
-+              }
- 	}
- 	return (void *)old_handler;
- }
-diff -Nur linux-2.6.33.1.orig/drivers/mtd/ar7part.c linux-2.6.33.1/drivers/mtd/ar7part.c
---- linux-2.6.33.1.orig/drivers/mtd/ar7part.c	2010-03-15 17:09:39.000000000 +0100
-+++ linux-2.6.33.1/drivers/mtd/ar7part.c	2010-03-28 19:26:53.000000000 +0200
+diff -Nur linux-2.6.34.orig/drivers/mtd/ar7part.c linux-2.6.34/drivers/mtd/ar7part.c
+--- linux-2.6.34.orig/drivers/mtd/ar7part.c	2010-05-16 23:17:36.000000000 +0200
++++ linux-2.6.34/drivers/mtd/ar7part.c	2010-05-28 15:52:27.232223555 +0200
 @@ -28,7 +28,7 @@
  #include <linux/bootmem.h>
  #include <linux/magic.h>
@@ -128,9 +61,9 @@ diff -Nur linux-2.6.33.1.orig/drivers/mtd/ar7part.c linux-2.6.33.1/drivers/mtd/a
  	*pparts = ar7_parts;
  	return AR7_PARTS;
  }
-diff -Nur linux-2.6.33.1.orig/drivers/mtd/maps/physmap.c linux-2.6.33.1/drivers/mtd/maps/physmap.c
---- linux-2.6.33.1.orig/drivers/mtd/maps/physmap.c	2010-03-15 17:09:39.000000000 +0100
-+++ linux-2.6.33.1/drivers/mtd/maps/physmap.c	2010-03-28 19:26:53.000000000 +0200
+diff -Nur linux-2.6.34.orig/drivers/mtd/maps/physmap.c linux-2.6.34/drivers/mtd/maps/physmap.c
+--- linux-2.6.34.orig/drivers/mtd/maps/physmap.c	2010-05-16 23:17:36.000000000 +0200
++++ linux-2.6.34/drivers/mtd/maps/physmap.c	2010-05-28 15:52:27.281073432 +0200
 @@ -79,7 +79,7 @@
  					"map_rom",
  					NULL };
@@ -140,10 +73,10 @@ diff -Nur linux-2.6.33.1.orig/drivers/mtd/maps/physmap.c linux-2.6.33.1/drivers/
  #endif
  
  static int physmap_flash_probe(struct platform_device *dev)
-diff -Nur linux-2.6.33.1.orig/drivers/serial/8250.c linux-2.6.33.1/drivers/serial/8250.c
---- linux-2.6.33.1.orig/drivers/serial/8250.c	2010-03-15 17:09:39.000000000 +0100
-+++ linux-2.6.33.1/drivers/serial/8250.c	2010-03-28 19:26:53.000000000 +0200
-@@ -2715,7 +2715,11 @@
+diff -Nur linux-2.6.34.orig/drivers/serial/8250.c linux-2.6.34/drivers/serial/8250.c
+--- linux-2.6.34.orig/drivers/serial/8250.c	2010-05-16 23:17:36.000000000 +0200
++++ linux-2.6.34/drivers/serial/8250.c	2010-05-28 15:52:27.330968429 +0200
+@@ -2746,7 +2746,11 @@
  {
  	struct uart_8250_port *up = (struct uart_8250_port *)port;
  

+ 2 - 2
target/ag241/target.mk

@@ -1,7 +1,7 @@
 ARCH:=			mips
 CPU_ARCH:=		mipsel
-KERNEL_VERSION:=	2.6.33.1
+KERNEL_VERSION:=	2.6.34
 KERNEL_RELEASE:=	1
-KERNEL_MD5SUM:=		73b514ec918b88a45656be191b1ee226
+KERNEL_MD5SUM:=		10eebcb0178fb4540e2165bfd7efc7ad
 TARGET_OPTIMIZATION:=	-Os -pipe
 TARGET_CFLAGS_ARCH:=    -march=mips32

+ 4 - 4
target/alix1c/Makefile

@@ -7,8 +7,10 @@ include $(TOPDIR)/mk/modules.mk
 include $(TOPDIR)/mk/kernel-build.mk
 include $(TOPDIR)/mk/image.mk
 
+KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage
+
 kernel-install:
-	cp $(LINUX_DIR)/arch/x86/boot/bzImage $(TARGET_DIR)/boot/vmlinuz-adk
+	@cp $(KERNEL) $(TARGET_DIR)/boot/vmlinuz-adk
 
 ifeq ($(FS),ext2-block)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
@@ -19,11 +21,9 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 endif
 ifeq ($(FS),nfsroot)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
-	@cp $(LINUX_DIR)/arch/x86/boot/bzImage \
-		$(BIN_DIR)/${ADK_TARGET}-${FS}-kernel $(MAKE_TRACE)	
+	@cp $(KERNEL) $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
 	@echo
 	@echo 'The linux kernel is here: $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel'
 	@echo 'The nfs root tarball is here: ${BIN_DIR}/${ROOTFSTARBALL}'
-	@echo 'Do not forget to create device nodes for console,null and tty in your nfsroot'
 	@echo 'Login as user root with password linux123 via ssh or console'
 endif

+ 2 - 2
target/alix1c/target.mk

@@ -1,7 +1,7 @@
 ARCH:=			x86
 CPU_ARCH:=		i586
-KERNEL_VERSION:=	2.6.33
+KERNEL_VERSION:=	2.6.34
 KERNEL_RELEASE:=	1
-KERNEL_MD5SUM:=		c3883760b18d50e8d78819c54d579b00
+KERNEL_MD5SUM:=		10eebcb0178fb4540e2165bfd7efc7ad
 TARGET_OPTIMIZATION:=	-Os -pipe
 TARGET_CFLAGS_ARCH:=	-march=geode

+ 4 - 3
target/alix2d/Makefile

@@ -7,8 +7,10 @@ include $(TOPDIR)/mk/modules.mk
 include $(TOPDIR)/mk/kernel-build.mk
 include $(TOPDIR)/mk/image.mk
 
+KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage
+
 kernel-install:
-	@cp $(LINUX_DIR)/arch/x86/boot/bzImage $(TARGET_DIR)/boot/vmlinuz-adk
+	@cp $(KERNEL) $(TARGET_DIR)/boot/vmlinuz-adk
 
 ifeq ($(FS),ext2-block)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
@@ -19,8 +21,7 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 endif
 ifeq ($(FS),nfsroot)
 imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL)
-	@cp $(LINUX_DIR)/arch/x86/boot/bzImage \
-		$(BIN_DIR)/${ADK_TARGET}-${FS}-kernel $(MAKE_TRACE)	
+	@cp $(KERNEL) $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
 	@echo
 	@echo 'The linux kernel is here: $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel'
 	@echo 'The nfs root tarball is here: ${BIN_DIR}/${ROOTFSUSERTARBALL}'

+ 2 - 2
target/alix2d/target.mk

@@ -1,7 +1,7 @@
 ARCH:=			x86
 CPU_ARCH:=		i586
-KERNEL_VERSION:=	2.6.33
+KERNEL_VERSION:=	2.6.34
 KERNEL_RELEASE:=	1
-KERNEL_MD5SUM:=		c3883760b18d50e8d78819c54d579b00
+KERNEL_MD5SUM:=		10eebcb0178fb4540e2165bfd7efc7ad
 TARGET_OPTIMIZATION:=	-Os -pipe
 TARGET_CFLAGS_ARCH:=	-march=geode

+ 4 - 4
target/alix2d13/Makefile

@@ -7,8 +7,10 @@ include $(TOPDIR)/mk/modules.mk
 include $(TOPDIR)/mk/kernel-build.mk
 include $(TOPDIR)/mk/image.mk
 
+KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage
+
 kernel-install:
-	cp $(LINUX_DIR)/arch/x86/boot/bzImage $(TARGET_DIR)/boot/vmlinuz-adk
+	@cp $(KERNEL) $(TARGET_DIR)/boot/vmlinuz-adk
 
 ifeq ($(FS),ext2-block)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
@@ -19,11 +21,9 @@ imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
 endif
 ifeq ($(FS),nfsroot)
 imageinstall: $(BIN_DIR)/$(ROOTFSTARBALL)
-	@cp $(LINUX_DIR)/arch/x86/boot/bzImage \
-		$(BIN_DIR)/${ADK_TARGET}-${FS}-kernel $(MAKE_TRACE)	
+	@cp $(KERNEL) $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
 	@echo
 	@echo 'The linux kernel is here: $(BIN_DIR)/${ADK_TARGET}-${FS}-kernel'
 	@echo 'The nfs root tarball is here: ${BIN_DIR}/${ROOTFSTARBALL}'
-	@echo 'Do not forget to create device nodes for console,null and tty in your nfsroot'
 	@echo 'Login as user root with password linux123 via ssh or console'
 endif

+ 2 - 2
target/alix2d13/target.mk

@@ -1,7 +1,7 @@
 ARCH:=			x86
 CPU_ARCH:=		i586
-KERNEL_VERSION:=	2.6.33
+KERNEL_VERSION:=	2.6.34
 KERNEL_RELEASE:=	1
-KERNEL_MD5SUM:=		c3883760b18d50e8d78819c54d579b00
+KERNEL_MD5SUM:=		10eebcb0178fb4540e2165bfd7efc7ad
 TARGET_OPTIMIZATION:=	-Os -pipe
 TARGET_CFLAGS_ARCH:=	-march=geode

+ 32 - 0
target/brcm/Makefile

@@ -0,0 +1,32 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+include $(TOPDIR)/mk/kernel.mk
+include $(TOPDIR)/mk/modules.mk
+include $(TOPDIR)/mk/kernel-build.mk
+include $(TOPDIR)/mk/image.mk
+
+OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
+
+$(TOOLS_BUILD_DIR):
+	@mkdir -p $(TOOLS_BUILD_DIR)
+
+tools-compile: $(TOOLS_BUILD_DIR)
+	$(MAKE) -C tools/trx
+
+kernel-install: tools-compile
+	$(TARGET_CROSS)objcopy $(OSTRIP) -S $(LINUX_DIR)/vmlinux \
+		$(LINUX_DIR)/vmlinuz
+	@gzip -c9 $(LINUX_DIR)/vmlinuz > \
+		$(BIN_DIR)/${ADK_TARGET}-${FS}-kernel
+
+ifeq ($(FS),nfsroot)
+imageinstall: $(BIN_DIR)/$(ROOTFSUSERTARBALL)
+	@echo
+	@echo 'The kernel file is: ${BIN_DIR}/${ADK_TARGET}-${FS}-kernel'
+	@echo 'The nfs root tarball is: ${BIN_DIR}/${ROOTFSUSERTARBALL}'
+	@echo 'Type following on the CFE prompt to boot the kernel:'
+	@echo 'CFE> boot -z -elf -tftp 192.168.1.254:${ADK_TARGET}-${FS}-kernel'
+	@echo 'Login as user root with password linux123 via ssh or console.'
+endif

+ 2 - 1
target/rb433/files/etc/mdev.conf → target/brcm/files/etc/mdev.conf

@@ -1,5 +1,6 @@
-device-mapper 0:0 660 @mkdir /dev/mapper
+rtc0 root:root 660 @ln -sf /dev/rtc0 /dev/rtc
 tun 0:0 660 >net/tun
+device-mapper 0:0 660 @mkdir /dev/mapper
 null 0:0 777
 zero 0:0 666
 u?random 0:0 644

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 248 - 306
target/brcm/kernel.config


+ 433 - 0
target/brcm/patches/flash-map.patch

@@ -0,0 +1,433 @@
+diff -Nur linux-2.6.34.orig/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.34/drivers/mtd/maps/bcm47xx-flash.c
+--- linux-2.6.34.orig/drivers/mtd/maps/bcm47xx-flash.c	1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.34/drivers/mtd/maps/bcm47xx-flash.c	2010-05-30 15:50:20.921614063 +0200
+@@ -0,0 +1,402 @@
++/*
++ *  Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
++ *  Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org>
++ *  Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org)
++ *
++ *  original functions for finding root filesystem from Mike Baker 
++ *
++ *  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  SOFTWARE  IS PROVIDED   ``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.
++ *
++ *  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.
++ * 
++ *  Copyright 2001-2003, Broadcom Corporation
++ *  All Rights Reserved.
++ * 
++ *  THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
++ *  KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
++ *  SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
++ *  FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
++ *
++ *  Flash mapping for BCM947XX boards
++ */
++
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/types.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/wait.h>
++#include <linux/mtd/mtd.h>
++#include <linux/mtd/map.h>
++#ifdef CONFIG_MTD_PARTITIONS
++#include <linux/mtd/partitions.h>
++#endif
++#include <linux/crc32.h>
++#ifdef CONFIG_SSB
++#include <linux/ssb/ssb.h>
++#endif
++#include <asm/io.h>
++
++
++#define TRX_MAGIC	0x30524448	/* "HDR0" */
++#define TRX_VERSION	1
++#define TRX_MAX_LEN	0x3A0000
++#define TRX_NO_HEADER	1		/* Do not write TRX header */	
++#define TRX_GZ_FILES	0x2     /* Contains up to TRX_MAX_OFFSET individual gzip files */
++#define TRX_MAX_OFFSET	3
++
++struct trx_header {
++	u32 magic;		/* "HDR0" */
++	u32 len;		/* Length of file including header */
++	u32 crc32;		/* 32-bit CRC from flag_version to end of file */
++	u32 flag_version;	/* 0:15 flags, 16:31 version */
++	u32 offsets[TRX_MAX_OFFSET];	/* Offsets of partitions from start of header */
++};
++
++#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
++#define NVRAM_SPACE 0x8000
++#define WINDOW_ADDR 0x1fc00000
++#define WINDOW_SIZE 0x400000
++#define BUSWIDTH 2
++
++#ifdef CONFIG_SSB
++extern struct ssb_bus ssb_bcm47xx;
++#endif
++static struct mtd_info *bcm47xx_mtd;
++
++static void bcm47xx_map_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
++{
++	if (len==1) {
++		memcpy_fromio(to, map->virt + from, len);
++	} else {
++		int i;
++		u16 *dest = (u16 *) to;
++		u16 *src  = (u16 *) (map->virt + from);
++		for (i = 0; i < (len / 2); i++) {
++			dest[i] = src[i];
++		}
++		if (len & 1)
++			*((u8 *)dest+len-1) = src[i] & 0xff;
++	}
++}
++
++static struct map_info bcm47xx_map = {
++	name: "Physically mapped flash",
++	size: WINDOW_SIZE,
++	bankwidth: BUSWIDTH,
++	phys: WINDOW_ADDR,
++};
++
++#ifdef CONFIG_MTD_PARTITIONS
++
++static struct mtd_partition bcm47xx_parts[] = {
++	{ name: "cfe",	offset: 0, size: 0, mask_flags: MTD_WRITEABLE, },
++	{ name: "linux", offset: 0, size: 0, },
++	{ name: "rootfs", offset: 0, size: 0, },
++	{ name: "nvram", offset: 0, size: 0, },
++	{ name: NULL, },
++};
++
++static int __init
++find_cfe_size(struct mtd_info *mtd, size_t size)
++{
++	struct trx_header *trx;
++	unsigned char buf[512];
++	int off;
++	size_t len;
++	int blocksize;
++
++	trx = (struct trx_header *) buf;
++
++	blocksize = mtd->erasesize;
++	if (blocksize < 0x10000)
++		blocksize = 0x10000;
++
++	for (off = (128*1024); off < size; off += blocksize) {
++		memset(buf, 0xe5, sizeof(buf));
++
++		/*
++		 * Read into buffer 
++		 */
++		if (mtd->read(mtd, off, sizeof(buf), &len, buf) ||
++		    len != sizeof(buf))
++			continue;
++
++		/* found a TRX header */
++		if (le32_to_cpu(trx->magic) == TRX_MAGIC) {
++			goto found;
++		}
++	}
++
++	printk(KERN_NOTICE
++	       "%s: Couldn't find bootloader size\n",
++	       mtd->name);
++	return -1;
++
++ found:
++	printk(KERN_NOTICE "bootloader size: %d\n", off);
++	return off;
++
++}
++
++/*
++ * Copied from mtdblock.c
++ *
++ * Cache stuff...
++ * 
++ * Since typical flash erasable sectors are much larger than what Linux's
++ * buffer cache can handle, we must implement read-modify-write on flash
++ * sectors for each block write requests.  To avoid over-erasing flash sectors
++ * and to speed things up, we locally cache a whole flash sector while it is
++ * being written to until a different sector is required.
++ */
++
++static void erase_callback(struct erase_info *done)
++{
++	wait_queue_head_t *wait_q = (wait_queue_head_t *)done->priv;
++	wake_up(wait_q);
++}
++
++static int erase_write (struct mtd_info *mtd, unsigned long pos, 
++			int len, const char *buf)
++{
++	struct erase_info erase;
++	DECLARE_WAITQUEUE(wait, current);
++	wait_queue_head_t wait_q;
++	size_t retlen;
++	int ret;
++
++	/*
++	 * First, let's erase the flash block.
++	 */
++
++	init_waitqueue_head(&wait_q);
++	erase.mtd = mtd;
++	erase.callback = erase_callback;
++	erase.addr = pos;
++	erase.len = len;
++	erase.priv = (u_long)&wait_q;
++
++	set_current_state(TASK_INTERRUPTIBLE);
++	add_wait_queue(&wait_q, &wait);
++
++	ret = mtd->erase(mtd, &erase);
++	if (ret) {
++		set_current_state(TASK_RUNNING);
++		remove_wait_queue(&wait_q, &wait);
++		printk (KERN_WARNING "erase of region [0x%lx, 0x%x] "
++				     "on \"%s\" failed\n",
++			pos, len, mtd->name);
++		return ret;
++	}
++
++	schedule();  /* Wait for erase to finish. */
++	remove_wait_queue(&wait_q, &wait);
++
++	/*
++	 * Next, writhe data to flash.
++	 */
++
++	ret = mtd->write (mtd, pos, len, &retlen, buf);
++	if (ret)
++		return ret;
++	if (retlen != len)
++		return -EIO;
++	return 0;
++}
++
++
++
++
++static int __init
++find_root(struct mtd_info *mtd, size_t size, struct mtd_partition *part)
++{
++	struct trx_header trx, *trx2;
++	unsigned char buf[512], *block;
++	int off, blocksize;
++	u32 i, crc = ~0;
++	size_t len;
++	struct squashfs_super_block *sb = (struct squashfs_super_block *) buf;
++
++	blocksize = mtd->erasesize;
++	if (blocksize < 0x10000)
++		blocksize = 0x10000;
++
++	for (off = (128*1024); off < size; off += blocksize) {
++		memset(&trx, 0xe5, sizeof(trx));
++
++		/*
++		 * Read into buffer 
++		 */
++		if (mtd->read(mtd, off, sizeof(trx), &len, (char *) &trx) ||
++		    len != sizeof(trx))
++			continue;
++
++		/* found a TRX header */
++		if (le32_to_cpu(trx.magic) == TRX_MAGIC) {
++			part->offset = le32_to_cpu(trx.offsets[2]) ? : 
++				le32_to_cpu(trx.offsets[1]);
++			part->size = le32_to_cpu(trx.len); 
++
++			part->size -= part->offset;
++			part->offset += off;
++
++			goto found;
++		}
++	}
++
++	printk(KERN_NOTICE
++	       "%s: Couldn't find root filesystem\n",
++	       mtd->name);
++	return -1;
++
++ found:
++	if (part->size == 0)
++		return 0;
++	
++	if (mtd->read(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf))
++		return 0;
++
++	return part->size;
++}
++
++struct mtd_partition * __init
++init_mtd_partitions(struct mtd_info *mtd, size_t size)
++{
++	int cfe_size;
++
++	if ((cfe_size = find_cfe_size(mtd,size)) < 0)
++		return NULL;
++
++	/* boot loader */
++	bcm47xx_parts[0].offset = 0;
++	bcm47xx_parts[0].size   = cfe_size;
++
++	/* nvram */
++	if (cfe_size != 384 * 1024) {
++		bcm47xx_parts[3].offset = size - ROUNDUP(NVRAM_SPACE, mtd->erasesize);
++		bcm47xx_parts[3].size   = ROUNDUP(NVRAM_SPACE, mtd->erasesize);
++	} else {
++		/* nvram (old 128kb config partition on netgear wgt634u) */
++		bcm47xx_parts[3].offset = bcm47xx_parts[0].size;
++		bcm47xx_parts[3].size   = ROUNDUP(NVRAM_SPACE, mtd->erasesize);
++	}
++
++	/* linux (kernel and rootfs) */
++	if (cfe_size != 384 * 1024) {
++		bcm47xx_parts[1].offset = bcm47xx_parts[0].size;
++		bcm47xx_parts[1].size   = bcm47xx_parts[3].offset - 
++			bcm47xx_parts[1].offset;
++	} else {
++		/* do not count the elf loader, which is on one block */
++		bcm47xx_parts[1].offset = bcm47xx_parts[0].size + 
++			bcm47xx_parts[3].size + mtd->erasesize;
++		bcm47xx_parts[1].size   = size - 
++			bcm47xx_parts[0].size - 
++			(2*bcm47xx_parts[3].size) - 
++			mtd->erasesize;
++	}
++
++	/* find and size rootfs */
++	find_root(mtd,size,&bcm47xx_parts[2]);
++	bcm47xx_parts[2].size = size - bcm47xx_parts[2].offset - bcm47xx_parts[3].size;
++
++	return bcm47xx_parts;
++}
++#endif
++
++int __init init_bcm47xx_map(void)
++{
++#ifdef CONFIG_SSB
++	struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore;
++#endif
++	size_t size;
++	int ret = 0;
++#ifdef CONFIG_MTD_PARTITIONS
++	struct mtd_partition *parts;
++	int i;
++#endif
++
++#ifdef CONFIG_SSB
++	u32 window = mcore->flash_window;
++	u32 window_size = mcore->flash_window_size;
++
++	printk("flash init: 0x%08x 0x%08x\n", window, window_size);
++	bcm47xx_map.phys = window;
++	bcm47xx_map.size = window_size;
++	bcm47xx_map.bankwidth = mcore->flash_buswidth;
++	bcm47xx_map.virt = ioremap_nocache(window, window_size);
++#else
++	printk("flash init: 0x%08x 0x%08x\n", WINDOW_ADDR, WINDOW_SIZE);
++	bcm47xx_map.virt = ioremap_nocache(WINDOW_ADDR, WINDOW_SIZE);
++#endif
++
++	if (!bcm47xx_map.virt) {
++		printk("Failed to ioremap\n");
++		return -EIO;
++	}
++
++	simple_map_init(&bcm47xx_map);
++	
++	if (!(bcm47xx_mtd = do_map_probe("cfi_probe", &bcm47xx_map))) {
++		printk("Failed to do_map_probe\n");
++		iounmap((void *)bcm47xx_map.virt);
++		return -ENXIO;
++	}
++
++	/* override copy_from routine */
++ 	//bcm47xx_map.copy_from = bcm47xx_map_copy_from;
++
++	bcm47xx_mtd->owner = THIS_MODULE;
++
++	size = bcm47xx_mtd->size;
++
++	printk(KERN_NOTICE "Flash device: 0x%x at 0x%x\n", size, WINDOW_ADDR);
++
++#ifdef CONFIG_MTD_PARTITIONS
++	parts = init_mtd_partitions(bcm47xx_mtd, size);
++	for (i = 0; parts[i].name; i++);
++	ret = add_mtd_partitions(bcm47xx_mtd, parts, i);
++	if (ret) {
++		printk(KERN_ERR "Flash: add_mtd_partitions failed\n");
++		goto fail;
++	}
++#endif
++	return 0;
++
++ fail:
++	if (bcm47xx_mtd)
++		map_destroy(bcm47xx_mtd);
++	if (bcm47xx_map.virt)
++		iounmap((void *)bcm47xx_map.virt);
++	bcm47xx_map.virt = 0;
++	return ret;
++}
++
++void __exit cleanup_bcm47xx_map(void)
++{
++#ifdef CONFIG_MTD_PARTITIONS
++	del_mtd_partitions(bcm47xx_mtd);
++#endif
++	map_destroy(bcm47xx_mtd);
++	iounmap((void *)bcm47xx_map.virt);
++}
++
++module_init(init_bcm47xx_map);
++module_exit(cleanup_bcm47xx_map);
+diff -Nur linux-2.6.34.orig/drivers/mtd/maps/Kconfig linux-2.6.34/drivers/mtd/maps/Kconfig
+--- linux-2.6.34.orig/drivers/mtd/maps/Kconfig	2010-05-16 23:17:36.000000000 +0200
++++ linux-2.6.34/drivers/mtd/maps/Kconfig	2010-05-30 15:13:31.141614159 +0200
+@@ -319,6 +319,12 @@
+ 	  Mapping for the Flaga digital module. If you don't have one, ignore
+ 	  this setting.
+ 
++config MTD_BCM47XX
++	tristate "BCM47xx flash device"
++	depends on MIPS && MTD_CFI && BCM47XX
++	help
++	  Support for the flash chips on the BCM947xx board.
++
+ config MTD_REDWOOD
+ 	tristate "CFI Flash devices mapped on IBM Redwood"
+ 	depends on MTD_CFI && ( REDWOOD_4 || REDWOOD_5 || REDWOOD_6 )
+diff -Nur linux-2.6.34.orig/drivers/mtd/maps/Makefile linux-2.6.34/drivers/mtd/maps/Makefile
+--- linux-2.6.34.orig/drivers/mtd/maps/Makefile	2010-05-16 23:17:36.000000000 +0200
++++ linux-2.6.34/drivers/mtd/maps/Makefile	2010-05-30 15:13:31.141614159 +0200
+@@ -29,6 +29,7 @@
+ obj-$(CONFIG_MTD_PCMCIA)	+= pcmciamtd.o
+ obj-$(CONFIG_MTD_RPXLITE)	+= rpxlite.o
+ obj-$(CONFIG_MTD_TQM8XXL)	+= tqm8xxl.o
++obj-$(CONFIG_MTD_BCM47XX)	+= bcm47xx-flash.o
+ obj-$(CONFIG_MTD_SA1100)	+= sa1100-flash.o
+ obj-$(CONFIG_MTD_SBC_GXX)	+= sbc_gxx.o
+ obj-$(CONFIG_MTD_SC520CDP)	+= sc520cdp.o

+ 223 - 0
target/brcm/patches/nvram.patch

@@ -0,0 +1,223 @@
+--- a/arch/mips/bcm47xx/Makefile
++++ b/arch/mips/bcm47xx/Makefile
+@@ -3,4 +3,4 @@
+ # under Linux.
+ #
+ 
+-obj-y := gpio.o irq.o prom.o serial.o setup.o time.o wgt634u.o
++obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o wgt634u.o
+--- /dev/null
++++ b/arch/mips/bcm47xx/nvram.c
+@@ -0,0 +1,98 @@
++/*
++ * BCM947xx nvram variable access
++ *
++ * Copyright 2005, Broadcom Corporation
++ * Copyright 2006, Felix Fietkau <nbd@openwrt.org>
++ * 
++ * 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/init.h>
++#include <linux/module.h>
++#include <linux/ssb/ssb.h>
++#include <linux/kernel.h>
++#include <linux/string.h>
++#include <linux/interrupt.h>
++#include <linux/spinlock.h>
++#include <linux/slab.h>
++#include <asm/byteorder.h>
++#include <asm/bootinfo.h>
++#include <asm/addrspace.h>
++#include <asm/io.h>
++#include <asm/uaccess.h>
++#include <asm/mach-bcm47xx/nvram.h>
++#include <asm/mach-bcm47xx/bcm47xx.h>
++
++static char nvram_buf[NVRAM_SPACE];
++		
++/* Probe for NVRAM header */
++static void __init early_nvram_init(void)
++{
++	struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore;
++	struct nvram_header *header;
++	int i;
++	u32 base, lim, off;
++	u32 *src, *dst;
++	
++	base = mcore->flash_window;
++	lim = mcore->flash_window_size;
++
++	off = 0x20000;
++	while (off <= lim) {
++		/* Windowed flash access */
++		header = (struct nvram_header *) KSEG1ADDR(base + off - NVRAM_SPACE);
++		if (header->magic == NVRAM_HEADER)
++			goto found;
++		off <<= 1;
++	}
++
++	/* Try embedded NVRAM at 4 KB and 1 KB as last resorts */
++	header = (struct nvram_header *) KSEG1ADDR(base + 4096);
++	if (header->magic == NVRAM_HEADER)
++		goto found;
++	
++	header = (struct nvram_header *) KSEG1ADDR(base + 1024);
++	if (header->magic == NVRAM_HEADER)
++		goto found;
++	
++	return;
++
++found:
++	src = (u32 *) header;
++	dst = (u32 *) nvram_buf;
++	for (i = 0; i < sizeof(struct nvram_header); i += 4)
++		*dst++ = *src++;
++	for (; i < header->len && i < NVRAM_SPACE; i += 4)
++		*dst++ = le32_to_cpu(*src++);
++}
++
++char *nvram_get(const char *name)
++{
++	char *var, *value, *end, *eq;
++
++	if (!name)
++		return NULL;
++
++	if (!nvram_buf[0])
++		early_nvram_init();
++
++	/* Look for name=value and return value */
++	var = &nvram_buf[sizeof(struct nvram_header)];
++	end = nvram_buf + sizeof(nvram_buf) - 2;
++	end[0] = end[1] = '\0';
++	for (; *var; var = value + strlen(value) + 1) {
++		if (!(eq = strchr(var, '=')))
++			break;
++		value = eq + 1;
++		if ((eq - var) == strlen(name) &&
++			strncmp(var, name, (eq - var)) == 0)
++			return value;
++	}
++
++	return NULL;
++}
++
++EXPORT_SYMBOL(nvram_get);
+--- a/arch/mips/bcm47xx/setup.c
++++ b/arch/mips/bcm47xx/setup.c
+@@ -33,6 +33,7 @@
+ #include <asm/time.h>
+ #include <bcm47xx.h>
+ #include <asm/fw/cfe/cfe_api.h>
++#include <asm/mach-bcm47xx/nvram.h>
+ 
+ struct ssb_bus ssb_bcm47xx;
+ EXPORT_SYMBOL(ssb_bcm47xx);
+@@ -77,6 +78,7 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
+ 				   struct ssb_init_invariants *iv)
+ {
+ 	char buf[100];
++	char *s;
+ 
+ 	/* Fill boardinfo structure */
+ 	memset(&(iv->boardinfo), 0 , sizeof(struct ssb_boardinfo));
+@@ -92,18 +94,47 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
+ 	memset(&(iv->sprom), 0, sizeof(struct ssb_sprom));
+ 	iv->sprom.revision = 3;
+ 
+-	if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
++	if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0) {
+ 		str2eaddr(buf, iv->sprom.et0mac);
+-	if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
++	} else {
++		if ((s = nvram_get("et0macaddr")))
++			str2eaddr(s, iv->sprom.et0mac);
++	}
++
++	if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0) {
+ 		str2eaddr(buf, iv->sprom.et1mac);
+-	if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
+-		iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 10);
+-	if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
+-		iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 10);
+-	if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
++	} else {
++		if ((s = nvram_get("et1macaddr")))
++			str2eaddr(s, iv->sprom.et1mac);
++	}
++
++	if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0) {
++		iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 0);
++	} else {
++		if ((s = nvram_get("et0phyaddr")))
++			iv->sprom.et0phyaddr = simple_strtoul(s, NULL, 0);
++	}
++
++	if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0) {
++		iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 0);
++	} else {
++		if ((s = nvram_get("et1phyaddr")))
++			iv->sprom.et1phyaddr = simple_strtoul(s, NULL, 0);
++	}
++
++	if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0) {
+ 		iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
+-	if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
++	} else {
++		if ((s = nvram_get("et0mdcport")))
++			iv->sprom.et0mdcport = simple_strtoul(s, NULL, 10);
++	}
++
++	if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0) {
+ 		iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
++	} else { 
++		if ((s = nvram_get("et1mdcport")))
++			iv->sprom.et1mdcport = simple_strtoul(s, NULL, 10);
++	}
+ 
+ 	return 0;
+ }
+--- /dev/null
++++ b/arch/mips/include/asm/mach-bcm47xx/nvram.h
+@@ -0,0 +1,37 @@
++/*
++ *  Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
++ *
++ *  This program is free software; you can redistribute  it and/or modify it
++ *  under  the terms of  the GNU General  Public License as published by the
++ *  Free Software Foundation;  either version 2 of the  License, or (at your
++ *  option) any later version.
++ */
++
++#ifndef __NVRAM_H
++#define __NVRAM_H
++
++struct nvram_header {
++	u32 magic;
++	u32 len;
++	u32 crc_ver_init;	/* 0:7 crc, 8:15 ver, 16:31 sdram_init */
++	u32 config_refresh;	/* 0:15 sdram_config, 16:31 sdram_refresh */
++	u32 config_ncdl;	/* ncdl values for memc */
++};
++
++struct nvram_tuple {
++	char *name;
++	char *value;
++	struct nvram_tuple *next;
++};
++
++#define NVRAM_HEADER		0x48534C46	/* 'FLSH' */
++#define NVRAM_VERSION		1
++#define NVRAM_HEADER_SIZE	20
++#define NVRAM_SPACE		0x8000
++
++#define NVRAM_MAX_VALUE_LEN 255
++#define NVRAM_MAX_PARAM_LEN 64
++
++char *nvram_get(const char *name);
++
++#endif

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно