From 5c3f3f1b1b50d1e2a1a141943b94f08f19f59b6d Mon Sep 17 00:00:00 2001
From: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
Date: Sun, 11 Apr 2021 20:04:06 -0700
Subject: [PATCH] Add systemd support for microblaze architecture

Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com>
---
 src/basic/architecture.c | 3 +++
 src/basic/architecture.h | 4 ++++
 2 files changed, 7 insertions(+)

diff --git a/src/basic/architecture.c b/src/basic/architecture.c
index 85837b5..dbcefbc 100644
--- a/src/basic/architecture.c
+++ b/src/basic/architecture.c
@@ -54,6 +54,8 @@ int uname_architecture(void) {
                 { "mips",       ARCHITECTURE_MIPS     },
 #elif defined(__alpha__)
                 { "alpha" ,     ARCHITECTURE_ALPHA    },
+#elif defined(__microblaze__)
+                { "microblaze" ,     ARCHITECTURE_MICROBLAZE },
 #elif defined(__arm__) || defined(__aarch64__)
                 { "aarch64",    ARCHITECTURE_ARM64    },
                 { "aarch64_be", ARCHITECTURE_ARM64_BE },
@@ -173,6 +175,7 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
         [ARCHITECTURE_RISCV64] = "riscv64",
         [ARCHITECTURE_ARC] = "arc",
         [ARCHITECTURE_ARC_BE] = "arc-be",
+        [ARCHITECTURE_MICROBLAZE] = "microblaze",
 };
 
 DEFINE_STRING_TABLE_LOOKUP(architecture, int);
diff --git a/src/basic/architecture.h b/src/basic/architecture.h
index 443e890..559ada9 100644
--- a/src/basic/architecture.h
+++ b/src/basic/architecture.h
@@ -42,6 +42,7 @@ enum {
         ARCHITECTURE_NIOS2,
         ARCHITECTURE_RISCV32,
         ARCHITECTURE_RISCV64,
+        ARCHITECTURE_MICROBLAZE,
         ARCHITECTURE_ARC,
         ARCHITECTURE_ARC_BE,
         _ARCHITECTURE_MAX,
@@ -229,6 +230,9 @@ int uname_architecture(void);
 #    define native_architecture() ARCHITECTURE_ARC
 #    define LIB_ARCH_TUPLE "arc-linux"
 #  endif
+#elif defined(__microblaze__)
+#  define native_architecture() ARCHITECTURE_MICROBLAZE
+#  define LIB_ARCH_TUPLE "microblazeel-xilinx-linux"
 #else
 #  error "Please register your architecture here!"
 #endif
-- 
2.7.4

