All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Add basic support for the AArch64 architecture
@ 2012-10-28 16:40 Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 1/7] Add AArch64 to the list of architectures Thomas Petazzoni
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 16:40 UTC (permalink / raw)
  To: buildroot

Hello,

This set of patches adds basic AArch64 (the new ARM 64 bits
architecture) support in Buildroot:

 (1) Add the new architecture

 (2) Add a AArch64 external toolchain provided by Linaro

 (3) Ensure that only external toolchain can be used for AArch64 (we
     don't have internal or Crosstool-NG backend support for this
     architecture at the moment)

 (4) Add a fix for Busybox needed to get it to build with recent C
     library versions.

 (5) Add the AArch64 handling to KERNEL_ARCH

 (6) Add a new bootloader for the AArch64 ARM simulator.

 (7) Add a default configuration to generate a Buildroot system for
     the AArch64 ARM simulator.

And the system runs fine:

===============================================================================
Initializing cgroup subsys cpu
Linux version 3.7.0-rc2 (thomas at skate) (gcc version 4.7.3 20121001 (prerelease) [gcc-linaro/4.7 revision 115029] (crosstool-NG linaro-1.13.1+bzr2506 - ARM aarch64 via Linaro) ) #1 SMP Sun Oct 28 17:27:07 CET 2012
CPU: AArch64 Processor [410fd000] revision 0
Machine: V2P-AARCH64
PERCPU: Embedded 10 pages/cpu @ffffffc03ffa9000 s10624 r8192 d22144 u40960
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 926720
Kernel command line: root=/dev/vda consolelog=9 console=ttyAMA0 rw
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
software IO TLB [mem 0xb8000000-0xbbffffff] (64MB) mapped at [ffffffc038000000-ffffffc03bffffff]
Memory: 2048MB 2048MB = 4096MB total
Memory: 4059616k/4059616k available, 134688k reserved
Virtual kernel memory layout:
    vmalloc : 0xffffff8000000000 - 0xffffffbbffff0000   (245759 MB)
    vmemmap : 0xffffffbc01c00000 - 0xffffffbc1f800000   (   476 MB)
    modules : 0xffffffbffc000000 - 0xffffffc000000000   (    64 MB)
    memory  : 0xffffffc000000000 - 0xffffffc880000000   ( 34816 MB)
      .init : 0xffffffc0004c0000 - 0xffffffc0004e8980   (   163 kB)
      .text : 0xffffffc000080000 - 0xffffffc0004c0000   (  4352 kB)
      .data : 0xffffffc0004ea000 - 0xffffffc00051c620   (   202 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:64 nr_irqs:64 0
Architected local timer running at 100.00MHz.
arch_timer: found timer irq 30
Console: colour dummy device 80x25
Calibrating delay loop (skipped), value calculated using timer frequency.. 200.00 BogoMIPS (lpj=1000000)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 256
hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 9 counters available
CPU1: failed to boot: -38
CPU2: failed to boot: -38
CPU3: failed to boot: -38
Brought up 1 CPUs
SMP: Total of 1 processors activated (200.00 BogoMIPS).
devtmpfs: initialized
atomic64 test passed
NET: Registered protocol family 16
vdso: 2 pages (1 code, 1 data) at base ffffffc00051e000
hw-breakpoint: found 16 breakpoint and 16 watchpoint registers.
Serial: AMBA PL011 UART driver
1c090000.uart: ttyAMA0 at MMIO 0x1c090000 (irq = 37) is a PL011 rev1
console [ttyAMA0] enabled
1c0a0000.uart: ttyAMA1 at MMIO 0x1c0a0000 (irq = 38) is a PL011 rev1
1c0b0000.uart: ttyAMA2 at MMIO 0x1c0b0000 (irq = 39) is a PL011 rev1
1c0c0000.uart: ttyAMA3 at MMIO 0x1c0c0000 (irq = 40) is a PL011 rev1
bio: create slab <bio-0> at 0
SCSI subsystem initialized
Switching to clocksource arch_sys_counter
NET: Registered protocol family 2
TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP: reno registered
UDP hash table entries: 2048 (order: 4, 65536 bytes)
UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
fuse init (API version 7.20)
msgmni has been set to 7928
io scheduler noop registered
io scheduler cfq registered (default)
 vda: unknown partition table
smc91x: IOADDR ffffff800001a000 doesn't match configuration (300).
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
eth0: SMC91C11xFD (rev 1) at ffffff800001a000 IRQ 47 [nowait]
eth0: Ethernet addr: 00:02:f7:ef:5f:8a
mousedev: PS/2 mouse device common for all mice
TCP: cubic registered
NET: Registered protocol family 17
EXT2-fs (vda): warning: mounting unchecked fs, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 254:0.
Freeing init memory: 160K
Starting logging: OK
Initializing random number generator... done.
Starting network...

Welcome to Buildroot
buildroot login: root
# hostname
buildroot
# cat /proc/cpuinfo
Processor       : AArch64 Processor rev 0 (aarch64)
processor       : 0
BogoMIPS        : 200.00

Features        : fp asimd
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant     : 0x0
CPU part        : 0xd00
CPU revision    : 0

Hardware        : V2P-AARCH64
# uname -a
Linux buildroot 3.7.0-rc2 #1 SMP Sun Oct 28 17:27:07 CET 2012 aarch64 GNU/Linux
===============================================================================

Best regards,

Thomas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 1/7] Add AArch64 to the list of architectures
  2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
@ 2012-10-28 16:40 ` Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 2/7] toolchain-external: add aarch64 external toolchain Thomas Petazzoni
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 16:40 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 target/Config.in.arch |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/target/Config.in.arch b/target/Config.in.arch
index 639327a..ac2c0b5 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -23,6 +23,13 @@ config BR2_armeb
 	  http://www.arm.com/
 	  http://en.wikipedia.org/wiki/ARM
 
+config BR2_aarch64
+	bool "AArch64"
+	help
+	  Aarch64 is a 64-bit architecture developed by ARM Holdings.
+	  http://www.arm.com/products/processors/instruction-set-architectures/armv8-architecture.php
+	  http://en.wikipedia.org/wiki/ARM
+
 config BR2_avr32
 	bool "AVR32"
 	select BR2_SOFT_FLOAT
@@ -580,6 +587,7 @@ config BR2_ARCH
 	string
 	default "arm"		if BR2_arm
 	default "armeb"		if BR2_armeb
+	default "aarch64"       if BR2_aarch64
 	default "avr32"		if BR2_avr32
 	default "bfin"		if BR2_bfin
 	default "i386"		if BR2_x86_i386
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 2/7] toolchain-external: add aarch64 external toolchain
  2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 1/7] Add AArch64 to the list of architectures Thomas Petazzoni
@ 2012-10-28 16:40 ` Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 3/7] toolchain: make external toolchain the default for AArch64 Thomas Petazzoni
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 16:40 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/Config.in   |   10 ++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 13 insertions(+)

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 105fb2a..53b85eb 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -582,6 +582,15 @@ config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2
 	  Toolchain for the Microblaze architecture, from
 	  http://wiki.xilinx.com/mb-gnu-tools
 
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_12_10
+	bool "Linaro AArch64 12.10"
+	depends on BR2_aarch64
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Toolchain for the AArch64 architecture, from
+	  http://www.linaro.org/engineering/armv8/
+
 config BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 	bool "Custom toolchain"
 	help
