From: Takahide H. <tak...@hi...> - 2001-08-23 14:14:41
|
Hi folks, Finally Linux-2.4 kernel booted on PlayStation2 ! patch and binary is available at following URI: http://developer.hima.gr.jp/playstation2/patch-2.4.6ps2.0823.bz2 (bzipped patch for stock linux-2.4.6 kernel source) http://developer.hima.gr.jp/playstation2/vmlinux_246_0823.elf.bz2 (bzipped vmlinux. please uncompress before use) To compile the patched source, try following steps: $ cp arch/mips/defconfig-PlayStation2 .config; \ make ARCH=mips CROSS_COMPILE=/crossgcc_in_somewhere/bin/mipsEEel-linux- \ oldconfig dep clean vmlinux At present, you have to configure your network so that root file system can be mounted via NFS. 0. prepare NFS and BOOTP server on your network. 1. copy (whole) userland on PS2 Linuxkit to the NFS server and export them. 'no_root_squash' option is needed. 2. (optional) rebuild 2.2.1ps2 kernel with nfs-root and CONFIG_IP_PNP_BOOTP support, then test whether your nfs-root configuration works. 3. replace /nfsroot/rc.d/rc.sysinit with following shell script: --------------------- #!/bin/sh mount -n -t proc proc /proc &>/dev/null & mount -t nfs -n -o remount,rw 192.168.x.x:/nfsroot / &>/dev/null & mount -n -o rw,gid=5,mode=620 -t devpts devpts /dev/pts &>/dev/null & /etc/rc.d/rc7.d/S10network start &>/dev/null & /etc/rc.d/rc7.d/S50inet start &>/dev/null & /usr/sbin/inetd &>/dev/null & /bin/sh --------------------- 4. edit p2lboot.cnf on your memory card. my configuration is following: "vmlinux-246" vmlinux.elf "" 203 /dev/nfs "root=/dev/nfs nfsroot=192.168.1.1:/nfsroot,rw ip=::::::bootp" vmlinux-246 if you are using redboot.elf-010726, boot option given to redboot is passed thru to the kernel. 5. don't forget to remove or rename /nfsroot/dev/tst (*** THIS STEP IS IMPORTANT !!! *** ) 6. boot the (redboot then) kernel. you will see dmesg on the screen. you can check whether bootp and nfs-root are working. 7. (if you still wonder if things are working, use tcpdump etc.) 8. wow, it's show time! takahide@platinum:~/kernel/linux-2.4.6$ cp vmlinux /tftpboot;telnet dhcp1 9000 Trying 192.168.1.17... Connected to dhcp1.local. Escape character is '^]'. RedBoot> load -m tftp vmlinux Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align 00 70000000 0015b550 8016b550 8016b550 00000018 00000018 00000004 00000004 01 00000001 00001000 80010000 80010000 0014ac50 0014ac50 00000005 00001000 02 00000001 0014c000 8015c000 8015c000 00022000 00047d58 00000007 00001000 Entry point is 0x800107a4 RedBoot> go Connection closed by foreign host. takahide@platinum:~/kernel/linux-2.4.6$ telnet dhcp1 Trying 192.168.1.17... Connected to dhcp1.local. Escape character is '^]'. PS2 Linux release 1.0beta Kernel 2.4.6 on a mips login: takahide Password: Last login: Thu Aug 23 21:22:08 from platinum.local No directory /home/takahide! Logging in with home = "/". cp: /usr/lib/jed/lib/jed.rc: No such file or directory bash$ uname -a Linux 192.168.1.17 2.4.6 #364 Thu Aug 23 21:04:02 JST 2001 mips unknown bash$ ps ax PID TTY STAT TIME COMMAND 1 ? S 0:05 init 2 ? SW 0:00 [keventd] 3 ? SW 0:00 [kswapd] 4 ? SW 0:00 [kreclaimd] 5 ? SW 0:00 [bdflush] 6 ? SW 0:00 [kupdated] 7 ? SW 0:00 [rpciod] 17 ? S 0:00 /usr/sbin/inetd 137 ? S 0:00 in.telnetd: platinum.local 147 ? S 0:00 /sbin/pump -i eth0 148 pts/0 S 0:00 login -- takahide 182 pts/0 S 0:00 -bash 200 pts/0 R 0:00 ps ax bash$ dmesg Loading R5900 MMU routines. CPU revision is: 00002e20 Primary instruction cache 16kb, linesize 64 bytes Primary data cache 8kb, linesize 64 bytes Branch Prediction : on Double Issue : on Linux version 2.4.6 (takahide@platinum) (gcc version 2.95.2 19991024 (release)) #364 Thu Aug 23 21:04:02 JST 2001 Determined physical RAM map: memory: 01fff000 @ 00000000 (usable) Initial ramdisk at: 0x8017e000 (0 bytes) On node 0 totalpages: 8191 zone(0): 8191 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: root=/dev/nfs crtmode=vesa0,60 root=/dev/nfs nfsroot=192.168.1.1:/nfsroot,rw ip=::::::bootp Calibrating delay loop... 392.39 BogoMIPS Memory: 30532k/32764k available (1323k kernel code, 2232k reserved, 74k data, 60k init) Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes) Inode-cache hash table entries: 2048 (order: 2, 16384 bytes) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes) Page-cache hash table entries: 8192 (order: 3, 32768 bytes) Checking for 'wait' instruction... unavailable. POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Starting kswapd v1.8 initialize_kbd: Keyboard failed self test pty: 256 Unix98 ptys configured rtc: Digital UNIX epoch (1952) detected Real Time Clock Driver v1.10d block: queued sectors max/low 20210kB/6736kB, 64 slots per queue keyboard: Timeout - AT keyboard not present? keyboard: Timeout - AT keyboard not present? RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize loop: loaded (max 8 devices) eth0: MAC address 00:04:1f:00:04:1e eth0: Auto-negotiation complete. 100Mbps Full duplex mode. PlayStation 2 SMAP(Ethernet) device driver is loaded. NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP, IGMP IP: routing cache hash table of 512 buckets, 4Kbytes TCP: Hash tables configured (established 2048 bind 2048) Linux IP multicast router 0.06 plus PIM-SM Sending DHCP requests ., OK IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.17 IP-Config: Complete: device=eth0, addr=192.168.1.17, mask=255.255.255.0, gw=255.255.255.255, host=192.168.1.17, domain=local, nis-domain=(none), bootserver=192.168.1.1, rootserver=192.168.1.1, rootpath= NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. RAMDISK: Couldn't find valid RAM disk image starting at 0. Looking up port of RPC 100003/2 on 192.168.1.1 Looking up port of RPC 100005/2 on 192.168.1.1 VFS: Mounted root (nfs filesystem). Freeing unused kernel memory: 60k freed Warning: unable to open an initial console. bash$ please enjoy ! --- Takahide HIGUCHI e-mail: tak...@hi... |