Cross-building a Customized Install

This step is optional. You can always install the OS from the official distribution, however doing a cross-build will allow you to more quickly build the kernel and optimize both kernel / userland as you'd like. I use this for my own reference when installing NetBSD/atari, so the instructions here are fairly pedantic.

Initial Setup

 * 1) Get set up with a NetBSD install on a reasonably fast machine. I've found Hyper-V Server to work well. The instructions below reflect this choice.
 * 2) Download the latest NetBSD AMD64 ISO locally, ex: ftp://ftp.netbsd.org/pub/NetBSD/iso/[current release version]/NetBSD-N.N.N-amd64.iso.
 * 3) Create a VM with 512MB RAM and 50GB disk. Set the VM to boot from the downloaded ISO.  On Hyper-V, the install will go a bit faster if you pre-create a fixed size 50GB virtual drive.
 * 4) In the VM settings, remove the network adapter and add a Legacy Network Adapter configured to use the external network connection.
 * 5) Allow the machine to boot with option 3 (no ACPI, no SMP).
 * 6) Select language, keyboard type.
 * 7) At the main menu select the option to install.
 * 8) Choose a custom install and add everything except Games and X11.  Add all the source sets including the X11 source set though.
 * 9) Select "This is the correct geometry."
 * 10) Select "Use the entire disk."
 * 11) Choose to install the NetBSD boot code.
 * 12) Choose "Set sizes of NetBSD partitions." (Maybe not necessary on NetBSD 7. I filed a NetBSD bug on the fact that swap space won't be configured if you select "Use existing partition sizes.")
 * 13) The default partition sizes will be fine.  Choose "Accept partition sizes."
 * 14) Select "Partition sizes ok."
 * 15) Select the default disk name.
 * 16) Choose "Yes" to continue.
 * 17) Choose "Use BIOS console."
 * 18) Continue to select the default options and proceed with the install. On NetBSD 6 install via HTTP in order to get the source sets. (This is supposedly fixed in NetBSD 7, so it may be possible to install from media instead of HTTP there.)
 * 19) Select the appropriate network options. For me, the defaults work fine. Setting the hostname here won't persist to the resulting NetBSD installation, so just leave it at the default.
 * 20) Proceed with the install. The default download options are fine, unless you need to configure a proxy.
 * 21) Choose to have the network settings installed to /etc.
 * 22) You will see a menu to configure various options.
 * 23) Leave "Configure network" alone as it is already configured. Setting the hostname here won't persist to the resulting NetBSD installation.
 * 24) Choose the appropriate time zone (US/Pacific works for me).
 * 25) Leave the root shell at /bin/sh.
 * 26) Set the root password.
 * 27) "Enable installation of binary packages" and "Fetch and unpack pkgsrc for building from source" are not necessary.
 * 28) Enable sshd.
 * 29) Enable ntpd (if you have a non-proxied connection to the Internet).
 * 30) Run ntpdate at boot (if you have a non-proxied connection to the Internet).
 * 31) Select "Finished configuring"
 * 32) Choose the option to halt the system from the utility menu. Power down the VM once it's halted.
 * 33) In the VM settings, switch the boot order to boot IDE before the CD and disable the media in the virtual CD/DVD drive.
 * 34) Power on the VM and quickly press '4' at the boot menu to disable ACPI and SMP. Otherwise you may experience networking/console related issues on boot.
 * 35) Allow the system to boot, then log on as root.
 * 36) Disable ACPI and SMP by default.
 * 37) vi /boot.cfg
 * 38) Set the 'default' option to 4.
 * 39) Save the file and exit vi.
 * 40) Add a new user for yourself: useradd -m -G wheel [username]
 * 41) passwd [username]
 * 42) Set your hostname.
 * 43) vi /etc/rc.conf
 * 44) Add:
 * 45) hostname=vmname.foo.com (Where vmname.foo.com is a fully qualified hostname for the VM.)
 * 46) Save the file and exit vi.
 * 47) Reboot: shutdown -r now

Get Ready to Build
.if ${MACHINE} == "atari" CPUFLAGS+= -m68030 -m68881 CFLAGS+= -Os .endif
 * 1) When the system comes back, log on remotely via ssh using the username you created.
 * 2) su to root
 * 3) chown -R [username] /usr/src
 * 4) Where [username] is the username created earlier.
 * 5) chown -R [username] /usr/xsrc
 * 6) mkdir /usr/obj
 * 7) chown [username] /usr/obj
 * 8) vi /etc/mk.conf
 * 9) Add the following:
 * 1) Save and exit vi.
 * 2) vi /etc/inetd.conf
 * 3) Uncomment the ftp daemon. This will enable you to ftp install the release and kernel that will be built.
 * 4) /etc/rc.d/inetd restart
 * 5) Exit out of root.

Build

 * 1) cd /usr/src/sys/arch/atari/conf
 * 2) cp ATARITT ATARIKERN
 * 3) Edit std.atari and ATARIKERN as described in Kernel steps 10 - 12.
 * 4) cd /usr/src
 * 5) ./build.sh -m atari tools
 * 6) ./build.sh -u -m atari kernel=ATARIKERN
 * 7) vi /usr/src/etc/etc.atari/Makefile.inc
 * 8) Remove FALCON, HADES, MILAN-ISAIDE, and MILAN-PCIIDE.
 * 9) Save and exit vi.
 * 10) ./build.sh -U -u -x -m atari release

Install
Now you can ftp install the release from /usr/src/releasedir/atari per the instructions in Basic walkthrough. After that you can ftp the custom kernel you built from /usr/src/sys/arch/atari/compile/obj/ATARIKERN/netbsd.