It's faster to cross-build the kernel, but if you'd like to do the build on the Atari itself, here's how.
- Log in with your user account either at the console or via ssh. Some keyboard characters are mapped oddly on the Atari keyboard so I prefer to use ssh.
- mkdir syssrc
- cd syssrc
- ftp ftp://ftp.netbsd.org/pub/NetBSD/[NetBSD version]/source/sets/syssrc.tgz (If you're behind a proxy, a mirror such as ftp2.us.NetBSD.org tends to work better.)
- su to root
- cd /
- progress -zf ~[username]/syssrc/syssrc.tgz tar xpf -
- cd /usr/src/sys/arch/atari/conf
- cp ATARITT ATARIKERN
- Configure the kernel. FWIW, here's what I do:
- Prior to NetBSD 7:
- vi std.atari
- Add or edit the makeoptions line to:
- makeoptions COPTS="-Os -fomit-frame-pointer"
- Save and exit vi.
- On NetBSD 7 and above, don't edit std.atari, just update the makeoptions line in ATARIKERN:
- vi ATARIKERN
- Edit the makeoptions line to change -O2 to -Os and add -fomit-frame-pointer.
- Save and exit vi.
- vi ATARIKERN
- Enable IPSEC by adding these three lines after INET6:
- options IPSEC
- options IPSEC_ESP
- options IPSEC_NAT_T
- Enable NTP:
- options NTP
- options RTC_OFFSET=0
- Disable nfsserver. I leave the nfs client ("nfs") enabled for the purposes of backup.
- Disable lp0
- Disable unnecessary devices. I disable EtherNEC, BVME410, SMC Elite Ultra, and Crazy Dots.
- Disable SCSI autochangers, scanners, and SCSI Ethernet.
- If you plan to run apache add:
- pseudo-device accf_data
- pseudo-device accf_http
- If you plan to run filesystems in userspace (I don't use this, currently):
- file-system PUFFS
- pseudo-device putter
- Prior to NetBSD 7:
- Save and exit vi.
- config ATARIKERN
- cd /usr/src/sys/arch/atari/compile/ATARIKERN
- make depend && make
- mv /netbsd /netbsd-ataritt
- cp netbsd /netbsd
- shutdown -r now
- Once the system comes back up, log on as root
- cd /dev
- sh MAKEDEV all
- shutdown -r now
Note: Previously there was a suggestion to edit /usr/src/sys/arch/atari/conf/Makefile.atari to make some performance optimizations. These are actually not necessary so the advice has been removed.
David Ross 18:21, November 26, 2009 (UTC)