Skip to content

Instantly share code, notes, and snippets.

@ixtli
Last active February 23, 2021 13:20
Show Gist options
  • Save ixtli/1198bc3d9284209a83d3 to your computer and use it in GitHub Desktop.
Save ixtli/1198bc3d9284209a83d3 to your computer and use it in GitHub Desktop.
running arm linux under qemu on os x
  1. install qemu by doing something like brew update && brew install qemu
  2. get a ARMv8-compatible linux kernel image like this: wget http://ports.ubuntu.com/ubuntu-ports/dists/trusty/main/installer-armhf/20101020ubuntu318/images/generic/netboot/vmlinuz
  3. get initrd for the installer like this: wget http://ports.ubuntu.com/ubuntu-ports/dists/trusty/main/installer-armhf/20101020ubuntu318/images/generic/netboot/initrd.gz
  4. use gzip to expand the initrd.gz to a file called initrd
  5. do something to make a disk image, like qemu-img create -f raw armdisk.img 8G
  6. start a Cortex-A9 like this qemu-system-arm -M vexpress-a9 -cpu cortex-a9 -initrd ./initrd -kernel ./vmlinuz -hda armdisk.img -m 256 -append "root=/dev/sda mem=256M devtmpfs.mount=0 rw"

###todo

  • make a disk that boots
  • find an ubuntu disk to start or install a rootfs onto
Copy link

ghost commented Feb 23, 2021

Hi, it has been 5 years. Is your todo list done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment