Re: [OpenWrt-Devel] openwrt-devel Digest, Vol 34, Issue 18

2008-10-21 Thread Xavier Martinez

 Date: Sun, 19 Oct 2008 18:18:59 +0700
 From: Outback Dingo [EMAIL PROTECTED]
 Subject: Re: [OpenWrt-Devel] Nanostation antenna selection support
 To: OpenWrt Development List openwrt-devel@lists.openwrt.org
 Message-ID:
[EMAIL PROTECTED]
 Content-Type: text/plain; charset=iso-8859-1

  whats the option disabled do ???

 config 'wifi-device' 'wifi0'
 option 'type' 'atheros'
 option 'disabled' '0'


If disabled is set to 1, the the wifi interface is disabled. It is the
default option in openwrt. But how do you set on and off both diversities?




 On Sun, Oct 19, 2008 at 5:52 PM, Xavier Martinez 
 [EMAIL PROTECTED] wrote:

  Thank you Ulf. Just one question, how do you switch on and off the
  diversities?
 
 
 
 
 
  Message: 1
  Date: Wed, 15 Oct 2008 14:18:49 +0200
  From: ulf kypke [EMAIL PROTECTED]
  Subject: Re: [OpenWrt-Devel] Nanostation antenna selection support
  To: OpenWrt Development List openwrt-devel@lists.openwrt.org
  Message-ID:
 [EMAIL PROTECTED]
  Content-Type: text/plain; charset=ISO-8859-1
 
 
  hi, i was working with the nanostations some weeks ago,
  the big deal with the diversity is, that the nanostations has two
  diversity switches,
  so, as fare as i know, if diversity is complete disabled, the external
  antenna plug is the default one.
  if the first diversity in on and the second diversity switch is off,
  the horizontal antenna is activ,
  if both diversity switches are on the vertical antenna is activ.
 
 
  2008/10/14 Xavier Martinez [EMAIL PROTECTED]:
   Travis Kemen wrote:
  
   If you are using the internal antenna's on a ns2 they currently work
   via the madwifi rx(tx)antenna settings but to use the external
 antenna
   you need to install gpioctl and set softled to 0 for wifi0 in sysctl,
   then use gpioctl to set pin 7 low.
   I've tried this procedure to my NS2 with (openwrt trunk r12842 with
  gpioctl)
   in a 2 km link in adhoc mode without any external annena neither
   a pigtail connected to the SMA connector.
  
   My /etc/config/wireless looks like this:
  
   config 'wifi-device' 'wifi0'
   option 'type' 'atheros'
   option 'disabled' '0'
   option 'channel' '6'
   option 'mode' '11b'
   option 'txantenna' '2'
   option 'rxantenna' '2'
   option 'distance' '5000'
   option 'softled' '0'
   config 'wifi-iface'
   option 'device' 'wifi0'
   option 'encryption' 'none'
   option 'ssid' 'guifibages'
   option 'mode' 'adhoc'
   option 'bssid' '12:34:56:78:9A:BC'
   option 'network' 'wlan'
   option 'txpower' '16'
  
   Doing gpioctl set 7 results in a Pin 7 HIGH and the pings to the
 other
   machine are answered. In this case internal antenna is working. But
 when
  I
   do a gpioctl clear 7 resulting in a Pin 7 LOW, the pings are also
   answered. In think that its impossible to establish a 2 km link
 without
  an
   external antenna connected, so I think that internal antenna is also
   working. What do you think?
  
   I haven't had time to try connecting an external antenna focusing the
  other
   machine and the nanostation focusing the other side. This could
 clarify
  if
   both antennas are working with Pin 7 LOW or only the internal antenna
  does.
  
   What do you think?
   ___
   openwrt-devel mailing list
   openwrt-devel@lists.openwrt.org
   http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
  
  
 
 


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Edimax BR6104KP profile with rootfs on a USB drive

2008-10-21 Thread Stanislav Sinyagin
The Edimax BR6104KP router (also available as 
Omnima Embedded Controller from http://www.omnima.co.uk/ 
with JTAG and serial already soldered in) has only 2MB 
onboard flash, which is too small for any usable Linux setup.
The board has also two USB1.1 interfaces, and this patch introduces 
a new profile that builds two images: the flash image containing 
the LZMA loader and the kernel (less than 900KB), and a 
tar.gz archive of the root filesystem. The kernel looks to mount 
the rootfs as ext3 or ext2 on /dev/sda1.

The patches for include/image.mk and include/kernel-defaults.mk
extend the existing functionality and should not hurt any existing 
profile.

To use the new profile, choose in menuconfig:
Target System: Infineon/ADMtek ADM5120 [2.6]
Target Profile: Edimax BR-6104KP (USB Root FS)

The patch was tested, and by default it supports the onboard switch and 
the USB storage. Other kernel modules should function as well.

