Skip to content

Instantly share code, notes, and snippets.

@LucienBrule
Created February 19, 2017 04:11
Show Gist options
  • Save LucienBrule/4af556999aa72408f14c9123c341e2b7 to your computer and use it in GitHub Desktop.
Save LucienBrule/4af556999aa72408f14c9123c341e2b7 to your computer and use it in GitHub Desktop.
MIPS QEMU manager
# description: This make file bundles the commands neccessary to get running with
# -- the mips architecture & corresponding debian image for development
# author: Lucien Brule <brulel@rpi.edu>
# date: 2/18/2017
help: ## This help dialog.
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \
for help_line in $${help_lines[@]}; do \
IFS=$$'#' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf "%-30s %s\n" $$help_command $$help_info ; \
done
start: ## starts the system
qemu-system-mips -hda debian_mips.qcow2 -kernel vmlinux-3.16.0-4-4kc-malta -append "root=/dev/sda1 console=ttyS0" -nographic
run-installer: ## runs the debian installer
qemu-system-mips -hda debian_mips.qcow2 -kernel vmlinux-2.6.32-5-4kc-malta -initrd initrd.gz -append "root=/dev/ram console=ttyS0" -nographic
stop: ## stops a running instance of the MIPS debian image
killall qemu-system-mips
get-images: ## fetches the installation media from the debian repo
wget http://http.us.debian.org/debian/dists/jessie/main/installer-mips/current/images/malta/netboot/initrd.gz
wget http://http.us.debian.org/debian/dists/jessie/main/installer-mips/current/images/malta/netboot/vmlinux-3.16.0-4-4kc-malta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment