summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/aarch64/Config.in9
-rw-r--r--target/aarch64/Makefile38
-rw-r--r--target/aarch64/kernel/arm-fm7
-rw-r--r--target/aarch64/sys-available/arm-fm13
-rw-r--r--target/aarch64/sys-available/toolchain-aarch6414
-rw-r--r--target/aarch64/target.mk4
-rw-r--r--target/arch.lst1
-rw-r--r--target/config/Config.in11
-rw-r--r--target/config/Config.in.arch.choice6
-rw-r--r--target/config/Config.in.arch.default4
-rw-r--r--target/config/Config.in.runtime2
-rw-r--r--target/config/Config.in.system.choice1
-rw-r--r--target/tarch.lst1
13 files changed, 110 insertions, 1 deletions
diff --git a/target/aarch64/Config.in b/target/aarch64/Config.in
new file mode 100644
index 000000000..9e48de6b4
--- /dev/null
+++ b/target/aarch64/Config.in
@@ -0,0 +1,9 @@
+choice
+depends on ADK_LINUX_AARCH64 && !ADK_CHOOSE_TARGET_ARCH
+prompt "Target system"
+
+config ADK_CHOOSE_TARGET_SYSTEM_AARCH64
+ boolean "Choose target system"
+
+source "target/aarch64/Config.in.systems"
+endchoice
diff --git a/target/aarch64/Makefile b/target/aarch64/Makefile
new file mode 100644
index 000000000..d276472fa
--- /dev/null
+++ b/target/aarch64/Makefile
@@ -0,0 +1,38 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+include $(TOPDIR)/mk/kernel.mk
+include $(TOPDIR)/mk/modules.mk
+include $(TOPDIR)/mk/kernel-build.mk
+include $(TOPDIR)/mk/image.mk
+
+KERNEL:=${LINUX_DIR}/arch/arm64/boot/Image
+
+kernel-install:
+ cd $(TOPDIR) && \
+ make -f Makefile \
+ -C package/boot-wrapper-aarch64 clean
+ cd $(TOPDIR) && \
+ make -f Makefile \
+ -C package/boot-wrapper-aarch64 package
+ ${CP} ${LINUX_DIR}/linux-system.axf \
+ $(FW_DIR)/$(TARGET_KERNEL)
+
+ifeq ($(ADK_TARGET_FS),archive)
+imageinstall: $(FW_DIR)/$(ROOTFSTARBALL)
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfsarchive)
+imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL)
+ @echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
+ @echo "The RootFS tarball is: $(FW_DIR)/$(ROOTFSUSERTARBALL)"
+endif
+ifeq ($(ADK_TARGET_FS),initramfs-piggyback)
+imageinstall: createinitramfs kernel-install
+ @echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_TARGET_SYSTEM_ARM_FM),y)
+ @echo 'Start emulator via:'
+ @echo 'Foundation_v8 --image=$(FW_DIR)/${TARGET_KERNEL}'
+endif
+endif
diff --git a/target/aarch64/kernel/arm-fm b/target/aarch64/kernel/arm-fm
new file mode 100644
index 000000000..db8edb12d
--- /dev/null
+++ b/target/aarch64/kernel/arm-fm
@@ -0,0 +1,7 @@
+CONFIG_ARM64=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_AEABI=y
+CONFIG_NET_VENDOR_SMSC=y
+CONFIG_SMC91X=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
diff --git a/target/aarch64/sys-available/arm-fm b/target/aarch64/sys-available/arm-fm
new file mode 100644
index 000000000..4eef2aeaf
--- /dev/null
+++ b/target/aarch64/sys-available/arm-fm
@@ -0,0 +1,13 @@
+config ADK_TARGET_SYSTEM_ARM_FM
+ bool "ARMv8 Foundation Model"
+ select ADK_aarch64
+ select ADK_arm_fm
+ select ADK_little
+ select ADK_soft_float
+ select ADK_eabi
+ select ADK_CPU_ARMV8
+ select ADK_LINUX_64
+ select ADK_TARGET_KERNEL_IMAGE
+ select ADK_PACKAGE_BOOT_WRAPPER_AARCH64
+ help
+ Support for ARMv8 Foundation Model (aarch64).
diff --git a/target/aarch64/sys-available/toolchain-aarch64 b/target/aarch64/sys-available/toolchain-aarch64
new file mode 100644
index 000000000..638c3cdcf
--- /dev/null
+++ b/target/aarch64/sys-available/toolchain-aarch64
@@ -0,0 +1,14 @@
+config ADK_TARGET_SYSTEM_TOOLCHAIN_AARCH64
+ bool "Toolchain only (little endian)"
+ select ADK_aarch64
+ select ADK_toolchain_aarch64
+ select ADK_little
+ select ADK_soft_float
+ select ADK_fpu_vfp
+ select ADK_eabi
+ select ADK_TOOLCHAIN
+ select ADK_CPU_ARMV8
+ select ADK_LINUX_64
+ select ADK_TARGET_PACKAGE_TXZ
+ help
+ AARCH64 toolchain.
diff --git a/target/aarch64/target.mk b/target/aarch64/target.mk
new file mode 100644
index 000000000..95a9f3337
--- /dev/null
+++ b/target/aarch64/target.mk
@@ -0,0 +1,4 @@
+include $(TOPDIR)/mk/kernel-ver.mk
+ARCH:= arm64
+CPU_ARCH:= $(ADK_TARGET_CPU_ARCH)
+TARGET_CFLAGS_ARCH:= $(ADK_TARGET_CFLAGS)
diff --git a/target/arch.lst b/target/arch.lst
index 8c9a71e0b..9fc6d20d2 100644
--- a/target/arch.lst
+++ b/target/arch.lst
@@ -1,3 +1,4 @@
+aarch64
arm
m68k
microblaze
diff --git a/target/config/Config.in b/target/config/Config.in
index d7bf385a2..c5d06be79 100644
--- a/target/config/Config.in
+++ b/target/config/Config.in
@@ -187,6 +187,7 @@ config ADK_TARGET_LIBC_PATH
config ADK_TARGET_KERNEL_MINICONFIG
string
+ default "arm-fm" if ADK_TARGET_SYSTEM_ARM_FM
default "qemu-microblaze-s3adsp1800" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
default "qemu-microblaze-ml605" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_ML605
default "qemu-arm-versatilepb" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB
@@ -557,6 +558,9 @@ config ADK_CPU_ARM1176JZF_S
config ADK_CPU_CORTEX_A9
boolean
+config ADK_CPU_ARMV8
+ boolean
+
config ADK_TARGET_CPU_ARCH
string
default "x86_64" if ADK_CPU_X86_64
@@ -574,6 +578,7 @@ config ADK_TARGET_CPU_ARCH
default "mips64el" if ADK_LINUX_MIPS && ADK_little && ADK_LINUX_64
default "mips" if ADK_LINUX_MIPS && ADK_big
default "mipsel" if ADK_LINUX_MIPS && ADK_little
+ default "aarch64" if ADK_LINUX_AARCH64 && ADK_little
default "arm" if ADK_LINUX_ARM && ADK_little
default "sparc" if ADK_LINUX_SPARC
default "sparc64" if ADK_LINUX_SPARC64
@@ -606,6 +611,7 @@ config ADK_TARGET_CFLAGS
default "-march=loongson2f -Wa,-mfix-loongson2f-nop" if ADK_CPU_LOONGSON2F
default "-march=mips32" if ADK_CPU_MIPS32
default "-march=mips64" if ADK_CPU_MIPS64
+ default "-march=armv8-a" if ADK_CPU_ARMV8
default "-march=armv5te -mtune=iwmmxt" if ADK_CPU_XSCALE
default "-march=armv5te -mtune=arm926ej-s -mfloat-abi=soft" if ADK_CPU_ARM926EJ_S && ADK_soft_float
default "-march=armv5te -mtune=arm926ej-s -mfloat-abi=hard" if ADK_CPU_ARM926EJ_S && ADK_hard_float
@@ -636,6 +642,7 @@ config ADK_TARGET_CMDLINE
default "console=ttyS0,115200" if ADK_TARGET_QEMU_ARM_MODEL_SPITZ
default "console=ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB
default "console=ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9
+ default "console=ttyAMA0" if ADK_TARGET_SYSTEM_ARM_FM
default "console=ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4
default "console=ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4EB
default "console=ttyS0,115200" if ADK_TARGET_SYSTEM_PCENGINES_ALIX2D13
@@ -668,6 +675,7 @@ config ADK_TARGET_LIB_UCLIBC
boolean
select ADK_uclibc
depends on \
+ !ADK_LINUX_AARCH64 && \
!ADK_LINUX_M68K && \
!ADK_LINUX_MICROBLAZE && \
!ADK_LINUX_SPARC64 && \
@@ -682,6 +690,7 @@ config ADK_TARGET_LIB_GLIBC
boolean
select ADK_glibc
depends on \
+ ADK_LINUX_AARCH64 || \
ADK_LINUX_ARM || \
ADK_LINUX_M68K || \
ADK_LINUX_MICROBLAZE || \
@@ -771,6 +780,7 @@ config ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK
select ADK_LINUX_INITRAMFS_BUILTIN
depends on \
ADK_HARDWARE_QEMU || \
+ ADK_LINUX_AARCH64 || \
ADK_LINUX_ARM || \
ADK_LINUX_M68K || \
ADK_LINUX_MICROBLAZE || \
@@ -826,6 +836,7 @@ config ADK_TARGET_ROOTFS_NFSROOT
select ADK_KERNEL_IP_PNP_DHCP
depends on !ADK_HARDWARE_QEMU && !ADK_HARDWARE_VBOX && !ADK_TARGET_SYSTEM_ARANYM_M68K
depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
+ depends on !ADK_TARGET_SYSTEM_ARM_FM
help
Root filesystem mounted via NFS. (DHCP)
diff --git a/target/config/Config.in.arch.choice b/target/config/Config.in.arch.choice
index c2fc7f2f3..54141eb3a 100644
--- a/target/config/Config.in.arch.choice
+++ b/target/config/Config.in.arch.choice
@@ -4,6 +4,12 @@ prompt "Target architecture"
config ADK_CHOOSE_TARGET_ARCH
bool "Choose target architecture"
+config ADK_LINUX_AARCH64
+ bool "aarch64 system"
+ select ADK_aarch64
+ help
+ Support for AARCH64 systems.
+
config ADK_LINUX_ARM
bool "arm system"
select ADK_arm
diff --git a/target/config/Config.in.arch.default b/target/config/Config.in.arch.default
index 90401de3d..df7e422f3 100644
--- a/target/config/Config.in.arch.default
+++ b/target/config/Config.in.arch.default
@@ -1,4 +1,7 @@
# target architectures
+config ADK_aarch64
+ bool
+
config ADK_arm
bool
@@ -34,6 +37,7 @@ config ADK_x86
config ADK_TARGET_ARCH
string
+ default "aarch64" if ADK_aarch64
default "arm" if ADK_arm
default "m68k" if ADK_m68k
default "microblaze" if ADK_microblaze
diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime
index ea023d0df..d953c1189 100644
--- a/target/config/Config.in.runtime
+++ b/target/config/Config.in.runtime
@@ -88,7 +88,7 @@ config ADK_RUNTIME_CONSOLE_SERIAL_DEVICE
string
default "hvc0" if ADK_TARGET_SYSTEM_QEMU_PPC64
default "ttyUL0" if ADK_TARGET_QEMU_MICROBLAZE_MODEL_S3ADSP1800
- default "ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB || ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9
+ default "ttyAMA0" if ADK_TARGET_QEMU_ARM_MODEL_VERSATILEPB || ADK_TARGET_QEMU_ARM_MODEL_VEXPRESS_A9 || ADK_TARGET_SYSTEM_ARM_FM
default "ttySC1" if ADK_TARGET_SYSTEM_QEMU_SH4 || ADK_TARGET_SYSTEM_QEMU_SH4EB
default "ttymxc0" if ADK_TARGET_SYSTEM_CUBOX_I
default "ttyS0"
diff --git a/target/config/Config.in.system.choice b/target/config/Config.in.system.choice
index 54e4e621a..ccbaa1e82 100644
--- a/target/config/Config.in.system.choice
+++ b/target/config/Config.in.system.choice
@@ -1,3 +1,4 @@
+source "target/aarch64/Config.in"
source "target/arm/Config.in"
source "target/m68k/Config.in"
source "target/microblaze/Config.in"
diff --git a/target/tarch.lst b/target/tarch.lst
index 60e064398..8b3a57ef0 100644
--- a/target/tarch.lst
+++ b/target/tarch.lst
@@ -1,3 +1,4 @@
+aarch64
arm
armhf
m68k