https://github.com/daniel-k/aarch64-hello-world
https://github.com/daniel-k/aarch64-hello-world
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/daniel-k/aarch64-hello-world
- Owner: daniel-k
- Created: 2016-09-17T23:28:27.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-17T23:46:54.000Z (almost 10 years ago)
- Last Synced: 2025-09-18T13:48:17.081Z (10 months ago)
- Language: Makefile
- Size: 1.95 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
First steps on Aarch64
======================
This repositories shows the first basic steps that are needed to run bare-metal
code on Aarch64 (inside Qemu).
## Requirements
You will need:
* `aarch64-linux-gnu-gcc` et al.
* `qemu-system-aarch64`
* `make`
## Run it
To run the code, just type:
~~~bash
$ make qemu
aarch64-linux-gnu-gcc -ggdb3 -std=gnu99 -Wall -c -o main.o main.c
aarch64-linux-gnu-as -o startup.o startup.asm
aarch64-linux-gnu-ld -Bstatic --gc-sections -nostartfiles -nostdlib -o first-steps.elf -T link.ld main.o
qemu-system-aarch64 -machine virt -m 1024M -cpu cortex-a53 -nographic -s -kernel first-steps.elf
Hello world!
~~~
## Acknowledgements
This is the code for a [blog post](https://www.daniel-krebs.net/first-steps-on-aach64.html)
and I didn't make up everything myself, so thanks to
[freedomtan](https://github.com/freedomtan/aarch64-bare-metal-qemu) and ultimately also
[Balau](https://balau82.wordpress.com/2010/02/28/hello-world-for-bare-metal-arm-using-qemu/).