Re: [OpenWrt-Devel] how to apply driver patch to the kernel
On Sun, Oct 9, 2011 at 9:55 AM, abhinav narain abhinavnarai...@gmail.com wrote: hi, your method does not work. I tried doing this by adding a printk() line to module_exit() in ath9k in the file init.c The dmesg does not show any output of the changed line. Are you sure that (a) The code is compiled into the kernel (b) The code is lying in the exec path of the kernel and it is executed before a panic/something similar. it it is (a) You should probably mess with make files. if it is (b) Try adding the code in a different place or try adding printk's in arch/foo folder and then (re)generate your patch. It took me a lot of time to figure this out. Any help please ? On Thu, Oct 6, 2011 at 4:19 PM, Jonas Gorski jonas.gorski+open...@gmail.com wrote: Hi, On 6 October 2011 20:55, abhinav narain abhinavnarai...@gmail.com wrote: hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working mac80211 is actually a bit tricky since quilt doesn't work. I'd recommend cloning the appropriate tag from https://github.com/mcgrof/compat-wireless, then applying the OpenWrt patches on top of it (with e.g. git apply - don't forget to commit, but all as one should be fine). Then you can create patches you can put into package/mac80211/patches/ (they should come last). a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h index c03949e..0b31c10 100644 --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h The base is wrong, it should be a/drivers/net/... . without the compat-wireless... . @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should index line be present in the patch ? It doesn't hurt, but it doesn't help either, patch ignores it when applying them. For a working patch the ---/+++ lines and the changes are enough, everything else is just fluff. 1) Where should I place this patch file ? in package/mac80211/patches/ (where all patches are). 2) What are the set of easiest commands to get this patch to be applied/compile ? Copy the patch to the location above, do a make package/mac80211/{clean,compile} I saw Quilt http://wiki.openwrt.org/doc/devel/patches The asked to do make package/example/update V=99 Now I don't know what this example should be to use this command ? Not for mac80211/compat-wireless, so just ignore it ;) Regards Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
I am adding the following lines to the code : static void __exit ath9k_exit(void) { is_ath9k_unloaded = true; ath_ahb_exit(); ath_pci_exit(); ath_rate_control_unregister(); printk(KERN_INFO %s:* I added this* Driver unloaded\n, dev_info); * printk(KERN_INFO abhinav init );* } module_exit(ath9k_exit); I don't even get these printk(() output on dmesg ! when i do : rmmod ath9k.o I am following exactly what you have said above. I am not doing package/mac80211/{clean,compile} after package/mac80211/update and loading the image on the router. Please help, I am out of creativity of trying anything new on this thing. Abhinav On Fri, Oct 7, 2011 at 4:09 PM, Adam Porter porter.a...@gmail.com wrote: Hi, I'm not sure what Jonas is referencing when he says that quilt does not work in mac80211. It works fine. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update Your patch will be there. I've been making compat-wireless patches out of Trunk all day. On Fri, Oct 7, 2011 at 10:58 AM, abhinav narain abhinavnarai...@gmail.com wrote: When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/*build_dir*/*toolchain-mips_r2_gcc* -4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/*build_dir*/*linux-ar71xx_generic* /linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
On Sun, Oct 9, 2011 at 2:19 PM, abhinav narain abhinavnarai...@gmail.com wrote: I am adding the following lines to the code : static void __exit ath9k_exit(void) { is_ath9k_unloaded = true; ath_ahb_exit(); ath_pci_exit(); ath_rate_control_unregister(); printk(KERN_INFO %s: I added this Driver unloaded\n, dev_info); printk(KERN_INFO abhinav init ); } module_exit(ath9k_exit); I don't even get these printk(() output on dmesg ! when i do : rmmod ath9k.o I am following exactly what you have said above. I am not doing package/mac80211/{clean,compile} after package/mac80211/update and loading the image on the router. Please help, I am out of creativity of trying anything new on this thing. were both these line added by you ?? printk(KERN_INFO %s: I added this Driver unloaded\n, dev_info); printk(KERN_INFO abhinav init ); Try printk with KERN_CRIT instead of KERN_INFO and see if you have any success. If you have compiled the kernel as a monolithic kernel .. do strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. also please see my previous mail. Abhinav On Fri, Oct 7, 2011 at 4:09 PM, Adam Porter porter.a...@gmail.com wrote: Hi, I'm not sure what Jonas is referencing when he says that quilt does not work in mac80211. It works fine. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update Your patch will be there. I've been making compat-wireless patches out of Trunk all day. On Fri, Oct 7, 2011 at 10:58 AM, abhinav narain abhinavnarai...@gmail.com wrote: When I modify the files in the following folder and make deliberate syntax errors and then do a make $make package/mac80211/{clean,compile} V=99 folder : openwrt/src/klatch/build_dir/toolchain-mips_r2_gcc-4.5-linaro_uClibc-0.9.32/linux-2.6.39.4/drivers/net/wireless/ath/ath9k I don't get any compilation errors ! I tried modifying and writing syntactically wrong code in other folder also, but no compilation errors, openwrt/src/klatch/build_dir/linux-ar71xx_generic/linux-2.6.39.4/drivers/net/wireless/ath/ath9k. Which source file shall i make changes to ? Does Openwrt take the files directly from dl/ folder and untars it every time it compiles ? Please help in resolving the issue Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
On Sun, Oct 9, 2011 at 7:26 AM, Felix Fietkau n...@openwrt.org wrote: On 2011-10-09 10:49 AM, abhinav narain wrote: I am adding the following lines to the code : static void __exit ath9k_exit(void) { is_ath9k_unloaded = true; ath_ahb_exit(); ath_pci_exit(); ath_rate_control_unregister(); printk(KERN_INFO %s:*I added this* Driver unloaded\n, dev_info); * printk(KERN_INFO abhinav init );* } module_exit(ath9k_exit); I don't even get these printk(() output on dmesg ! when i do : rmmod ath9k.o I am following exactly what you have said above. I am not doing package/mac80211/{clean,**compile} after package/mac80211/update and loading the image on the router. Please help, I am out of creativity of trying anything new on this thing. You're probably editing in the wrong place. OpenWrt does not use mac80211 or ath9k from build_dir/linux-ar71xx_**generic/linux-2.6.39.4. What you're interested in is in build_dir/linux-ar71xx_**generic/compat-wireless-*/ I want to modify compat wireless driver. this is what documentation I am following http://wiki.openwrt.org/doc/devel/patches . More precisely this : # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update After above I copy the image on the router. The changes are reflected in the code in build_dir/linux-ar71xx/compat../drivers/net/...ath9k/init.c I suggest you read up on how to use quilt for managing patches on packages, the OpenWrt package that this build dir belongs to is package/mac80211. After you modify it, don't run make package/mac80211/clean, that'll throw away all of your modifications :) I am running mac80211/update as the last command before uploading the image on router. I think that should be it, but I don't get printk() outputs. Abhinav ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] modifying source code in OpenWrt
On 2011-10-09 3:39 PM, abhinav narain wrote: On Sun, Oct 9, 2011 at 7:26 AM, Felix Fietkau n...@openwrt.org mailto:n...@openwrt.org wrote: On 2011-10-09 10:49 AM, abhinav narain wrote: I am adding the following lines to the code : static void __exit ath9k_exit(void) { is_ath9k_unloaded = true; ath_ahb_exit(); ath_pci_exit(); ath_rate_control_unregister(); printk(KERN_INFO %s:*I added this* Driver unloaded\n, dev_info); * printk(KERN_INFO abhinav init );* } module_exit(ath9k_exit); I don't even get these printk(() output on dmesg ! when i do : rmmod ath9k.o I am following exactly what you have said above. I am not doing package/mac80211/{clean,__compile} after package/mac80211/update and loading the image on the router. Please help, I am out of creativity of trying anything new on this thing. You're probably editing in the wrong place. OpenWrt does not use mac80211 or ath9k from build_dir/linux-ar71xx___generic/linux-2.6.39.4. What you're interested in is in build_dir/linux-ar71xx___generic/compat-wireless-*/ I want to modify compat wireless driver. this is what documentation I am following http://wiki.openwrt.org/doc/devel/patches . More precisely this : # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update After above I copy the image on the router. The changes are reflected in the code in build_dir/linux-ar71xx/compat../drivers/net/...ath9k/init.c I suggest you read up on how to use quilt for managing patches on packages, the OpenWrt package that this build dir belongs to is package/mac80211. After you modify it, don't run make package/mac80211/clean, that'll throw away all of your modifications :) I am running mac80211/update as the last command before uploading the image on router. I think that should be it, but I don't get printk() outputs. If you reflash, then you need to rebuild the firmware before you do so. Otherwise you could just use make package/mac80211/compile and copy bin/ar71xx/packages/kmod-ath* to the router and install it there. - Feix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [patch] Orion generic target: enhanced image makefile
This patch is a complete overhaul of the image makefile for the Orion generic target.[BR] Code is written in a way that it can be reused several times in the image file, but can also be easily adopted to other targets (BuildKernel, Sysupgrade image, etc.).[BR] Only working images are generated, e.g. only JFFS images for the erase size (WRT350Nv2 = 64k, WNR854T = 128k). Signed-off-by: Matthias Buecher mail@… Corresponding ticket 10205: https://dev.openwrt.org/ticket/10205 Index: target/linux/orion/image/generic.mk === --- target/linux/orion/image/generic.mk (revision 28391) +++ target/linux/orion/image/generic.mk (working copy) @@ -1,90 +1,151 @@ # -# Copyright (C) 2008-2010 OpenWrt.org +# Copyright (C) 2008-2011 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # +### DO NOT INDENT LINES CONTAINING $(call xyz) AS THIS MAY CHANGE THE CONTEXT +### OF THE FIRST LINE IN THE CALLED VARIABLE (NOTE: variable!) +### see http://www.gnu.org/software/make/manual/html_node/Call-Function.html#Call-Function + + +### +### Image/Prepare +### + define Image/Prepare - cp $(LINUX_DIR)/arch/arm/boot/uImage $(KDIR)/uImage +### Dummy comment for indented calls of Image/Prepare + cp $(LINUX_DIR)/arch/arm/boot/zImage $(BIN_DIR)/$(IMG_PREFIX)-zImage endef + +### +### Image/BuildKernel +### + define Image/BuildKernel - # Orion Kernel uImages - # WRT350N v2: mach id 1633 (0x661) - echo -en \x06\x1c\xa0\xe3\x61\x10\x81\xe3 $(KDIR)/wrt350nv2-zImage - cat $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/wrt350nv2-zImage +### Dummy comment for indented calls of Image/BuildKernel + # Netgear WNR854T: mach id 1801 (0x0709) +$(call Image/BuildKernel/Default,wnr854t,\x07\x1c\xa0\xe3\x09\x10\x81\xe3) + # Linksys WRT350N v2: mach id 1633 (0x0661) +$(call Image/BuildKernel/Default,wrt350nv2,\x06\x1c\xa0\xe3\x61\x10\x81\xe3) +endef + +define Image/BuildKernel/Default + # parameters: 1 = machine name, 2 = machine id as string + # Orion Kernel uImage for $(1) + # merge machine id and regular zImage into one file + echo -en $(2) $(KDIR)/$(1)-zImage + cat $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/$(1)-zImage + # create uImage from file created in previous steps $(STAGING_DIR_HOST)/bin/mkimage -A arm -O linux -T kernel \ -C none -a 0x8000 -e 0x8000 -n 'Linux-$(LINUX_VERSION)' \ - -d $(KDIR)/wrt350nv2-zImage $(KDIR)/wrt350nv2-uImage - cp $(KDIR)/wrt350nv2-uImage $(BIN_DIR)/openwrt-wrt350nv2-uImage - # WNR854T: mach id 1801 (0x709) - echo -en \x07\x1c\xa0\xe3\x09\x10\x81\xe3 $(KDIR)/wnr854t-zImage - cat $(LINUX_DIR)/arch/arm/boot/zImage $(KDIR)/wnr854t-zImage - $(STAGING_DIR_HOST)/bin/mkimage -A arm -O linux -T kernel \ - -C none -a 0x8000 -e 0x8000 -n 'Linux-$(LINUX_VERSION)' \ - -d $(KDIR)/wnr854t-zImage $(KDIR)/wnr854t-uImage - cp $(KDIR)/wnr854t-uImage $(BIN_DIR)/openwrt-wnr854t-uImage + -d $(KDIR)/$(1)-zImage $(KDIR)/$(1)-uImage + # copy uImage to bin dir + cp $(KDIR)/$(1)-uImage $(BIN_DIR)/openwrt-$(1)-uImage endef -define Image/Build/Netgear - # Orion Netgear Images - mkdir $(KDIR)/netgear_image - cp $(KDIR)/wnr854t-uImage $(KDIR)/netgear_image/uImage - $(STAGING_DIR_HOST)/bin/mkfs.jffs2 -m none -p -l -q -e 128KiB -o $(KDIR)/wnr854t-uImage.jffs2 -d $(KDIR)/netgear_image - rm -rf $(KDIR)/netgear_image + +### +### Image/Build +### + +define Image/Build +### Dummy comment for indented calls of Image/Build +$(call Image/Build/$(1),$(1)) + # Netgear WNR854T: erase size is 128k = 0x0002 = 131072 +$(call Image/Build/Netgear/wnr854t,$(1),128k,1048576,NG_WNR854T) + # Linksys WRT350N v2: erase size is 64k = 0x0001 = 65536 +$(call Image/Build/Linksys/wrt350nv2,$(1),64k,1048576) +endef + +define Image/Build/squashfs +$(call prepare_generic_squashfs,$(KDIR)/root.squashfs) +endef + +define Image/Build/Default/sysupgrade + # parameters: 1 = rootfs type, 2 = machine name, 3 = pad size (erase or kernel size) + # Orion $(1) sysupgrade image for $(2) + # sysupgrade image ( \ - dd if=$(KDIR)/wnr854t-uImage.jffs2 bs=1024k conv=sync; \ - dd if=$(KDIR)/root.$(1) bs=128k conv=sync; \ - ) $(BIN_DIR)/openwrt-$(2)-$(1).img + dd if=${KDIR}/$(2)-uImage bs=$(3) conv=sync; \ + dd if=${KDIR}/root.$(1); \ + ) ${BIN_DIR}/openwrt-$(2)-$(1).img +endef + +define Image/Build/Default/webupgrade + # parameters: 1 = rootfs type, 2 = machine name, 3 = header + # Orion $(1) webupgrade image for $(2) + # webupgrade image $(STAGING_DIR_HOST)/bin/add_header $(3) $(BIN_DIR)/openwrt-$(2)-$(1).img $(BIN_DIR)/openwrt-$(2)-$(1)-webupgrade.img endef -define Image/Build/Linksys - # Orion Linksys Images - # sysupgrade image - ( \ - dd
Re: [OpenWrt-Devel] [PATCH] upgrade baresip, restund, libre, librem to version 0.3.0
Hi, updated patch attached, see inline .. On 9/25/11 3:44 PM, Jonas Gorski wrote: Hi, On 25 September 2011 15:02, Alfred E. Heggestada...@db.org wrote: Hi, a couple of weeks ago I released a new version of my open-source VOIP projects, which is now at version 0.3.0: http://www.creytiv.com/ this patch upgrades the following packages to v0.3.0: baresip v0.3.0 (Portable and modular SIP User-Agent with audio and video support) restund v0.3.0 (Modular STUN/TURN server) libre v0.3.0 (Generic library for real-time communications with async IO support) librem v0.3.0 (Audio and video processing media library) Unless they depend on being the same version, these updates/adds should be individual patches. for now all projects are released as a bundle, but in the future I might release maintenance releases of certain projects with only the patch-number bumped. I have also removed the @BROKEN symbol, as all packages build fine here with trunk r28297 for at least BRCM, AR7, x86 and UML architectures. I read on the forum that there was some problems building the programs but I did not find any reports on which architectures were failing or any build logs. would it be possible to get notified somehow if such a thing happens ? If your programs needs NPTL/TLS, it might fail (to build) on some platforms. I don't know whether this is the case. Look at the the uclibc configuration for the targets; check if it has LINUXTHREADS_OLD; you might want to try one of these targets. thanks for your suggestion, and also thanks to Jo-Philipp for good feedback. all issues should be fixed in this patch, and I hope that it will now build on all supported platforms. Please review and apply if OK. Thanks Since these are yours, have you thought about applying for maintainership? ;-) thanks for the offering, but I prefer to send patches to the mailing-list for now. the code review is very much appreciated. Signed-Off-By: Alfred E. Heggestad This isn't a valid SOB, you are missing your email address (don't worry, trac and the ml-archives will filter it out for the publicly visible parts). Signed-Off-By: Alfred E. Heggestad a...@db.org Now on to the actual patch: ... (snip) Index: feeds/packages/net/baresip/Makefile === --- feeds/packages/net/baresip/Makefile (revision 28297) +++ feeds/packages/net/baresip/Makefile (working copy) (snip) @@ -70,6 +70,7 @@ LIBRE_MK=../re-$(PKG_VERSION)/mk/re.mk \ LIBRE_INC=../re-$(PKG_VERSION)/include \ LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \ + LIBREM_PATH=../rem-$(PKG_VERSION) \ These look wrong; is there a reason for not doing it like restund: LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \ LIBRE_INC=$(STAGING_DIR)/usr/include/re \ fixed Index: feeds/packages/libs/rem/Makefile === --- feeds/packages/libs/rem/Makefile(revision 0) +++ feeds/packages/libs/rem/Makefile(revision 0) (snip) +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + LIBRE_INC=../re-$(PKG_VERSION)/include \ Same comment as above. fixed Regards Jonas updated patch is attached, please review and apply if okay. /alfred Index: feeds/packages/net/restund/Makefile === --- feeds/packages/net/restund/Makefile (revision 28391) +++ feeds/packages/net/restund/Makefile (working copy) @@ -7,20 +7,20 @@ include $(TOPDIR)/rules.mk PKG_NAME:=restund -PKG_VERSION:=0.2.0 +PKG_VERSION:=0.3.0 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.creytiv.com/pub/ -PKG_MD5SUM:=b8fa2ab40d7952fd78c5d72ab1742232 +PKG_MD5SUM:=e82bdb994b26b8c16d799b3dc8dd0008 include $(INCLUDE_DIR)/package.mk define Package/restund SECTION:=net CATEGORY:=Network - DEPENDS:=+libre @BROKEN - TITLE:=libre stun server + DEPENDS:=+libre + TITLE:=Modular STUN/TURN server URL:=http://www.creytiv.com/ endef @@ -30,13 +30,16 @@ $(MAKE) -C $(PKG_BUILD_DIR) \ LIBRE_MK=$(STAGING_DIR)/usr/share/re/re.mk \ LIBRE_INC=$(STAGING_DIR)/usr/include/re \ + LIBRE_SO=$(STAGING_DIR)/usr/lib/libre.so \ CC=$(TARGET_CC) \ - CFLAGS=$(TARGET_CFLAGS) \ + EXTRA_CFLAGS=$(TARGET_CFLAGS) \ DESTDIR=$(PKG_INSTALL_DIR) \ $(PKG_MAKE_OPTS) \ SYSROOT=$(TOOLCHAIN_DIR) \ SYSROOT_ALT=$(STAGING_DIR)/usr \ RELEASE=1 \ + CROSS_COMPILE=$(TARGET_CROSS) \ + OS=linux \ all install endef Index: feeds/packages/net/baresip/patches/100-loginname.patch === ---
Re: [OpenWrt-Devel] [PATCH] support for I2C kernel modules (i2c-tiny-usb, pca954x, pca953x, pcf857x)
Florian Fainelli schrieb: On Wednesday 22 June 2011 00:14:08 Hartmut Knaack wrote: This patch should bring support for several kernel modules related to I2C to openwrt, which are existing for several years now. Namely there is the i2c-tiny-usb bus driver, to hook up an I2C bus on any device with usb support (prevent voiding warranty when opening and soldering). Second, there is support for the i2c-mux driver and pca954x as a I2C switch driver. Finally there is support for common I2C gpio expander driver modules pca953x and pcf857x. They work without providing platform data recently (can be instantiated at runtime). Signed-off-by: Hartmut Knaack knaack.h [at] gmx.de Applied in r28334, thanks! I just saw in trunk, that you accidently put these sections into the octeon section ($(eval $(call KernelPackage,octeon-i2c)) is now all at the end, not before my changes start). Though it doesn't seem to hurt while compiling (I haven't selected the octeon stuff), I recommend to move that line back to the position, where it syntactically belongs. Cheers, Hartmut ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH] Fix md5 hash for distribute package
It seems the original tarball was uploaded again to http://pypi.python.org/pypi/distribute/ on 2011-09-22, after our Makefile was updated. Anyway, it is fixed in [28396]. Also, the matching tarball was uploaded to http://downloads.openwrt.org/sources/ to prevent this from happening again. -- -{Nico} ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
Hi, Jonas, Adam, Harish. so I have got a printk() msg on dmesg but only doing the following : modifying the tar in dl/ folder and deleting the build_dir directory. make package/mac80211/{clean,compile} Now it definitely compiles my modifications I have written the following note to tell I am doing right things without ambiguity as told by you all. @Adam, As you can see, I am modifying the build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ Hence I am modifying at the right place, I suppose ( as suggested by you. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update I do a make package/mac80211/update in openwrt/src/klash (same where update is done) I get the patch code in the build_dir/compat-wireless/ /ath9k But, I did not get the printk() message in the dmesg. @Harish : I am not sure how to trigger monolithic kernel, but i dont get any output of strings ... because vmlinux does not exist monolithic kernel ? option strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. @Jonas: i kept the patch in package/mac80211/patches/ with latest serial no. in the list of patches Applied make package/mac80211/{clean,compile} This will fetch the compat source from dl/ and apply new patches. But i did not get the printk() by this method. I am surprized why these things are not working. I am copying the factory.img, sometimes doing: sysupgrade -n -v -d 30 open...-sysupgrade.bin To copy this on router and still the code changes were not reflected while testing the dmesg output! Can any of you guess where am I going wrong in the above process... As i have to write and test actual code and it will be tedious to put things everytime in dl/ as tarball. Abhinav On Sun, Oct 9, 2011 at 2:31 AM, harish badrinath harishbadrin...@gmail.comwrote: On Sun, Oct 9, 2011 at 9:55 AM, abhinav narain abhinavnarai...@gmail.com wrote: hi, your method does not work. I tried doing this by adding a printk() line to module_exit() in ath9k in the file init.c The dmesg does not show any output of the changed line. Are you sure that (a) The code is compiled into the kernel (b) The code is lying in the exec path of the kernel and it is executed before a panic/something similar. it it is (a) You should probably mess with make files. if it is (b) Try adding the code in a different place or try adding printk's in arch/foo folder and then (re)generate your patch. It took me a lot of time to figure this out. Any help please ? On Thu, Oct 6, 2011 at 4:19 PM, Jonas Gorski jonas.gorski+open...@gmail.com wrote: Hi, On 6 October 2011 20:55, abhinav narain abhinavnarai...@gmail.com wrote: hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working mac80211 is actually a bit tricky since quilt doesn't work. I'd recommend cloning the appropriate tag from https://github.com/mcgrof/compat-wireless, then applying the OpenWrt patches on top of it (with e.g. git apply - don't forget to commit, but all as one should be fine). Then you can create patches you can put into package/mac80211/patches/ (they should come last). a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h index c03949e..0b31c10 100644 --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h The base is wrong, it should be a/drivers/net/... . without the compat-wireless... . @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should index line be present in the patch ? It doesn't hurt, but it doesn't help either, patch ignores it when applying them. For a working patch the ---/+++ lines and the changes are enough, everything else is just fluff. 1) Where should I place this patch file ? in package/mac80211/patches/ (where all patches are). 2) What are the set of easiest commands to get this patch to be applied/compile ? Copy the patch to the location above, do a make package/mac80211/{clean,compile} I saw Quilt http://wiki.openwrt.org/doc/devel/patches The asked to do make package/example/update V=99 Now I don't know what this example should be to use this command ? Not for mac80211/compat-wireless, so just ignore it ;) Regards Jonas ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
Did you try to increase the printk debug level in run time? echo 8 /proc/sys/kernel/printk Murat On Oct 9, 2011, at 18:47, abhinav narain abhinavnarai...@gmail.com wrote: Hi, Jonas, Adam, Harish. so I have got a printk() msg on dmesg but only doing the following : modifying the tar in dl/ folder and deleting the build_dir directory. make package/mac80211/{clean,compile} Now it definitely compiles my modifications I have written the following note to tell I am doing right things without ambiguity as told by you all. @Adam, As you can see, I am modifying the build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ Hence I am modifying at the right place, I suppose ( as suggested by you. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update I do a make package/mac80211/update in openwrt/src/klash (same where update is done) I get the patch code in the build_dir/compat-wireless/ /ath9k But, I did not get the printk() message in the dmesg. @Harish : I am not sure how to trigger monolithic kernel, but i dont get any output of strings ... because vmlinux does not exist monolithic kernel ? option strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. @Jonas: i kept the patch in package/mac80211/patches/ with latest serial no. in the list of patches Applied make package/mac80211/{clean,compile} This will fetch the compat source from dl/ and apply new patches. But i did not get the printk() by this method. I am surprized why these things are not working. I am copying the factory.img, sometimes doing: sysupgrade -n -v -d 30 open...-sysupgrade.bin To copy this on router and still the code changes were not reflected while testing the dmesg output! Can any of you guess where am I going wrong in the above process... As i have to write and test actual code and it will be tedious to put things everytime in dl/ as tarball. Abhinav On Sun, Oct 9, 2011 at 2:31 AM, harish badrinath harishbadrin...@gmail.com wrote: On Sun, Oct 9, 2011 at 9:55 AM, abhinav narain abhinavnarai...@gmail.com wrote: hi, your method does not work. I tried doing this by adding a printk() line to module_exit() in ath9k in the file init.c The dmesg does not show any output of the changed line. Are you sure that (a) The code is compiled into the kernel (b) The code is lying in the exec path of the kernel and it is executed before a panic/something similar. it it is (a) You should probably mess with make files. if it is (b) Try adding the code in a different place or try adding printk's in arch/foo folder and then (re)generate your patch. It took me a lot of time to figure this out. Any help please ? On Thu, Oct 6, 2011 at 4:19 PM, Jonas Gorski jonas.gorski+open...@gmail.com wrote: Hi, On 6 October 2011 20:55, abhinav narain abhinavnarai...@gmail.com wrote: hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working mac80211 is actually a bit tricky since quilt doesn't work. I'd recommend cloning the appropriate tag from https://github.com/mcgrof/compat-wireless, then applying the OpenWrt patches on top of it (with e.g. git apply - don't forget to commit, but all as one should be fine). Then you can create patches you can put into package/mac80211/patches/ (they should come last). a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h index c03949e..0b31c10 100644 --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h The base is wrong, it should be a/drivers/net/... . without the compat-wireless... . @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should index line be present in the patch ? It doesn't hurt, but it doesn't help either, patch ignores it when applying them. For a working patch the ---/+++ lines and the changes are enough, everything else is just fluff. 1) Where should I place this patch file ? in package/mac80211/patches/ (where all patches are). 2) What are the set of easiest commands to get this patch to be applied/compile ? Copy the patch to the location above, do a make package/mac80211/{clean,compile} I saw Quilt http://wiki.openwrt.org/doc/devel/patches The asked to do make package/example/update V=99 Now I don't know what this example should be to use this command ? Not for mac80211/compat-wireless, so just ignore it ;) Regards Jonas
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
yes, already. On Sun, Oct 9, 2011 at 11:25 PM, Murat Sezgin sezginmu...@gmail.com wrote: Did you try to increase the printk debug level in run time? echo 8 /proc/sys/kernel/printk Murat On Oct 9, 2011, at 18:47, abhinav narain abhinavnarai...@gmail.com wrote: Hi, Jonas, Adam, Harish. so I have got a printk() msg on dmesg but only doing the following : modifying the tar in dl/ folder and deleting the build_dir directory. make package/mac80211/{clean,compile} Now it definitely compiles my modifications I have written the following note to tell I am doing right things without ambiguity as told by you all. @Adam, As you can see, I am modifying the build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ Hence I am modifying at the right place, I suppose ( as suggested by you. # make package/mac80211/{clean,prepare} V=99 QUILT=1 # cd build_dir/linux-ar71xx_generic/compat-wireless-2011-08-10/ # quilt push -a # quilt new my_changes.patch # quilt edit drivers/net/wireless/ath/ath9k/files # quilt refresh # cd ../../../ make package/mac80211/update I do a make package/mac80211/update in openwrt/src/klash (same where update is done) I get the patch code in the build_dir/compat-wireless/ /ath9k But, I did not get the printk() message in the dmesg. @Harish : I am not sure how to trigger monolithic kernel, but i dont get any output of strings ... because vmlinux does not exist monolithic kernel ? option strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. @Jonas: i kept the patch in package/mac80211/patches/ with latest serial no. in the list of patches Applied make package/mac80211/{clean,compile} This will fetch the compat source from dl/ and apply new patches. But i did not get the printk() by this method. I am surprized why these things are not working. I am copying the factory.img, sometimes doing: sysupgrade -n -v -d 30 open...-sysupgrade.bin To copy this on router and still the code changes were not reflected while testing the dmesg output! Can any of you guess where am I going wrong in the above process... As i have to write and test actual code and it will be tedious to put things everytime in dl/ as tarball. Abhinav On Sun, Oct 9, 2011 at 2:31 AM, harish badrinath harishbadrin...@gmail.com harishbadrin...@gmail.com wrote: On Sun, Oct 9, 2011 at 9:55 AM, abhinav narain abhinavnarai...@gmail.comabhinavnarai...@gmail.com wrote: hi, your method does not work. I tried doing this by adding a printk() line to module_exit() in ath9k in the file init.c The dmesg does not show any output of the changed line. Are you sure that (a) The code is compiled into the kernel (b) The code is lying in the exec path of the kernel and it is executed before a panic/something similar. it it is (a) You should probably mess with make files. if it is (b) Try adding the code in a different place or try adding printk's in arch/foo folder and then (re)generate your patch. It took me a lot of time to figure this out. Any help please ? On Thu, Oct 6, 2011 at 4:19 PM, Jonas Gorski jonas.gorski%2bopen...@gmail.comjonas.gorski+open...@gmail.com wrote: Hi, On 6 October 2011 20:55, abhinav narain abhinavnarai...@gmail.com abhinavnarai...@gmail.com wrote: hi, This is my first experience with writing a patch/using git. I need some specific answers to get it working mac80211 is actually a bit tricky since quilt doesn't work. I'd recommend cloning the appropriate tag from https://github.com/mcgrof/compat-wireless https://github.com/mcgrof/compat-wireless, then applying the OpenWrt patches on top of it (with e.g. git apply - don't forget to commit, but all as one should be fine). Then you can create patches you can put into package/mac80211/patches/ (they should come last). a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h index c03949e..0b31c10 100644 --- a/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/compat-wireless-2011-08-10/drivers/net/wireless/ath/ath9k/ath9k.h The base is wrong, it should be a/drivers/net/... . without the compat-wireless... . @@ -122,9 +122,14 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, /***/ My questing is : 0) should index line be present in the patch ? It doesn't hurt, but it doesn't help either, patch ignores it when applying them. For a working patch the ---/+++ lines and the changes are enough, everything else is just fluff. 1) Where should I place this patch file ? in package/mac80211/patches/ (where all patches are). 2) What are the set of easiest commands to get this patch to be applied/compile ? Copy the patch to the location above, do a make package/mac80211/{clean,compile} I saw Quilt
Re: [OpenWrt-Devel] how to apply driver patch to the kernel
Hello, @Harish : I am not sure how to trigger monolithic kernel, but i dont get any output of strings ... because vmlinux does not exist monolithic kernel ? option My way of saying .. if you compiled everything you needed into the kernel binary instead of compiling it as (optional) modules. strings vmlinux | grep abhinav Note: vmlinux is not vmlinuz .. find . -name vmlinux -exec strings {} \; | grep -i LINUX find . -name *.ko -exec strings {} \; | grep -i LINUX replace linux with your name or other notable string. Of course this assumes that you are doing this from openrwrt build root, in other words $PWD should be openwrt build root directory. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel