[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 02013) trial to apply USAGI patch to iPAQ
- To: <usagi-users@xxxxxxxxxxxxxx>
- Subject: (usagi-users 02013) trial to apply USAGI patch to iPAQ
- From: "IDA Hiromu" <hider@xxxxxxxxxxxxxxxxx>
- Date: Thu, 5 Dec 2002 16:55:53 +0900
- Reply-to: usagi-users@xxxxxxxxxxxxxx
Hi, everyone.
I want to test the latest IPv6 and MobileIPv6 environment on iPAQ, so I tried
to apply USAGI kernel patch to iPAQ (for details, see below).
And now, at least it seems to work on link local ICMPv6 level.
(ifconfig)
sh-2.03# ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:2D:0B:99:E9
inet addr:192.168.0.12 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::202:2dff:fe0b:99e9/64 Scope:Link
:
(ping to iPAQ from other PC)
$ ping6 fe80::202:2dff:fe0b:99e9%eth0
PING fe80::202:2dff:fe0b:99e9%eth0(fe80::202:2dff:fe0b:99e9%eth0) from fe80::280:45ff:fe11:53b5%eth0 : 56 data bytes
64 bytes from fe80::202:2dff:fe0b:99e9%eth0: icmp_seq=1 ttl=64 time=9.21 ms
64 bytes from fe80::202:2dff:fe0b:99e9%eth0: icmp_seq=2 ttl=64 time=3.32 ms
:
--- fe80::202:2dff:fe0b:99e9%eth0 ping statistics ---
4 packets transmitted, 4 received, 0% loss, time 3025ms
rtt min/avg/max/mdev = 3.631/4.609/5.705/0.752 ms
Next, I would try to use usagi-tools(like usagi-tool-s20021125.tar.bz2) on
iPAQ, because original IPv6 tools for iPAQ seem to have some problems.
(ping to other PC from iPAQ)
sh-2.03# ping6 fe80::280:45ff:fe11:53b5
PING fe80::280:45ff:fe11:53b5 (fe80::280:45ff:fe11:53b5): 56 data bytes
ping: sendmsg: Network is unreachable
ping: wrote fe80::280:45ff:fe11:53b5 64 chars, ret=-1
ping: sendmsg: Network is unreachable
ping: wrote fe80::280:45ff:fe11:53b5 64 chars, ret=-1
ping: sendmsg: Network is unreachable
ping: wrote fe80::280:45ff:fe11:53b5 64 chars, ret=-1
64 bytes from fe80::280:45ff:fe11:53b5: icmp_seq=3 ttl=64 time=6.13 ms
ping: sendmsg: Network is unreachable
ping: wrote fe80::280:45ff:fe11:53b5 64 chars, ret=-1
:
--- fe80::280:45ff:fe11:53b5 ping statistics ---
8 packets transmitted, 1 packets received, 87% packet loss
round-trip min/avg/max = 6.13/6.13/6.13 ms
If anyone succeeded to port usagi-tools to iPAQ, please tell me how to do.
Thanks.
--
IDA Hiromu
hider@xxxxxxxxxxxxxxxxx
-------------------------------------------------------------------------------
Apply USAGI kernel patch to iPAQ
< necessary files >
- linux-2.4.19.tar.bz2
standard kernel source
from ex.) http://www.kernel.org/
- usagi-linux24-s20021125-2.4.19.diff.bz2
usagi-snap patch
from ex.) ftp://ftp.linux-ipv6.org/pub/usagi/snap/split/
- usagi2hh.tar.gz
helper scripts to avoid conflict (original)
http://www.furyu.atnifty.com/ipaq/script/usagi2hh.tar.gz
< sample directory tree >
~/src
|-- linux
| +-- kernel ... for iPAQ kernel sources(2.4.18-rmk3-hh21)
| +-- ipkgs ... for iPAQ install packages(*.ipk)
|-- linux-2.4.19-orig ... for original kernel sources(2.4.19)
*) Environment:
Red Hat Linux 7.3 on x86 note PC (use bash, perl)
Familiar v0.5.3 on iPAQ H3660
*) Of course you must build the cross-compile environment for iPAQ,
in advance.
- arm-linux-toolchain-current.tar.gz
- arm-linux-libz.tar.gz
toolchain and libraries
from ex.) ftp://ftp.handhelds.org/pub/linux/arm/toolchain/
- ipkg-util-020417.tar.gz
ipkg utilities
from ex.) ftp://ftp.handhelds.org/pub/linux/dists/familiar/ipkg/
$ su
# tar xvfz arm-linux-toolchain-current.tar.gz -C /
# tar xvfz arm-linux-libz.tar.gz -C /skiff/local
# export PATH=/skiff/local/bin:$PATH
*) toolchain and libraries would be installed to /skill
# tar xvfz ipkg-util-020417.tar.gz
# cd ipkg-util-020417
# make install
*) ipkg utilities would be installed to /usr/local/bin
< process >
1. Extract linux-2.4.19.tar.bz2
$ cd ~/src
$ bzip2 -cd linux-2.4.19.tar.bz2 | tar xvf -
$ mv linux-2.4.19 linux-2.4.19-orig
2. Checkout iPAQ kernel 2.4.18-rmk3-hh21
$ export CVSROOT=:pserver:anoncvs@xxxxxxxxxxxxxxxxx:/cvs
$ cvs login
password: anoncvs
$ cvs -z3 checkout linux/kernel
$ cd linux/kernel
$ kerneldir=$PWD
$ cd ~/src
$ cvs -z3 checkout -r K2-4-18-rmk3-hh21 linux/kernel
*) If you want to check the iPAQ kernel tag names :
$ cd ~/src/linux/kernel
$ cvs log Makefile
( I also tried K2-4-18-rmk3-hh22 and K2-4-19-rmk4-pxa2-hh1,
but I failed . )
*) I got iPAQ kernel sources by cvs.
If you want to get iPAQ kernel archives :
- linux-2.4.18.tar.bz2
standard kernel source
from ex.) http://www.kernel.org/
- patch-2.4.18-rmk3.bz2
patch for ARM
from ex.) ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/
- patch-2.4.18-rmk3-hh21.gz
patch for iPAQ
from ex.) ftp://ftp.handhelds.org/pub/linux/kernel/
$ mkdir ~/src/linux ; cd ~/src/linux
$ bzip2 -cd linux-2.4.18.tar.bz2 | tar xvf -
$ mv linux kernel ; cd kernel
$ bzip2 -cd patch-2.4.18-rmk3.bz2 | patch -p1
$ gzip -cd patch-2.4.18-rmk3-hh22.gz | patch -p1
3. Apply usagi-snap patch
$ cd ~/src/linux/kernel
$ bzip2 -cd usagi-linux24-s20021125-2.4.19.diff.bz2 > usagi-linux24-s20021125-2.4.19.diff
$ tar xvfz usagi2hh.tar.gz
$ ./usagi2hh.sh usagi-linux24-s20021125-2.4.19.diff ~/src/linux-2.4.19-orig
*) usagi2hh.sh and usagi2hh.pl are original scripts to avoid conflict
between usagi-snap patch and iPAQ kernel sources
4. Modify sources
$ cd ~/src/linux/kernel
$ vi ./include/linux/kernel.h
161 #define max_t(type,x,y) \
162 ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
163
add -> 164 extern void __out_of_line_bug(int line) ATTRIB_NORET;
add -> 165 #define out_of_line_bug() __out_of_line_bug(__LINE__)
166
167 #endif /* __KERNEL__ */
$ vi ./kernel/panic.c
122 int tainted = 0;
add -> 123
add -> 124 void __out_of_line_bug(int line)
add -> 125 {
add -> 126 printk("kernel BUG in header file at line %d\n", line);
add -> 127
add -> 128 BUG();
add -> 129
add -> 130 /* Satisfy __attribute__((noreturn)) */
add -> 131 for ( ; ; )
add -> 132 ;
add -> 133 }
$ vi ./kernel/ksyms.c
459 /* misc */
460 EXPORT_SYMBOL(panic);
add -> 461 EXPORT_SYMBOL(__out_of_line_bug);
462 EXPORT_SYMBOL(sprintf);
$ vi ./net/ipv4/af_inet.c
1190 #endif
add -> 1191 #if 0 /* commented out start */
1192 #if defined(CONFIG_IPSEC)
1193 {
1194 extern /* void */ int ipsec_init(void);
1195 /*
1196 * Initialise AF_INET ESP and AH protocol support includi ng
1197 * e-routing and SA tables
1198 */
1199 ipsec_init();
1200 }
1201 #endif /* CONFIG_IPSEC */
add -> 1202 #endif /* commented out end */
$ cp ~/src/linux-2.4.19-orig/net/ipv4/tcp_output.c ./net/ipv4
$ cp ~/src/linux-2.4.19-orig/net/ipv4/tcp.c ./net/ipv4
*) mainly to avoid conflict between kernel 2.4.18 and 2.4.19
5. Build kernel and make packages for IPAQ
$ cd ~/src/linux/kernel
$ su
# kerneldir=$PWD
# make h3600_config
# make xconfig
*) make xconfig, make menuconfig or make oldconfig
ex.)
Cryptography support (CryptoAPI)
+ [y] CryptoAPI support
+ [y] Cipher Algorithms
| : ( all [y])
+ [y] Digest Algorithms
| : ( all [y])
+ [n] Crypto Devices
Networking options
+ [y] TCP/IP networking
+ [y] The IPsec protocol (EXPERIMENTAL)
+ [y] IPsec: IPsec Debug messages
+ [n] IPsec: IPsec debugging off by default
+ [n] IPsec: IP Compression
+ [y] The IPv6 protocol (EXPERIMENTAL)
| : ( all [y] )
+ [y] IPv6: IP Security Support (EXPERIMENTAL)
+ [m] IPv6: IPv6 over IPv6 Tunneling (EXPERIMENTAL)
+ [m] IPv6: Mobility Support (EXPERIMENTAL)
+ [y] MIPv6:Debug messages
Network device support
+ Wireless LAN (non-harmradio)
+ [n] Symbol spectrum24 802.11b support (spectrum24t)
| *) You must select [n], if you did not use cvs.
| EPRIMSYM.BIN and ESECSYM.BIN would be missing.
+ [m] wvlan_cs driver for Orinoco/Lucent cards
+ [m] hostap driver for Intersil Prism2/2.5/3 chipsets
+ [m] hostap_cs driver for Intersil Prism2/2.5/3 cards
+ [m] mwavelwan driver for Orinoco/Lucent cards
# make dep 2>&1 | tee dep.log
# make zImage modules 2>&1 | tee make.log
# mkdir ipkgs ; cd ipkgs
# ipkg-make-kernel_packages $PWD/.. 2.4.18-rmk3 hh21-usagi