@@ -642,6 +651,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201103
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201203
+	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_12_10
 	default "microblazeel-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2
 	default "microblaze-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 43d747c..f2969f3 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -262,6 +262,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=microblazeel-unknown-linux-gnu.tgz
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2),y)
 TOOLCHAIN_EXTERNAL_SITE=http://git.xilinx.com/?p=xldk/microblaze_v2.0.git;a=blob;h=71e031ae990e063a5718f90d30cf97ad85e2f565;hb=569081301f0f1d8d3b24335a364e8ff1774190d4;f=
 TOOLCHAIN_EXTERNAL_SOURCE=microblaze-unknown-linux-gnu.tgz
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_12_10),y)
+TOOLCHAIN_EXTERNAL_SITE=http://releases.linaro.org/12.10/components/toolchain/gcc-linaro/aarch64/rc3/
+TOOLCHAIN_EXTERNAL_SOURCE=gcc-linaro-aarch64-linux-gnu-4.7+bzr115029-20121015+bzr2506_linux.tar.bz2
 else
 # Custom toolchain
 TOOLCHAIN_EXTERNAL_SITE=$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 3/7] toolchain: make external toolchain the default for AArch64
  2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 1/7] Add AArch64 to the list of architectures Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 2/7] toolchain-external: add aarch64 external toolchain Thomas Petazzoni
@ 2012-10-28 16:40 ` Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 4/7] busybox: add fix for build issue with recent C libraries Thomas Petazzoni
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 16:40 UTC (permalink / raw)
  To: buildroot

Our internal toolchain backend does not yet have support for AArch64,
and Crosstool-NG also does not have support for AArch64 at the moment
(though it should be coming quickly since the Linaro AArch64 toolchain
is generated with a modified Crosstool-NG version).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/Config.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 849b8e3..29ed2f0 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -10,7 +10,7 @@ choice
 
 config BR2_TOOLCHAIN_BUILDROOT
 	bool "Buildroot toolchain"
-	depends on !BR2_microblaze
+	depends on !BR2_microblaze && !BR2_aarch64
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED
 
@@ -23,7 +23,7 @@ config BR2_TOOLCHAIN_EXTERNAL
 
 config BR2_TOOLCHAIN_CTNG
 	bool "Crosstool-NG toolchain"
-	depends on !BR2_microblaze
+	depends on !BR2_microblaze && !BR2_aarch64
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG_IF_NEEDED
 	help
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 4/7] busybox: add fix for build issue with recent C libraries
  2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2012-10-28 16:40 ` [Buildroot] [PATCH 3/7] toolchain: make external toolchain the default for AArch64 Thomas Petazzoni
@ 2012-10-28 16:40 ` Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 5/7] Support KERNEL_ARCH for AArch64 Thomas Petazzoni
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 16:40 UTC (permalink / raw)
  To: buildroot

The AArch64 toolchain uses a recent C library, which requires a build
fix in Busybox, which has been sent upstream but hasn't been merged
yet.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../busybox-1.20.2-fix-resource-h-failure.patch    |   30 ++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/busybox/busybox-1.20.2/busybox-1.20.2-fix-resource-h-failure.patch

diff --git a/package/busybox/busybox-1.20.2/busybox-1.20.2-fix-resource-h-failure.patch b/package/busybox/busybox-1.20.2/busybox-1.20.2-fix-resource-h-failure.patch
new file mode 100644
index 0000000..7667640
--- /dev/null
+++ b/package/busybox/busybox-1.20.2/busybox-1.20.2-fix-resource-h-failure.patch
@@ -0,0 +1,30 @@
+On a system running glibc trunk busybox doesn't compile:
+
+loginutils/passwd.c: In function ?passwd_main?:
+loginutils/passwd.c:104:16: error: storage size of ?rlimit_fsize? isn?t known
+loginutils/passwd.c:188:2: warning: implicit declaration of function ?setrlimit? [-Wimplicit-function-declaration]
+loginutils/passwd.c:188:12: error: ?RLIMIT_FSIZE? undeclared (first use in this function)
+loginutils/passwd.c:188:12: note: each undeclared identifier is reported only once for each function it appears in
+loginutils/passwd.c:104:16: warning: unused variable ?rlimit_fsize? [-Wunused-variable]
+...
+miscutils/time.c:23:16: error: field ?ru? has incomplete type
+
+Fix this by including sys/resource.h.
+
+Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
+---
+ include/libbb.h |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/include/libbb.h b/include/libbb.h
+index f12800f..e7806c2 100644
+--- a/include/libbb.h
++++ b/include/libbb.h
+@@ -40,6 +40,7 @@
+ #include <sys/poll.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
++#include <sys/resource.h>
+ #include <sys/socket.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 5/7] Support KERNEL_ARCH for AArch64
  2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2012-10-28 16:40 ` [Buildroot] [PATCH 4/7] busybox: add fix for build issue with recent C libraries Thomas Petazzoni
@ 2012-10-28 16:40 ` Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 6/7] boot-wrapper-aarch64: new package Thomas Petazzoni
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 16:40 UTC (permalink / raw)
  To: buildroot

The architecture tuple is 'aarch64', but the kernel people decided to
call it 'arm64', so we have to do some mungling to get the kernel
architecture name from the Buildroot architecture name.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Makefile |    1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index 0128839..dff6aeb 100644
--- a/Makefile
+++ b/Makefile
@@ -235,6 +235,7 @@ ARCH:=$(call qstrip,$(BR2_ARCH))
 KERNEL_ARCH:=$(shell echo "$(ARCH)" | sed -e "s/-.*//" \
 	-e s/i.86/i386/ -e s/sun4u/sparc64/ \
 	-e s/arm.*/arm/ -e s/sa110/arm/ \
+	-e s/aarch64/arm64/ \
 	-e s/bfin/blackfin/ \
 	-e s/parisc64/parisc/ \
 	-e s/powerpc64/powerpc/ \
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 6/7] boot-wrapper-aarch64: new package
  2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2012-10-28 16:40 ` [Buildroot] [PATCH 5/7] Support KERNEL_ARCH for AArch64 Thomas Petazzoni
@ 2012-10-28 16:40 ` Thomas Petazzoni
  2012-10-28 16:40 ` [Buildroot] [PATCH 7/7] Add default configuration for the AArch64 Foundation V8 simulator Thomas Petazzoni
  2017-01-27 19:09 ` [Buildroot] Add basic support for the AArch64 architecture gbarry
  7 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 16:40 UTC (permalink / raw)
  To: buildroot

The boot wrapper contains both a minimal bootloader and a tool to
generate an image suitable for execution by the AArch64 software
simulator. The image generated embeds the minimal bootloader, the
kernel image, the Device Tree Blob and the kernel command line.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/Config.in                                    |    1 +
 boot/boot-wrapper-aarch64/Config.in               |   31 +++++++++++++++++++++
 boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk |   29 +++++++++++++++++++
 3 files changed, 61 insertions(+)
 create mode 100644 boot/boot-wrapper-aarch64/Config.in
 create mode 100644 boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk

diff --git a/boot/Config.in b/boot/Config.in
index a55139b..eb5f7cd 100644
--- a/boot/Config.in
+++ b/boot/Config.in
@@ -4,6 +4,7 @@ source "boot/at91bootstrap/Config.in"
 source "boot/at91bootstrap3/Config.in"
 source "boot/at91dataflashboot/Config.in"
 source "boot/barebox/Config.in"
+source "boot/boot-wrapper-aarch64/Config.in"
 source "boot/grub/Config.in"
 source "boot/lpc32xxcdl/Config.in"
 source "boot/mxs-bootlets/Config.in"
diff --git a/boot/boot-wrapper-aarch64/Config.in b/boot/boot-wrapper-aarch64/Config.in
new file mode 100644
index 0000000..6546862
--- /dev/null
+++ b/boot/boot-wrapper-aarch64/Config.in
@@ -0,0 +1,31 @@
+config BR2_TARGET_BOOT_WRAPPER_AARCH64
+	bool "boot-wrapper-aarch64"
+	depends on BR2_aarch64
+	depends on BR2_LINUX_KERNEL
+	help
+	  The boot-wrapper-aarch64 is a small bootloader that makes it
+	  possible to start an Aarch64 kernel inside the available
+	  software simulators for the Aarch64 architecture.
+
+	  git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git
+
+if BR2_TARGET_BOOT_WRAPPER_AARCH64
+
+config BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS
+	string "Device Tree Source name"
+	default ""
+	help
+	  Name of the Device Tree Source file to use to generate the
+	  Device Tree Blob that will be embedded in the image
+	  generated by the boot wrapper. Valid names are the .dts
+	  files from arch/arm64/boot/dts/ in the kernel source
+	  tree. The name must be specified without the .dts suffix.
+
+config BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS
+	string "Kernel bootargs"
+	default ""
+	help
+	  Kernel bootargs to embed inside the image generated by the
+	  boot wrapper.
+
+endif
diff --git a/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
new file mode 100644
index 0000000..25c6bed
--- /dev/null
+++ b/boot/boot-wrapper-aarch64/boot-wrapper-aarch64.mk
@@ -0,0 +1,29 @@
+#############################################################
+#
+# boot-wrapper-aarch64
+#
+#############################################################
+
+BOOT_WRAPPER_AARCH64_VERSION        = 26b62f586020fd998c6efd43db657eaafeec14da
+BOOT_WRAPPER_AARCH64_SITE           = git://git.kernel.org/pub/scm/linux/kernel/git/cmarinas/boot-wrapper-aarch64.git
+BOOT_WRAPPER_AARCH64_LICENSE        = BSD3c
+BOOT_WRAPPER_AARCH64_LICENSE_FILES  = LICENSE.txt
+BOOT_WRAPPER_AARCH64_DEPENDENCIES   = linux
+BOOT_WRAPPER_AARCH64_INSTALL_IMAGES = YES
+
+BOOT_WRAPPER_AARCH64_DTS = $(call qstrip,$(BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS))
+
+define BOOT_WRAPPER_AARCH64_BUILD_CMDS
+	$(MAKE) \
+		KERNEL=$(BINARIES_DIR)/Image \
+		DTC=$(LINUX_DIR)/scripts/dtc/dtc \
+		FDT_SRC=$(LINUX_DIR)/arch/arm64/boot/dts/$(BOOT_WRAPPER_AARCH64_DTS).dts \
+		CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" \
+		BOOTARGS='$(BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS)' -C $(@D)
+endef
+
+define BOOT_WRAPPER_AARCH64_INSTALL_IMAGES_CMDS
+	cp $(@D)/linux-system.axf $(BINARIES_DIR)
+endef
+
+$(eval $(generic-package))
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH 7/7] Add default configuration for the AArch64 Foundation V8 simulator
  2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2012-10-28 16:40 ` [Buildroot] [PATCH 6/7] boot-wrapper-aarch64: new package Thomas Petazzoni
@ 2012-10-28 16:40 ` Thomas Petazzoni
  2017-01-27 19:09 ` [Buildroot] Add basic support for the AArch64 architecture gbarry
  7 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2012-10-28 16:40 UTC (permalink / raw)
  To: buildroot

Note that this configuration doesn't build entirely: the user must
manually run "make busybox-menuconfig" and disable the "Mount NFS
filesystems" option, because the toolchain does not have RPC support.

This issue will be fixed once the support for toolchain without RPC
will be integrated.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 board/arm/foundation-v8/readme.txt |   27 +++++++++++++++++++++++++++
 configs/arm_foundationv8_defconfig |   15 +++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 board/arm/foundation-v8/readme.txt
 create mode 100644 configs/arm_foundationv8_defconfig

diff --git a/board/arm/foundation-v8/readme.txt b/board/arm/foundation-v8/readme.txt
new file mode 100644
index 0000000..dcc5f14
--- /dev/null
+++ b/board/arm/foundation-v8/readme.txt
@@ -0,0 +1,27 @@
+This is the support for the ARM Foundation v8 machine emulated by the
+ARM software simulator of the AArch64 architecture.
+
+First, one has to download the AArch64 software simulator from:
+
+  https://silver.arm.com/download/download.tm?pv=1317469
+
+Then, use the arm_foundationv8_defconfig configuration to build your
+Buildroot system.
+
+Note that the Busybox build will fail due to the lack of rpc/rpc.h
+(the AArch64 toolchain does not have RPC support). Run 'make
+busybox-menuconfig', and in 'Linux System Utilities', disable the
+option 'Support mounting NFS file systems on Linux < 2.6.23' and
+restart the build. This problem will be fix in upcomins versions of
+Buildroot.
+
+Finally, boot your system with:
+
+ ${LOCATION_OF_FOUNDATIONV8_SIMULATOR}/Foundation_v8 \
+    --image output/images/linux-system.axf \
+    --block-device output/images/rootfs.ext2 \
+    --network=nat
+
+You can network network access from within the simulated environment
+by requesting an IP address using DHCP (run the command 'udhcpc').
+
diff --git a/configs/arm_foundationv8_defconfig b/configs/arm_foundationv8_defconfig
new file mode 100644
index 0000000..7a50b1a
--- /dev/null
+++ b/configs/arm_foundationv8_defconfig
@@ -0,0 +1,15 @@
+BR2_aarch64=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+BR2_TARGET_ROOTFS_EXT2=y
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_BOOT_WRAPPER_AARCH64=y
+BR2_TARGET_BOOT_WRAPPER_AARCH64_DTS="vexpress-foundation-v8"
+BR2_TARGET_BOOT_WRAPPER_AARCH64_BOOTARGS="root=/dev/vda consolelog=9 console=ttyAMA0 rw"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL="git://git.linaro.org/kernel/linaro-aarch64.git"
+BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION="7181edd0539e195f78adedbb6c3878f9f1e0c4bb"
+BR2_LINUX_KERNEL_DEFCONFIG="vexpress"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="Image"
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] Add basic support for the AArch64 architecture
  2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2012-10-28 16:40 ` [Buildroot] [PATCH 7/7] Add default configuration for the AArch64 Foundation V8 simulator Thomas Petazzoni
@ 2017-01-27 19:09 ` gbarry
  2017-01-27 19:31   ` Thomas Petazzoni
  7 siblings, 1 reply; 10+ messages in thread
From: gbarry @ 2017-01-27 19:09 UTC (permalink / raw)
  To: buildroot

Hi,

Do you have this set of patches posted in a git huh repo somewhere ? I am
trying to get an ARM64 system running using buildroot and Linux 4.4.

Thanks,

garrett



--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Add-basic-support-for-the-AArch64-architecture-tp33668p155378.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] Add basic support for the AArch64 architecture
  2017-01-27 19:09 ` [Buildroot] Add basic support for the AArch64 architecture gbarry
