0% found this document useful (0 votes)
70 views3 pages

Eciton Station: Installing Debian Jessie On Qemu Aarch64

This document provides instructions for installing Debian Jessie on QEMU AArch64 emulation. It describes building QEMU from source to support AArch64, creating disk images and ROM files for the emulated system, writing a launch script to boot the system via QEMU, and launching the install process for Debian. Running the install proceeds as normal from the Debian installer.

Uploaded by

Soukous Lover
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views3 pages

Eciton Station: Installing Debian Jessie On Qemu Aarch64

This document provides instructions for installing Debian Jessie on QEMU AArch64 emulation. It describes building QEMU from source to support AArch64, creating disk images and ROM files for the emulated system, writing a launch script to boot the system via QEMU, and launching the install process for Debian. Running the install proceeds as normal from the Debian installer.

Uploaded by

Soukous Lover
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Installing Debian Jessie on QEMU AArch64 https://station.eciton.net/installing-debian-jessie-on-qemu-aar...

Eciton Station An army of tiny wandering thoughts...

About me ARM linux misc UEFI

Installing Debian Jessie on QEMU AArch64


I previously wrote about how to run AArch64 UEFI on QEMU, but it did not really
cover how to do anything useful with it. So here is a follow-up, showing how you can Published: Tue 27 January 2015
install and run a full Debian installation. The steps below require at least version By Leif Lindholm
2015.01 of linaro-edk2. In UEFI.
tags: ARM UEFI
Building QEMU
Full support for AArch64 (the 64-bit ARM architecture) was only added into QEMU version 2.2.0, so will probably not yet
be in any distribution-provided QEMU. So for now, let's build our own:

$ git clone git://git.qemu-project.org/qemu.git


$ cd qemu
$ git checkout -b 2.2.0-stable v2.2.0
$ ./configure --prefix=/usr/local --target-list=aarch64-softmmu
$ make -j`getconf _NPROCESSORS_ONLN`
$ sudo make install

Create ROM Images


The aarch64 virt machine sports two emulated 64MB NOR flash devices, holding the platform firmware and its persistent
environment. We use the IntelBds flavour of the UEFI images, which is what the x86 Ovmf QEMU port does.

$ mkdir ~/arm64-qemu && cd ~/arm64-qemu


$ dd if=/dev/zero of=flash0.img bs=1M count=64
$ LINARO_EDK2_URL=http://releases.linaro.org/15.01/components/kernel/uefi-linaro/
$ wget $LINARO_EDK2_URL/release/qemu64-intelbds/QEMU_EFI.fd
$ dd if=QEMU_EFI.fd of=flash0.img conv=notrunc
$ dd if=/dev/zero of=flash1.img bs=1M count=64

Block devices
We need to prepare image files for the emulated HDD as well as the installation CDROM. The CDROM image, we just
download - until Debian Jessie has actually been released, from the weekly snapshots. I would recommend the netinst
iso, which is 150MB in size and grabs all packages from the network. If you need to do an installation somewhere with no
networking, go for the 4.4GB single DVD image instead.

For the HDD image, we just need to create an empty file of sufficient size to hold our system - I would say 8GB, but if
you're doing something very limited you could get away with less.

$ dd if=/dev/zero of=hda.img bs=1M count=8192

Creating a launch script


Since we do not yet have PCI emulation on AArch64 in QEMU (underway) or EDK2 (to be commenced in the next month
or so), we cannot simply use -hda and -cdrom so find ourselves in "magic rune" territory. For now, the below script is a
simple enough way to launch the emulator.

1 #!/bin/sh
2

1 of 3 06/05/2019 à 14:07
Installing Debian Jessie on QEMU AArch64 https://station.eciton.net/installing-debian-jessie-on-qemu-aar...

3 CDROM_IMG=debian-testing-arm64-netinst.iso
4 HDA_IMG=hda.img
5
6 make_cdrom_arg()
7 {
8 echo "-drive file=$1,id=cdrom,if=none,media=cdrom" \
9 "-device virtio-scsi-device -device scsi-cd,drive=cdrom"
10 }
11
12 make_hda_arg()
13 {
14 echo "-drive if=none,file=$1,id=hd0" \
15 "-device virtio-blk-device,drive=hd0"
16 }
17
18 HDA_ARGS=`make_hda_arg $HDA_IMG`
19 if [ $# -eq 1 ]; then
20 case $1 in
21 install)
22 CDROM_ARGS=`make_cdrom_arg $CDROM_IMG`
23 ;;
24 *)
25 CDROM_ARGS=""
26 ;;
27 esac
28 fi
29
30 qemu-system-aarch64 -m 1024 -cpu cortex-a57 -M virt -nographic \
31 -pflash flash0.img -pflash flash1.img \
32 $CDROM_ARGS $HDA_ARGS -netdev user,id=eth0 \
33 -device virtio-net-device,netdev=eth0 </pre>

Launching the model


Save the above script as launch.sh, make it executable with chmod +x launch.sh and launch the emulator with ./launch.sh
install. You should end up with something looking a bit like this in your terminal:

From
here on, you have a standard Debian installer, which I'm not going to help you with, since there are many other resources
available (and the installer is generally quite straightforward).

social
atom feed

2 of 3 06/05/2019 à 14:07
Installing Debian Jessie on QEMU AArch64 https://station.eciton.net/installing-debian-jessie-on-qemu-aar...

rss feed
Proudly powered by Pelican, which takes great advantage of Python.

The theme is by Smashing Magazine, thanks!

3 of 3 06/05/2019 à 14:07

You might also like