[maemo-developers] [maemo-developers] Patching Nokia 770 Kernel to get DLINK DUB-E100 Rev B to work
From: Simon Moore simon.moore at ndirect.co.ukDate: Thu Nov 9 15:18:09 EET 2006
- Previous message: [maemo-developers] Working Peripherals for Wired Networking and Serial and powering Nokia from Hub
- Next message: [maemo-developers] Patching Nokia 770 Kernel to get DLINK DUB-E100 Rev B to work
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
My method works by recompiling the whole kernel and building the modules into the kernel - it should be possible to compile just the modules as loadable modules but I can't find any HowTo's on this, so if there is anyone out there that can tell me how to compile a kernel module in scratchox, I'd much appreciate it. In the mean time, in case anyone else read the post about DLINK DUB-E100 working out of the box and bought theirs to find it didn't - here is my how to. Patching Kernel to get DLINK DUB-E100 Rev B to work (Rev A should work out of the box and actually uses a different chip). Rev B uses AX88178 Using asix.c, usbnet.c usbnet.h from 2.6.18 Kernel Source (just download from kernel.org) (The Nokia is on 2.6.16 which doesn't have the basic AX88178 code in it) In the directory with the above files patch -iusb_net_e100.patch asix.c patch -iusb_net_e100.patch2 asix.c patch -iusb_net_e100.patch0 No doubt in a later kernel these patches will be built in. ##Build kernel in scratchbox (vanila kernel) #First Time based on http://maemo.org/maemowiki/HowTo_KernelCompilation sbox-config -ct MAEMO_KERNEL #select newly installed gcc 3.4 toolchain #select qemu-arm as CPU transparency mode #select debian devkit #3 Select the newly created target, install ARM rootstrap, and finish toolchain setup sbox-config -st MAEMO_KERNEL sbox-config -er /scratchbox/packages/Maemo_Dev_Platform_RS_v1.1_arm.tgz sbox-config -cc sbox-config -cf mkdir ~/kernel-build sbox-config -st MAEMO_KERNEL apt-get update cd ~/kernel-build fakeroot apt-get install kernel-source-2.6.16 kernel-package #don't think we actually need this in IT2006, doesn't seem to work apt-get source su-18-kernel cd su-18-kernel-2.6.16 dpkg-buildpackage -rfakeroot -uc -us -sa -d ##builds it fakeroot dpkg -i ../su-18-kernel_*.deb ##installs cp asix.c /scratchbox/users/[username]/scratchbox/users/[username]/home/[username]/kernel-build/su-18-kernel-2.6.16/kernel-source-2.6.16/drivers/usb/net/ cp usbnet.h /scratchbox/users/[username]/scratchbox/users/[username]/home/[username]/kernel-build/su-18-kernel-2.6.16/kernel-source-2.6.16/drivers/usb/net/ cp usbnet.c /scratchbox/users/[username]/scratchbox/users/[username]/home/[username]/kernel-build/su-18-kernel-2.6.16/kernel-source-2.6.16/drivers/usb/net/ ##Build in scratchbox #Second time, modified #1 Edit ~/kernel-build/su-18-kernel-2.6.12.3/debian/rules so that modifications may be done #Make sure the following two lines are commented or removed completely: #build-stamp section: tar jxf /usr/src/kernel-source-$(SOURCE_VERSION).tar.bz2 #clean section: rm -rf kernel-source-$(SOURCE_VERSION) chmod a+w ~/kernel-build/su-18-kernel-2.6.12.3/kernel-source-2.6.12.3/arch/arm/configs/n770_defconfig # Make your modifications to /kernel-build/su-18-kernel-2.6.12.3/kernel-source-2.6.12.3/arch/arm/configs/n770_defconfig # You should set USBNET and ASIX to Y from M (i.e. so it is compiled in kernel not as module - cause I have no idea how to compile just the module, if you do let me know) cd su-18-kernel-2.6.16 vi kernel-source-2.6.16/Makefile #change to EXTRAVERSION = .27 #Only needed in second release of IT2006 using First release source dpkg-buildpackage -rfakeroot -uc -us -sa -d fakeroot dpkg -i ../su-18-kernel_*.deb ##Deploy to device ./flasher-2.0 --query-root-device --read-board-id --query-rd-mode ./flasher-2.0 -l -b -k /scratchbox/users/[username]/targets/MAEMO_KERNEL/usr/share/osso/kernels/zImage-su-18-200645 Once happy Flash permanently ./flasher-2.0 -f -k /scratchbox/users/[username]/targets/MAEMO_KERNEL/usr/share/osso/kernels/zImage-su-18-200645 On device (assuming everything connected up) as ROOT Auto DHCP config udhcpc OR Auto DHCP config and request an IP udhcpc -r 192.168.1.110 OR Manually configure ifconfig etho 192.168.1.59 route add default gw 192.168.1.1 echo "nameserver 192.168.1.1" > /etc/resolv.conf echo "nameserver 192.168.1.1" > /tmp/resolv.conf.eth0 iconfig to show details of whatever you setup --- Patches I used attatched Or the correct ones from online. http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/2.6/2.6.18/usb-usbnet-add-unlink_rx_urbs-call-to-allow-for-jumbo-frames.patch http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/2.6/2.6.18/usb-asix-add-ax88178-support-and-many-other-changes.patch http://www.kernel.org/pub/linux/kernel/people/gregkh/usb/2.6/2.6.18/usb-asix-add-alternate-device-ids-for-dlink-dub-e100-rev-b1.patch OR http://mailman.laptop.org/pipermail/devel/2006-August/001466.html -------------- next part -------------- A non-text attachment was scrubbed... Name: kernel.zip Type: application/zip Size: 11696 bytes Desc: not available Url : http://lists.maemo.org/pipermail/maemo-developers/attachments/20061109/54bf56ee/attachment.zip -------------- next part -------------- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.0/524 - Release Date: 08/11/2006
- Previous message: [maemo-developers] Working Peripherals for Wired Networking and Serial and powering Nokia from Hub
- Next message: [maemo-developers] Patching Nokia 770 Kernel to get DLINK DUB-E100 Rev B to work
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]