@ 2017-01-27 19:31   ` Thomas Petazzoni
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Petazzoni @ 2017-01-27 19:31 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 27 Jan 2017 11:09:56 -0800 (PST), gbarry wrote:

> Do you have this set of patches posted in a git huh repo somewhere ? I am
> trying to get an ARM64 system running using buildroot and Linux 4.4.

You're replying to a patch series from 2012. It has been merged since a
long long time. So it's all available from the official Buildroot Git
repository.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-01-27 19:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-28 16:40 [Buildroot] Add basic support for the AArch64 architecture Thomas Petazzoni
2012-10-28 16:40 ` [Buildroot] [PATCH 1/7] Add AArch64 to the list of architectures Thomas Petazzoni
2012-10-28 16:40 ` [Buildroot] [PATCH 2/7] toolchain-external: add aarch64 external toolchain Thomas Petazzoni
2012-10-28 16:40 ` [Buildroot] [PATCH 3/7] toolchain: make external toolchain the default for AArch64 Thomas Petazzoni
2012-10-28 16:40 ` [Buildroot] [PATCH 4/7] busybox: add fix for build issue with recent C libraries Thomas Petazzoni
2012-10-28 16:40 ` [Buildroot] [PATCH 5/7] Support KERNEL_ARCH for AArch64 Thomas Petazzoni
2012-10-28 16:40 ` [Buildroot] [PATCH 6/7] boot-wrapper-aarch64: new package Thomas Petazzoni
2012-10-28 16:40 ` [Buildroot] [PATCH 7/7] Add default configuration for the AArch64 Foundation V8 simulator Thomas Petazzoni
2017-01-27 19:09 ` [Buildroot] Add basic support for the AArch64 architecture gbarry
2017-01-27 19:31   ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.