Hi guys,
I plan to start a new iteration of my toy kernel development, fourth time rewriting from scratch all of my code. In order to improve portability I would prefer to support two different CPU platforms. My kernel design needs 64-bit CPU (all available persistent storage will be mapped into address space); now my code runs on x86_64. I start thinking about supporting of AArch64 (ARMv8, ARM64) also. Here comes my question.
Where can I find some tutorials about writing kernel level code for AArch64 which explain:
1. Necessary steps for obtaining/building/configuring all needed tools (compiler, emulator, ...).
2. First coding steps (getting started, minimal kernel, etc.).
Thanks in advance.
AArch64 tutorials
AArch64 tutorials
Last edited by ababo on Wed Jul 30, 2014 4:08 am, edited 1 time in total.
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: AArch64 tutorials
Considering the only ARMv8 chip in any volume production has a fruit logo on it... You'll find yourself to be out of look
Re: AArch64 tutorials
Scouse?Owen wrote:out of look
Every universe of discourse has its logical structure --- S. K. Langer.
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: AArch64 tutorials
Typing on a phone obviously uses enough of my mental faculties that I end up picking random homonyms occasionally
Re: AArch64 tutorials
Six months after starting this topic we still have neither tutorials nor tools.
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: AArch64 tutorials
The only ways to get an AArch64 processor at present are:
AArch64 has been supported by Clang and GCC for a while. You can successfully build code today. ARM released their AArch64 emulator a few months ago; its' intended to run Linux, but you can use it to run your own code fine.
Expect chips to start shipping in production volumes towards the end of this year. Development board availability will probably be a while after that.
I have to question any kernel design which involves mapping all persistent storage into the process' address space. That only covers 280TB on both AArch64 and AMD64, which isn't a lot of storage in the grand scheme of things (or: my friend has nearly 32TB of storage in his home server. That only takes 5 HDDs)
Note: Any statements with regards to time schedules of board and/or chip availability are my own predictions based upon publicly available information, and should not be construed as official information from my soon-to-be employer and/or their partners
- Purchase an ARM Juno board. These are very expensive and shipping in very limited quantities to ARM partners.
- Purchase a mobile device from Apple. Their chips remain the only devices shipping in volume.
AArch64 has been supported by Clang and GCC for a while. You can successfully build code today. ARM released their AArch64 emulator a few months ago; its' intended to run Linux, but you can use it to run your own code fine.
Expect chips to start shipping in production volumes towards the end of this year. Development board availability will probably be a while after that.
I have to question any kernel design which involves mapping all persistent storage into the process' address space. That only covers 280TB on both AArch64 and AMD64, which isn't a lot of storage in the grand scheme of things (or: my friend has nearly 32TB of storage in his home server. That only takes 5 HDDs)
Note: Any statements with regards to time schedules of board and/or chip availability are my own predictions based upon publicly available information, and should not be construed as official information from my soon-to-be employer and/or their partners
Re: AArch64 tutorials
Yes, I already have Aarch64 GCC compiler and tools (I think they come out of the box in Ubuntu 14.04) and qemu system emulator (built from Linaro sources). My problem is to do the first steps. I mean a simple tutorial which describes how to build a simplest Hello World binary and to run it on this emulator.AArch64 has been supported by Clang and GCC for a while. You can successfully build code today. ARM released their AArch64 emulator a few months ago; its' intended to run Linux, but you can use it to run your own code fine.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: AArch64 tutorials
QEMU always emulates a certain piece of hardware. Graphics is not part of any specific ARM standard, so you either need to figure out which framebuffer device QEMU runs, or possibly a serial port.
But considering the lack of public hardware as mentioned, it might just be some developer sketch with random hardware, and you're best off scourging their territory for whatever test image the developer/maintainer in question used to test the thing so you have a working reference.
But considering the lack of public hardware as mentioned, it might just be some developer sketch with random hardware, and you're best off scourging their territory for whatever test image the developer/maintainer in question used to test the thing so you have a working reference.
Re: AArch64 tutorials
Yes, for now only serial port makes sense.QEMU always emulates a certain piece of hardware. Graphics is not part of any specific ARM standard, so you either need to figure out which framebuffer device QEMU runs, or possibly a serial port.
Yes, this is a problem, but again, for now I need to write the most generic code like memory management, thread scheduling, etc, so this is not an issue yet.But considering the lack of public hardware as mentioned, it might just be some developer sketch with random hardware, and you're best off scourging their territory for whatever test image the developer/maintainer in question used to test the thing so you have a working reference.
I believe future extensions/implementations will push this limit. For now + 5-10 years 48 bits will be quite enough for most of machines.I have to question any kernel design which involves mapping all persistent storage into the process' address space. That only covers 280TB on both AArch64 and AMD64, which isn't a lot of storage in the grand scheme of things (or: my friend has nearly 32TB of storage in his home server. That only takes 5 HDDs)