mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
base-linux: 64-bit ARM support
This patch adds support for running Genode/Linux on the AARCH64 architecture. - The kernel-agnostic startup code (crt0) had to be extended to capture the initial stack pointer, which the Linux kernel uses to pass the process environment. This is in line with the existing startup code for x86_32 and x86_64. - The link order of the host libraries linked to lx_hybrid programs had to be adjusted such that libgcc appears at last because the other libraries depend on symbols provided by libgcc. - When using AARCH64 Linux as host, one can execute run scripts via 'make run/<script> KERNEL=linux BOARD=linux' now. Issue #4136
This commit is contained in:
committed by
Christian Helmuth
parent
718f44ae5b
commit
2f9d430c00
3
repos/base/lib/mk/spec/arm_64/startup.inc
Normal file
3
repos/base/lib/mk/spec/arm_64/startup.inc
Normal file
@@ -0,0 +1,3 @@
|
||||
include $(BASE_DIR)/lib/mk/startup.inc
|
||||
|
||||
vpath crt0.s $(call select_from_repositories,src/lib/startup/spec/arm_64)
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2019 Genode Labs GmbH
|
||||
* Copyright (C) 2019-2021 Genode Labs GmbH
|
||||
*
|
||||
* This file is part of the Genode OS framework, which is distributed
|
||||
* under the terms of the GNU Affero General Public License version 3.
|
||||
@@ -24,6 +24,12 @@
|
||||
.global _start_initial_stack
|
||||
_start_initial_stack:
|
||||
|
||||
/* save initial SP value, used to pass the environment on base-linux */
|
||||
adrp x4, :got:__initial_sp
|
||||
ldr x4, [x4, #:got_lo12:__initial_sp]
|
||||
mov x1, sp
|
||||
str x1, [x4]
|
||||
|
||||
/*
|
||||
* Install initial temporary environment that is replaced later by the
|
||||
* environment that init_main_thread creates.
|
||||
@@ -53,6 +59,10 @@
|
||||
*********************************/
|
||||
|
||||
.bss
|
||||
/* initial value of the SP register */
|
||||
.global __initial_sp
|
||||
__initial_sp:
|
||||
.space 8
|
||||
|
||||
/* stack of the temporary initial environment */
|
||||
.p2align 8
|
||||
|
||||
Reference in New Issue
Block a user