[Click] How to port Click to the Kamikaze openwrt OS ?

Dennis D.J. dennis_d at yahoo.cn
Thu Oct 15 08:05:40 EDT 2009


thx, thx a lot, I will have it try!


2009-10-15 



Dennis D.J. 



发件人: click-request 
发送时间: 2009-10-15  00:07:03 
收件人: click 
抄送: 
主题: click Digest, Vol 76, Issue 11 
 
Send click mailing list submissions to
click at amsterdam.lcs.mit.edu
To subscribe or unsubscribe via the World Wide Web, visit
https://amsterdam.lcs.mit.edu/mailman/listinfo/click
or, via email, send a message with subject or body 'help' to
click-request at amsterdam.lcs.mit.edu
You can reach the person managing the list at
click-owner at amsterdam.lcs.mit.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of click digest..."
Today's Topics:
   1.  How to port Click to the Kamikaze openwrt OS ? (Dennis D.J.)
   2. Re: How to port Click to the Kamikaze openwrt OS ?
      (Jonathan Kirchhoff)
----------------------------------------------------------------------
Message: 1
Date: Wed, 14 Oct 2009 11:02:43 +0800
From: "Dennis D.J." <dennis_d at yahoo.cn>
Subject: [Click]  How to port Click to the Kamikaze openwrt OS ?
To: "click" <click at pdos.csail.mit.edu>
Message-ID: <200910141102377034139 at yahoo.cn>
Content-Type: text/plain; charset="us-ascii"
hi, I'm tyring to do the same thing about complie click as a module of kamikaze(OpenWrt OS), I wonder what's the step of cross complie. I have managed to crosscomplie the kamikaze 8.09 in my x86 PC, but  I got no idea how to compile a module for a embeded linux. Is there anybody who can tell m? Thx a lot!
2009-10-14 
Dennis D.J.

------------------------------
Message: 2
Date: Wed, 14 Oct 2009 12:06:33 +0200
From: Jonathan Kirchhoff <kirchho at cs.uni-bonn.de>
Subject: Re: [Click] How to port Click to the Kamikaze openwrt OS ?
To: click at pdos.csail.mit.edu
Message-ID: <4AD5A2A9.8090407 at cs.uni-bonn.de>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Am 14.10.09 05:02, schrieb Dennis D.J.:
> hi, I'm tyring to do the same thing about complie click as a module of kamikaze(OpenWrt OS), I wonder what's the step of cross complie. I have managed to crosscomplie the kamikaze 8.09 in my x86 PC, but  I got no idea how to compile a module for a embeded linux. Is there anybody who can tell m? Thx a lot!
>
> 2009-10-14
>
>
>
> Dennis D.J.
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>    
Hi,
a few months ago, we were facing the same problem.
Crosscompiling Click Userlevel for OpenWRT (in our case it was for a 
Mipsel based Asus WL500GP) is possible, but it might be tricky if you 
have never used the buildroot before.
Once you have figured out how to build packages using the OpenWRT 
Buildroot, all you need is a proper makefile. This is the Makefile we used:
#
# Click 1.7.0rc1
#
# OpenWRT 8.09 Kamikaze
#
include $(TOPDIR)/rules.mk
PKG_NAME:=click
PKG_VERSION:=1.7.0rc1
PKG_RELEASE:=1
PKG_SOURCE_URL:=http://read.cs.ucla.edu/click/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
include $(INCLUDE_DIR)/package.mk
define Package/click
   SECTION:=net
   CATEGORY:=Network
   DEPENDS:=@BROKEN
   MENU:=1
   TITLE:=The Click Modular Router
   URL:=http://www.read.cs.ucla.edu/click/
endef
define Package/click/description
The Click Modular Router
endef
BUILDOPTS = \
         BUILD_CXX="g++ -I $(PKG_BUILD_DIR)/include-host" \
         BUILD_DL_LIBS="-ldl"
define Build/Configure
     (cd $(PKG_BUILD_DIR); \
         rm -rf config.{cache,status} ; \
         CONFIG_SITE= \
         ./configure; \
         rm -rf include-host; \
         $(CP) include include-host; \
         rm -rf config.{cache,status} ; \
         $(TARGET_CONFIGURE_OPTS) \
         CXXFLAGS="-static -Os -MD" \
         CFLAGS="-static -MD" \
         CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
         LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
         $(BUILDOPTS) \
         ./configure \
           --prefix=/usr \
           --target=$(GNU_TARGET_NAME) \
           --host=$(GNU_TARGET_NAME) \
           --build=$(GNU_HOST_NAME) \
           --enable-wifi \
           --disable-linuxmodule \
           --enable-tools=mixed \
              --disable-dynamic-linking \
     )
endef
define Build/Compile
     rm -rf $(PKG_INSTALL_DIR)
     mkdir -p $(PKG_INSTALL_DIR)
     $(CONF_OPTS) \
     $(MAKE) -C $(PKG_BUILD_DIR) \
         $(BUILDOPTS)
endef
define Package/click/install
     $(INSTALL_DIR) $(1)/usr/bin
     $(CP) $(PKG_BUILD_DIR)/userlevel/click $(1)/usr/bin/click
     $(CP) $(PKG_BUILD_DIR)/tools/click-align/click-align 
$(1)/usr/bin/click-align
endef
$(eval $(call BuildPackage,click))
The buildroot documentation helps a lot, so be sure to have a look:
http://downloads.openwrt.org/docs/buildroot-documentation.html
Another website, that might be interesting:
http://sarwiki.informatik.hu-berlin.de/Hacking_the_Netgear_wgt634u#Compiling_Click
Regards
Jonathan
------------------------------
_______________________________________________
click mailing list
click at amsterdam.lcs.mit.edu
https://amsterdam.lcs.mit.edu/mailman/listinfo/click
End of click Digest, Vol 76, Issue 11
*************************************


More information about the click mailing list