Index of /AXP/NetBSD/
_ _ _ ______ ___________ _ _
| \ | | | | | ___ \/ ___| _ \ | | | |
| \| | ___| |_| |_/ /\ `--.| | | | __ _| |_ __ | |__ __ _
| . ` |/ _ \ __| ___ \ `--. \ | | | / _` | | '_ \| '_ \ / _` |
| |\ | __/ |_| |_/ //\__/ / |/ / | (_| | | |_) | | | | (_| |
\_| \_/\___|\__\____/ \____/|___/ \__,_|_| .__/|_| |_|\__,_|
| |
|_|
- thanks to @thorpej for making the Qemu patches
------------------------------------------------------------------
# First git clone qemu sources
# (Make sure you have all the dependencies needed to build qemu from source)
# Read https://wiki.qemu.org/Hosts/Linux
git clone https://github.com/qemu/qemu
cd qemu
wget http://45.76.81.249/AXP/NetBSD/alpha-mmclock-qemu.patch
patch -p1 < alpha-mmclock-qemu.patch
./configure --target-list=alpha-softmmu
make
sudo make install
# To install NetBSD-current Alpha
# Download the current ISO installer
wget http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/images/NetBSD-9.99.87-alpha.iso
mv NetBSD-9.99.87-alpha.iso netbsd.iso
# Create a loader for qemu -> save as run.sh and make executable
qemu-system-alpha \
-m 1024 \
-kernel NETBSD \
-drive file=disk.img,media=disk,format=qcow2,index=0 \
-drive file=netbsd.iso,media=cdrom,format=raw,index=1 \
-net nic \
-net user,hostfwd=tcp::2222-:22
# the NETBSD kernel (installation one) from the ISO
sudo mount -o loop netbsd.iso /mnt/cdrom
cp /mnt/cdrom/NETBSD .
sudo umount /mnt/cdrom
# Setup a disk for the installation
qemu-img create -f qcow2 disk.img 20G
# Run the loader script
./run.sh
# Install NetBSD Normally
# Once done a full setup shutdown the VM
# shutdown -p now
# Download the QEMU NetBSD kernel
wget http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/alpha/binary/kernel/netbsd-GENERIC.QEMU.gz
gunzip netbsd-GENERIC.QEMU.gz
# Change the run.sh to reflect the new kernel (not NETBSD the installer one)
# And add the append to point to proper rootfs on wd0a
qemu-system-alpha \
-m 1024 \
-kernel netbsd-GENERIC.QEMU \
-append "-root=wd0a -dump=wd0b" \
-drive file=disk.img,media=disk,format=qcow2,index=0 \
-drive file=netbsd.iso,media=cdrom,format=raw,index=1 \
-net nic \
-net user,hostfwd=tcp::2222-:22
# run
# Once loaded tell the kernel that rootfs is on wd0
# And hit enter for the swap and init (defaults)
# you should boot to the installed NetBSD Alpha
# One observation that seems to speedup the whole emulation experience is
# to disable IPV6 on dhcpcd if you run qemu under MacOS BigSur (M1)
# Simply add the following to your /etc/rc.conf
dhcpcd_flags=" -4 -qM wm0"