The next step will be to utilize the unused space in the onboard flash 
to store the persistent configuration, so that updating the rootfs would 
not hurt it.

A copy of the patch is available at 
http://torrus.org/openwrt.trunk.13018.br6104kp-usbroot.20081021.patch
It should work against the SVN trunk at revision 13018

Signed-off-by: Stanislav Sinyagin [EMAIL PROTECTED]


Index: include/image.mk
===
--- include/image.mk(revision 13021)
+++ include/image.mk(working copy)
@@ -63,12 +63,14 @@
   ifeq ($(CONFIG_TARGET_ROOTFS_TGZ),y)
 define Image/mkfs/tgz
$(TAR) -zcf $(BIN_DIR)/openwrt-$(BOARD)-rootfs.tgz --owner=root 
--group=root -C $(TARGET_DIR)/ .
+   $(call Image/Build,tgz)
 endef
   endif

   ifeq ($(CONFIG_TARGET_ROOTFS_CPIOGZ),y)
 define Image/mkfs/cpiogz
( cd $(TARGET_DIR); find . | cpio -o -H newc | gzip -9 
$(BIN_DIR)/openwrt-$(BOARD)-rootfs.cpio.gz )
+   $(call Image/Build,cpio)
 endef
   endif
 else
Index: include/kernel-defaults.mk
===
--- include/kernel-defaults.mk  (revision 13021)
+++ include/kernel-defaults.mk  (working copy)
@@ -91,6 +91,10 @@
$(LINUX_CONFCMD)  $(LINUX_DIR)/.config.target
$(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo 
$(TOPDIR)/.config  $(LINUX_DIR)/.config.override
$(SCRIPT_DIR)/kconfig.pl 'm+' $(LINUX_DIR)/.config.target 
$(LINUX_DIR)/.config.override  $(LINUX_DIR)/.config
+   if [ -f $(PLATFORM_DIR)/config/profile-$(PROFILE) ]; then \
+   mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.pkginfo; \
+   $(SCRIPT_DIR)/kconfig.pl '+' $(LINUX_DIR)/.config.pkginfo 
$(PLATFORM_DIR)/config/profile-$(PROFILE)  $(LINUX_DIR)/.config; \
+   fi
$(call Kernel/SetInitramfs)
$(call Kernel/Configure/$(KERNEL))
rm -rf $(KERNEL_BUILD_DIR)/modules
Index: target/linux/adm5120/router_le/profiles/Edimax.mk
===
--- target/linux/adm5120/router_le/profiles/Edimax.mk   (revision 13021)
+++ target/linux/adm5120/router_le/profiles/Edimax.mk   (working copy)
@@ -22,6 +22,30 @@
Package set optimized for the Edimax BR-6104KP
 endef

+define Profile/BR6104KP_USBROOTFS
+   NAME:=Edimax BR-6104KP (USB Root FS)
+   PACKAGES:=kmod-usb-core kmod-usb-adm5120
+endef
+
+define Profile/BR6104KP_USBROOTFS/Config
+   deselect squashfs
+   deselect USES_SQUASHFS
+   deselect jffs2
+   deselect USES_JFFS2
+   select PACKAGE_kmod-usb-core
+   select PACKAGE_kmod-usb-adm5120
+   select PACKAGE_kmod-usb-storage
+   select PACKAGE_kmod-fs-ext2
+   select PACKAGE_kmod-fs-ext3
+   select DEFAULT_kmod-ledtrig-adm5120-switch
+endef
+
+define Profile/BR6104KP_USBROOTFS/Description
+   Package set for the Edimax BR-6104KP with rootfs on USB drive.
+   The resut consists of a packed kernel image and the root filesystem
+   in a tar.gz archive.
+endef
+
 define Profile/BR6104WG
NAME:=Edimax BR-6104Wg (Unofficial, No WiFi)
 endef
@@ -40,5 +64,6 @@

 $(eval $(call Profile,BR6104K))
 $(eval $(call Profile,BR6104KP))
+$(eval $(call Profile,BR6104KP_USBROOTFS))
 $(eval $(call Profile,BR6104WG))
 $(eval $(call Profile,BR6114WG))
Index: 
target/linux/adm5120/router_le/base-files-BR6104KP_USBROOTFS/etc/config/fstab
===
--- 
target/linux/adm5120/router_le/base-files-BR6104KP_USBROOTFS/etc/config/fstab   
(revision 0)
+++ 
target/linux/adm5120/router_le/base-files-BR6104KP_USBROOTFS/etc/config/fstab   
(revision 0)
@@ -0,0 +1,10 @@
+config mount
+   option target   /home
+   option device   /dev/sda1
+   option fstype   ext3
+   option options  rw,sync
+   option enabled  0
+
+config swap
+   option device   /dev/sda2
+   option enabled  0
Index: target/linux/adm5120/image/router_le.mk