-
Notifications
You must be signed in to change notification settings - Fork 10
Networking for the PlayStation 2
Although drivers for PlayStation 2 Ethernet hardware have not been implemented yet (see issue #19), it’s easy to use a corresponding Ethernet USB adapter, for example a D-Link DUB-1312, having USB id 0b95:1790, based on Asix Electronics AX88179 gigabit Ethernet hardware. It’s preconfigured as a loadable module with CONFIG_USB_NET_AX88179_178A=m in linux/arch/mips/configs/ps2_defconfig, installed as initramfs/lib/modules/5.4.221+/kernel/drivers/net/usb/ax88179_178a.ko in the INITRAMFS.
Enable the AX88179 driver by editing initramfs/etc/init.d/rcS, adding at the end:
modprobe cdc_mbim
modprobe ax88179_178aThe PlayStation 2 can obtain an IP address in several ways, including DHCP. One of the simplest is to configure a fixed IP address, by editing initramfs/etc/init.d/rcS, adding at the end, assuming your network prefix is 10.0.1.0, for example:
ip_set_addr() {
local subn=10.0.1
local addr=$subn.101
ip addr add "$addr"/24 dev eth0
ip link set eth0 up
ip route add default via $subn.1
ip route add $subn.0/24 via $subn.1 dev eth0
}
ip_has_addr() { ip addr | grep -q inet; }
ip_has_link() { ip link | grep -q eth0; }
ip_daemon() {
while :
do
ip_has_link && (ip_has_addr || ip_set_addr)
sleep 10
done
}
sleep 1
ip_set_addr
ip_daemon &On your workstation, you should now be able to ping the PlayStation 2 with:
$ ping 10.0.1.101
PING 10.0.1.101 (10.0.1.101) 56(84) bytes of data.
64 bytes from 10.0.1.101: icmp_seq=1 ttl=64 time=0.567 ms
64 bytes from 10.0.1.101: icmp_seq=2 ttl=64 time=0.576 ms
64 bytes from 10.0.1.101: icmp_seq=3 ttl=64 time=0.569 ms
...Adding a line 10.0.1.101 ps2.local to your workstation’s /etc/hosts file allows host names, as in:
$ ping ps2.local
PING ps2.local (10.0.1.101) 56(84) bytes of data.
64 bytes from ps2.local (10.0.1.101): icmp_seq=1 ttl=64 time=0.531 ms
64 bytes from ps2.local (10.0.1.101): icmp_seq=2 ttl=64 time=0.561 ms
64 bytes from ps2.local (10.0.1.101): icmp_seq=3 ttl=64 time=0.538 ms
...Note
To save space, CONFIG_IPV6 is currently not set in linux/arch/mips/configs/ps2_defconfig, so only IPv4 is available in the Linux kernel.
The INITRAMFS is preinstalled with Dropbear, for secure shell (SSH) services, with initramfs/etc/inetd.conf and programs compiled and installed in initramfs/usr/bin:
dropbear -> dropbearmulti
dropbearmulti
scp -> dropbearmulti
ssh -> dropbearmulti
Generate your PlayStation 2 host key with:
$ mkdir initramfs/etc/dropbear
$ dropbearmulti dropbearkey -t ed25519 -f initramfs/etc/dropbear/dropbear_ed25519_host_keyNote
You will need to install SSH keys yourself to make use of Dropbear.
Tip
Installing your own certificates, in particular, makes it possible to login without password prompts, and automate scripted commands on PlayStation 2 hardware.