Giter Club home page Giter Club logo

cortex-a72-emulator's Introduction

Cortex-A72-Emulator

A Qemu-based Emulator for Cortex-A72 64-Bit Platform Running with Ubuntu 16.04.6 LTS (Xenial Xerus).

How to Run

git clone https://github.com/ljishen/Cortex-A72-Emulator.git
cd Cortex-A72-Emulator
docker run -ti --rm \
    --mount type=bind,src=`pwd`/images,dst=/emu \
    [-e NUM_CPUS=X] [-e CPU_CORES=X] [-e CPU_THREADS=X] [-e CPU_SOCKETS=X] \
    [-e MEMORY=X] \
    -p 5555:22 \
    ljishen/cortex-a72-emulator

The default values of the system resource environment variables are:

# number of CPUs (<=8)
NUM_CPUS=8
# number of CPU cores on one socket (<=8)
CPU_CORES=8
# number of threads on one CPU core
CPU_THREADS=1
# number of discrete sockets in the system
CPU_SOCKETS=1
# initial amount of guest memory
MEMORY=12G

They should meet the cpu topology requirement: sockets * cores * threads < smp_cpus

Size of the Disk Image

If you want to increase the size of the disk image, we can use qemu-img resize. For example, to increase the size to 34GB(= original 2GB + 32GB), we can do

qemu-img resize ubuntu-16.04-server-cloudimg-arm64-uefi1.img +32G

Note that you need to resize the image before launching the emulator.

The Boot Process

The boot process starts with something like

error: no suitable video mode found.
error: no such device: root.

Press any key to continue...
EFI stub: Booting Linux Kernel...
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services and installing virtual address map...
[    5.327788] kvm [1]: HYP mode not available

Let the process continue until you see the finish of the execution of cloud-init

[  197.110907] cloud-init[1446]: Cloud-init v. 19.2-36-g059d049c-0ubuntu2~16.04.1 finished at Fri, 15 Nov 2019 05:14:37 +0000. Datasource DataSourceNoCloud [seed=/dev/vda][dsmode=net].  Up 196.72 seconds

And now you can login as user ubuntu with whatever the password (default: passw0rd), or via ssh from the host

ssh ubuntu@localhost -p 5555

You can then verify the system information:

ubuntu@ubuntu:~$ uname -a
Linux ubuntu 4.4.0-168-generic #197-Ubuntu SMP Wed Nov 6 11:15:24 UTC 2019 aarch64 aarch64 aarch64 GNU/Linux
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ lscpu
Architecture:          aarch64
Byte Order:            Little Endian
CPU(s):                6
On-line CPU(s) list:   0-5
Thread(s) per core:    1
Core(s) per socket:    6
Socket(s):             1
NUMA node(s):          1
NUMA node0 CPU(s):     0-5
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ free -mh
              total        used        free      shared  buff/cache   available
Mem:           7.8G         63M        7.5G        8.5M        213M        7.6G
Swap:            0B          0B          0B
ubuntu@ubuntu:~$
ubuntu@ubuntu:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           798M  8.5M  790M   2% /run
/dev/vdb1        33G  1.3G   32G   4% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/vdb15       98M  150K   98M   1% /boot/efi
tmpfs           798M     0  798M   0% /run/user/1000

cortex-a72-emulator's People

Contributors

ljishen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cortex-a72-emulator's Issues

Files missing when running Docker build

This is what happens when running docker build. I think some files are missing:

------
 > [builder 6/6] RUN cloud-localds seed.img user-data meta-data:
#0 1.695 /bin/sh: cloud-localds: not found
------
Dockerfile:16
--------------------
  14 |     WORKDIR /tmp
  15 |     COPY configs ./
  16 | >>> RUN cloud-localds seed.img user-data meta-data
  17 |
  18 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cloud-localds seed.img user-data meta-data" did not complete successfully: exit code: 127

qemu cortex-a72

why not qemu cortex-a72 from the app of qemu?

  1. start a docker
    2.qemu cortex-a72 in docker

Is the image of the ti board ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.