All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waldemar Brodkorb <wbx@openadk.org>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH 1/3] arch: add support for loongarch64
Date: Tue, 14 May 2024 08:26:09 +0200	[thread overview]
Message-ID: <ZkMEATm9Efp16zRg@waldemar-brodkorb.de> (raw)

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 arch/Config.in             | 12 ++++++++++++
 arch/Config.in.loongarch64 | 14 ++++++++++++++
 package/glibc/Config.in    |  1 +
 package/musl/Config.in     |  1 +
 4 files changed, 28 insertions(+)
 create mode 100644 arch/Config.in.loongarch64

diff --git a/arch/Config.in b/arch/Config.in
index f39c33ef7f..070a4aca3a 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -77,6 +77,14 @@ config BR2_i386
 	  Intel i386 architecture compatible microprocessor
 	  http://en.wikipedia.org/wiki/I386
 
+config BR2_loongarch64
+	bool "loongarch64"
+	select BR2_ARCH_IS_64
+	select BR2_USE_MMU
+	help
+	  Loongarch is a RISC microprocessor from Loongarch Technologies.
+	  https://en.wikipedia.org/wiki/Loongson
+
 config BR2_m68k
 	bool "m68k"
 	# MMU support is set by the subarchitecture file, arch/Config.in.m68k
@@ -374,6 +382,10 @@ if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_aarch64_be
 source "arch/Config.in.arm"
 endif
 
+if BR2_loongarch64
+source "arch/Config.in.loongarch64"
+endif
+
 if BR2_m68k
 source "arch/Config.in.m68k"
 endif
diff --git a/arch/Config.in.loongarch64 b/arch/Config.in.loongarch64
new file mode 100644
index 0000000000..2b5bac095d
--- /dev/null
+++ b/arch/Config.in.loongarch64
@@ -0,0 +1,14 @@
+config BR2_ARCH
+	default "loongarch64"
+
+config BR2_NORMALIZED_ARCH
+	default "loongarch"
+
+config BR2_ENDIAN
+	default "LITTLE"
+
+config BR2_READELF_ARCH_NAME
+	default "LoongArch"
+
+# vim: ft=kconfig
+# -*- mode:kconfig; -*-
diff --git a/package/glibc/Config.in b/package/glibc/Config.in
index 81c64083f4..5385e2a855 100644
--- a/package/glibc/Config.in
+++ b/package/glibc/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
 	default y if BR2_aarch64
 	default y if BR2_aarch64_be
 	default y if BR2_i386
+	default y if BR2_loongarch64
 	default y if BR2_m68k_m68k
 	default y if BR2_mips
 	default y if BR2_mipsel
diff --git a/package/musl/Config.in b/package/musl/Config.in
index a6e2af054c..70475326f5 100644
--- a/package/musl/Config.in
+++ b/package/musl/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_MUSL_ARCH_SUPPORTS
 	default y if BR2_arm
 	default y if BR2_armeb
 	default y if BR2_i386
+	default y if BR2_loongarch64
 	default y if BR2_m68k_m68k
 	default y if BR2_microblaze
 	default y if BR2_mips
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2024-05-14  6:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14  6:26 Waldemar Brodkorb [this message]
2024-05-14  8:02 ` [Buildroot] [PATCH 1/3] arch: add support for loongarch64 Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZkMEATm9Efp16zRg@waldemar-brodkorb.de \
    --to=wbx@openadk.org \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.