You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/08/21 06:23:13 UTC

[nuttx] 02/02: arm64: IMX8 MEK board support

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 630b5f32a24296e8ee508a41d22c1a4045ee4c96
Author: qinwei1 <qi...@xiaomi.com>
AuthorDate: Tue Jun 27 00:59:30 2023 +0800

    arm64: IMX8 MEK board support
    
    Summary
    
       Support for imx8qm MEK evaluate board
    
    Signed-off-by: qinwei1 <qi...@xiaomi.com>
---
 arch/arm64/Kconfig                                 |   4 +-
 arch/arm64/src/imx8/Kconfig                        |  12 +-
 boards/Kconfig                                     |  12 ++
 boards/arm64/imx8/imx8qm-mek/Kconfig               |   7 ++
 boards/arm64/imx8/imx8qm-mek/README.txt            |   5 +
 boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig |  65 +++++++++++
 .../imx8/imx8qm-mek/include/board_memorymap.h      |  59 ++++++++++
 boards/arm64/imx8/imx8qm-mek/scripts/Make.defs     |  48 ++++++++
 boards/arm64/imx8/imx8qm-mek/scripts/dramboot.ld   | 127 +++++++++++++++++++++
 boards/arm64/imx8/imx8qm-mek/src/Makefile          |  29 +++++
 boards/arm64/imx8/imx8qm-mek/src/imx8_appinit.c    |  76 ++++++++++++
 boards/arm64/imx8/imx8qm-mek/src/imx8_boardinit.c  | 113 ++++++++++++++++++
 boards/arm64/imx8/imx8qm-mek/src/imx8_bringup.c    |  62 ++++++++++
 boards/arm64/imx8/imx8qm-mek/src/imx8qm-mek.h      |  59 ++++++++++
 14 files changed, 670 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 3b155b7adf..2321f7420f 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -50,12 +50,12 @@ config ARCH_CHIP_FVP_ARMV8R
 		ARM FVP virt platform (ARMv8r)
 
 config ARCH_CHIP_IMX8
-	bool "NXP iMX.8 Platform (ARMv8a)"
+	bool "NXP i.MX8 Platform (ARMv8a)"
 	select ARCH_HAVE_ADDRENV
 	select ARCH_HAVE_IRQTRIGGER
 	select ARCH_NEED_ADDRENV_MAPPING
 	---help---
-		NXP iMX.8 (ARMv8a) applications processors
+		NXP i.MX8 (ARMv8a) applications processors
 
 config ARCH_CHIP_ARM64_CUSTOM
 	bool "Custom ARM64 chip"
diff --git a/arch/arm64/src/imx8/Kconfig b/arch/arm64/src/imx8/Kconfig
index 3ebc6f4d55..0d9cb4bc0c 100644
--- a/arch/arm64/src/imx8/Kconfig
+++ b/arch/arm64/src/imx8/Kconfig
@@ -5,23 +5,23 @@
 
 if ARCH_CHIP_IMX8
 
-menu "iMX.8 Chip Selection"
+menu "i.MX8 Chip Selection"
 
 choice
-	prompt "iMX.8 Core Configuration"
+	prompt "i.MX8 Core Configuration"
 	default ARCH_CHIP_IMX8_QUADMAX
 
 config ARCH_CHIP_IMX8_QUADMAX
-	bool "iMX.8 QuadMax Application Processor"
+	bool "i.MX8 QuadMax Application Processor"
 	select ARCH_HAVE_MULTICPU
 	select ARMV8A_HAVE_GICv3
 	select ARCH_CORTEX_A53
 
-endchoice # iMX.8 Chip Selection
+endchoice # i.MX8 Chip Selection
 
-endmenu # "iMX.8 Chip Selection"
+endmenu # "i.MX8 Chip Selection"
 
-menu "iMX.8 Peripheral Selection"
+menu "i.MX8 Peripheral Selection"
 config IMX8_UART1
 	bool "UART1"
 	default n
diff --git a/boards/Kconfig b/boards/Kconfig
index 1f0ef89538..fcd3ae3048 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -1959,6 +1959,14 @@ config ARCH_BOARD_FVP_ARMV8R_AARCH32
 		This options selects support for NuttX on the Armv8-R AEM FVP
 		configure board with ARM Cortex-R52.
 
+config ARCH_BOARD_IMX8QM_MEK
+	bool "NXP i.MX8 QuadMax CPUs MEK board"
+	depends on ARCH_CHIP_IMX8_QUADMAX
+	select ARCH_HAVE_IRQBUTTONS
+	---help---
+		This options selects support for NuttX on the NXP i.MX8 QuadMax CPUs MEK
+		configure board with ARM Cortex-A53.
+
 config ARCH_BOARD_SAMA5D2_XULT
 	bool "Atmel SAMA5D2 Xplained Ultra development board"
 	depends on ARCH_CHIP_ATSAMA5D27
@@ -3094,6 +3102,7 @@ config ARCH_BOARD
 	default "pinephone"                 if ARCH_BOARD_PINEPHONE
 	default "fvp-armv8r"                if ARCH_BOARD_FVP_ARMV8R
 	default "fvp-armv8r-aarch32"        if ARCH_BOARD_FVP_ARMV8R_AARCH32
+	default "imx8qm-mek"                if ARCH_BOARD_IMX8QM_MEK
 	default "sama5d2-xult"              if ARCH_BOARD_SAMA5D2_XULT
 	default "giant-board"               if ARCH_BOARD_GIANT_BOARD
 	default "jupiter-nano"              if ARCH_BOARD_JUPITER_NANO
@@ -3299,6 +3308,9 @@ endif
 if ARCH_BOARD_FVP_ARMV8R_AARCH32
 source "boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/Kconfig"
 endif
+if ARCH_BOARD_IMX8QM_MEK
+source "boards/arm64/imx8/imx8qm-mek/Kconfig"
+endif
 if ARCH_BOARD_IMXRT1020_EVK
 source "boards/arm/imxrt/imxrt1020-evk/Kconfig"
 endif
diff --git a/boards/arm64/imx8/imx8qm-mek/Kconfig b/boards/arm64/imx8/imx8qm-mek/Kconfig
new file mode 100644
index 0000000000..2eccd6e9bc
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/Kconfig
@@ -0,0 +1,7 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_IMX8QM_MEK
+endif
diff --git a/boards/arm64/imx8/imx8qm-mek/README.txt b/boards/arm64/imx8/imx8qm-mek/README.txt
new file mode 100644
index 0000000000..952b80a957
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/README.txt
@@ -0,0 +1,5 @@
+README.txt
+==========
+
+TODO
+
diff --git a/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig b/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig
new file mode 100644
index 0000000000..c37a3f1337
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig
@@ -0,0 +1,65 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed .config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that includes your
+# modifications.
+#
+CONFIG_ARCH="arm64"
+CONFIG_ARCH_ARM64=y
+CONFIG_ARCH_BOARD="imx8qm-mek"
+CONFIG_ARCH_BOARD_IMX8QM_MEK=y
+CONFIG_ARCH_CHIP="imx8"
+CONFIG_ARCH_CHIP_IMX8=y
+CONFIG_ARCH_CHIP_IMX8_QUADMAX=y
+CONFIG_ARCH_EARLY_PRINT=y
+CONFIG_ARCH_INTERRUPTSTACK=4096
+CONFIG_BUILTIN=y
+CONFIG_DEBUG_ASSERTIONS=y
+CONFIG_DEBUG_ERROR=y
+CONFIG_DEBUG_FEATURES=y
+CONFIG_DEBUG_FULLOPT=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_SCHED=y
+CONFIG_DEBUG_SCHED_ERROR=y
+CONFIG_DEBUG_SCHED_INFO=y
+CONFIG_DEBUG_SCHED_WARN=y
+CONFIG_DEBUG_SYMBOLS=y
+CONFIG_DEBUG_WARN=y
+CONFIG_DEFAULT_TASK_STACKSIZE=8192
+CONFIG_DEV_ZERO=y
+CONFIG_EXAMPLES_HELLO=y
+CONFIG_EXPERIMENTAL=y
+CONFIG_FS_PROCFS=y
+CONFIG_FS_ROMFS=y
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+CONFIG_IDLETHREAD_STACKSIZE=8192
+CONFIG_IMX8_UART1=y
+CONFIG_INIT_ENTRYPOINT="nsh_main"
+CONFIG_INTELHEX_BINARY=y
+CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_BUILTIN_APPS=y
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_READLINE=y
+CONFIG_NSH_ROMFSETC=y
+CONFIG_PREALLOC_TIMERS=4
+CONFIG_RAMLOG=y
+CONFIG_RAM_SIZE=134217728
+CONFIG_RAM_START=0x80000000
+CONFIG_RAW_BINARY=y
+CONFIG_READLINE_CMD_HISTORY=y
+CONFIG_RR_INTERVAL=200
+CONFIG_SCHED_HPWORK=y
+CONFIG_SCHED_HPWORKPRIORITY=192
+CONFIG_SPINLOCK=y
+CONFIG_STACK_COLORATION=y
+CONFIG_START_MONTH=3
+CONFIG_START_YEAR=2022
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+CONFIG_SYSTEM_NSH=y
+CONFIG_SYSTEM_SYSTEM=y
+CONFIG_SYSTEM_TIME64=y
+CONFIG_TESTING_GETPRIME=y
+CONFIG_TESTING_OSTEST=y
+CONFIG_UART1_SERIAL_CONSOLE=y
diff --git a/boards/arm64/imx8/imx8qm-mek/include/board_memorymap.h b/boards/arm64/imx8/imx8qm-mek/include/board_memorymap.h
new file mode 100644
index 0000000000..aa6ec27eda
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/include/board_memorymap.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+ * boards/arm64/imx8/imx8qm-mek/include/board_memorymap.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_IMX8_IMX8QM_MEK_INCLUDE_BOARD_MEMORYMAP_H__
+#define __BOARDS_ARM_IMX8_IMX8QM_MEK_INCLUDE_BOARD_MEMORYMAP_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C"
+{
+#else
+#define EXTERN extern
+#endif
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+#undef EXTERN
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* __BOARDS_ARM_IMX8_IMX8QM_MEK_INCLUDE_BOARD_MEMORYMAP_H__ */
diff --git a/boards/arm64/imx8/imx8qm-mek/scripts/Make.defs b/boards/arm64/imx8/imx8qm-mek/scripts/Make.defs
new file mode 100644
index 0000000000..cc4ed35200
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/scripts/Make.defs
@@ -0,0 +1,48 @@
+############################################################################
+# boards/arm64/imx8/imx8qm-mek/scripts/Make.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(TOPDIR)/.config
+include $(TOPDIR)/tools/Config.mk
+include $(TOPDIR)/arch/arm64/src/Toolchain.defs
+
+LDSCRIPT = dramboot.ld
+
+ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT)
+
+CFLAGS := $(ARCHCFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
+CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
+CXXFLAGS := $(ARCHCXXFLAGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS) -pipe
+CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
+CPPFLAGS := $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRAFLAGS)
+AFLAGS := $(CFLAGS) -D__ASSEMBLY__
+
+# NXFLAT module definitions
+
+NXFLATLDFLAGS1 = -r -d -warn-common
+NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)gnu-nxflat-pcrel.ld -no-check-sections
+LDNXFLATFLAGS = -e main -s 2048
+
+# ELF module definitions
+
+CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
+CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs
+
+LDELFFLAGS = -r -e main
+LDELFFLAGS += -T $(call CONVERT_PATH,$(TOPDIR)/binfmt/libelf/gnu-elf.ld)
diff --git a/boards/arm64/imx8/imx8qm-mek/scripts/dramboot.ld b/boards/arm64/imx8/imx8qm-mek/scripts/dramboot.ld
new file mode 100644
index 0000000000..e7e74b5e18
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/scripts/dramboot.ld
@@ -0,0 +1,127 @@
+/****************************************************************************
+ * boards/arm64/imx8/imx8qm-mek/scripts/dramboot.ld
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+OUTPUT_ARCH(aarch64)
+
+ENTRY(__start)
+
+PHDRS
+{
+  text PT_LOAD ;
+}
+
+SECTIONS
+{
+  . = 0x80280000;  /* uboot load address */
+  _start = .;
+  .text : {
+        _stext = .;            /* Text section */
+       *(.text)
+       *(.text.cold)
+       *(.text.unlikely)
+       *(.fixup)
+       *(.gnu.warning)
+  } :text = 0x9090
+
+  . = ALIGN(4096);
+
+  .init_section : {
+        _sinit = ABSOLUTE(.);
+        KEEP(*(.init_array .init_array.*))
+        _einit = ABSOLUTE(.);
+  }
+
+  . = ALIGN(4096);
+
+  .vector : {
+        _vector_start = .;
+        KEEP(*(.exc_vector_table))
+        KEEP(*(".exc_vector_table.*"))
+        KEEP(*(.vectors))
+       _vector_end = .;
+  } :text
+  . = ALIGN(4096);
+  _etext = .; /* End_1 of .text */
+  _sztext = _etext - _stext;
+
+  . = ALIGN(4096);
+  .rodata : {
+        _srodata = .;          /* Read-only data */
+       *(.rodata)
+       *(.rodata.*)
+       *(.data.rel.ro)
+       *(.data.rel.ro.*)
+  } :text
+  . = ALIGN(4096);
+  _erodata = .;                /* End of read-only data */
+  _szrodata = _erodata - _srodata;
+  _eronly = .;  /* End of read-only data */
+
+  . = ALIGN(4096);
+  .data : {                    /* Data */
+        _sdata = .;
+       *(.data.page_aligned)
+       *(.data)
+       . = ALIGN(8);
+       *(.data.rel)
+       *(.data.rel.*)
+       CONSTRUCTORS
+  } :text
+  _edata = .; /* End+1 of .data */
+
+  .bss : {                     /* BSS */
+       . = ALIGN(8);
+       _sbss = .;
+       *(.bss)
+       . = ALIGN(8);
+  } :text
+  . = ALIGN(4096);
+  _ebss = .;
+  _szbss = _ebss - _sbss;
+
+  .initstack : {             /* INIT STACK */
+       _s_initstack = .;
+       *(.initstack)
+       . = ALIGN(16);
+  } :text
+  . = ALIGN(4096);
+  _e_initstack = . ;
+  g_idle_topstack = . ;
+
+  _szdata = _e_initstack - _sdata;
+
+  /* Sections to be discarded */
+  /DISCARD/ : {
+       *(.exit.text)
+       *(.exit.data)
+       *(.exitcall.exit)
+       *(.eh_frame)
+  }
+
+  /* Stabs debugging sections.  */
+  .stab 0 : { *(.stab) }
+  .stabstr 0 : { *(.stabstr) }
+  .stab.excl 0 : { *(.stab.excl) }
+  .stab.exclstr 0 : { *(.stab.exclstr) }
+  .stab.index 0 : { *(.stab.index) }
+  .stab.indexstr 0 : { *(.stab.indexstr) }
+  .comment 0 : { *(.comment) }
+}
+
diff --git a/boards/arm64/imx8/imx8qm-mek/src/Makefile b/boards/arm64/imx8/imx8qm-mek/src/Makefile
new file mode 100644
index 0000000000..7c5990d74f
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/src/Makefile
@@ -0,0 +1,29 @@
+############################################################################
+# boards/arm/imx6/sabre-6quad/src/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(TOPDIR)/Make.defs
+
+CSRCS = imx8_boardinit.c imx8_bringup.c
+
+ifeq ($(CONFIG_BOARDCTL),y)
+CSRCS += imx8_appinit.c
+endif
+
+include $(TOPDIR)/boards/Board.mk
diff --git a/boards/arm64/imx8/imx8qm-mek/src/imx8_appinit.c b/boards/arm64/imx8/imx8qm-mek/src/imx8_appinit.c
new file mode 100644
index 0000000000..d5a04d3937
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/src/imx8_appinit.c
@@ -0,0 +1,76 @@
+/****************************************************************************
+ * boards/arm64/imx8/imx8qm-mek/src/imx8_appinit.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <sys/types.h>
+
+#include <nuttx/board.h>
+
+#include "imx8qm-mek.h"
+
+#ifdef CONFIG_BOARDCTL
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: board_app_initialize
+ *
+ * Description:
+ *   Perform application specific initialization.  This function is never
+ *   called directly from application code, but only indirectly via the
+ *   (non-standard) boardctl() interface using the command BOARDIOC_INIT.
+ *
+ * Input Parameters:
+ *   arg - The boardctl() argument is passed to the board_app_initialize()
+ *         implementation without modification.  The argument has no
+ *         meaning to NuttX; the meaning of the argument is a contract
+ *         between the board-specific initialization logic and the
+ *         matching application logic.  The value could be such things as a
+ *         mode enumeration value, a set of DIP switch switch settings, a
+ *         pointer to configuration data read from a file or serial FLASH,
+ *         or whatever you would like to do with it.  Every implementation
+ *         should accept zero/NULL as a default configuration.
+ *
+ * Returned Value:
+ *   Zero (OK) is returned on success; a negated errno value is returned on
+ *   any failure to indicate the nature of the failure.
+ *
+ ****************************************************************************/
+
+int board_app_initialize(uintptr_t arg)
+{
+  UNUSED(arg);
+#ifndef CONFIG_BOARD_LATE_INITIALIZE
+  /* Perform board initialization */
+
+  return imx8_bringup();
+#else
+  return OK;
+#endif
+}
+
+#endif /* CONFIG_BOARDCTL */
diff --git a/boards/arm64/imx8/imx8qm-mek/src/imx8_boardinit.c b/boards/arm64/imx8/imx8qm-mek/src/imx8_boardinit.c
new file mode 100644
index 0000000000..2fe7a59578
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/src/imx8_boardinit.c
@@ -0,0 +1,113 @@
+/****************************************************************************
+ * boards/arm64/imx8/imx8qm-mek/src/imx8_boardinit.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+#include <stdint.h>
+#include <nuttx/board.h>
+#include "imx8qm-mek.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: imx8_memory_initialize
+ *
+ * Description:
+ *   All i.MX8 architectures must provide the following entry point.  This
+ *   entry point is called early in the initialization before memory has
+ *   been configured.  This board-specific function is responsible for
+ *   configuring any on-board memories.
+ *
+ *   Logic in imx8_memory_initialize must be careful to avoid using any
+ *   global variables because those will be uninitialized at the time this
+ *   function is called.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   None
+ *
+ ****************************************************************************/
+
+void imx8_memory_initialize(void)
+{
+  /* SDRAM was initialized by a bootloader in the supported configurations. */
+}
+
+/****************************************************************************
+ * Name: imx8_board_initialize
+ *
+ * Description:
+ *   All i.MX8 architectures must provide the following entry point.  This
+ *   entry point is called in the initialization phase -- after
+ *   imx_memory_initialize and after all memory has been configured and
+ *   mapped but before any devices have been initialized.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   None
+ *
+ ****************************************************************************/
+
+void imx8_board_initialize(void)
+{
+#ifdef CONFIG_ARCH_LEDS
+  /* Configure on-board LEDs if LED support has been selected. */
+
+#endif
+}
+
+/****************************************************************************
+ * Name: board_late_initialize
+ *
+ * Description:
+ *   If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
+ *   initialization call will be performed in the boot-up sequence to a
+ *   function called board_late_initialize(). board_late_initialize() will be
+ *   called immediately after up_intitialize() is called and just before the
+ *   initial application is started.  This additional initialization phase
+ *   may be used, for example, to initialize board-specific device drivers.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_BOARD_LATE_INITIALIZE
+void board_late_initialize(void)
+{
+  /* Perform board initialization */
+
+  imx8_bringup();
+}
+#endif /* CONFIG_BOARD_LATE_INITIALIZE */
diff --git a/boards/arm64/imx8/imx8qm-mek/src/imx8_bringup.c b/boards/arm64/imx8/imx8qm-mek/src/imx8_bringup.c
new file mode 100644
index 0000000000..7e2b690f7a
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/src/imx8_bringup.c
@@ -0,0 +1,62 @@
+/****************************************************************************
+ * boards/arm64/imx8/imx8qm-mek/src/imx8_bringup.c
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <sys/types.h>
+#include <syslog.h>
+
+#include <nuttx/fs/fs.h>
+
+#include "imx8qm-mek.h"
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: imx_bringup
+ *
+ * Description:
+ *   Bring up board features
+ *
+ ****************************************************************************/
+
+int imx8_bringup(void)
+{
+  int ret;
+
+#ifdef CONFIG_FS_PROCFS
+  /* Mount the procfs file system */
+
+  ret = nx_mount(NULL, "/proc", "procfs", 0, NULL);
+  if (ret < 0)
+    {
+      syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret);
+    }
+#endif
+
+  UNUSED(ret);
+  return OK;
+}
diff --git a/boards/arm64/imx8/imx8qm-mek/src/imx8qm-mek.h b/boards/arm64/imx8/imx8qm-mek/src/imx8qm-mek.h
new file mode 100644
index 0000000000..3bb9bc22d5
--- /dev/null
+++ b/boards/arm64/imx8/imx8qm-mek/src/imx8qm-mek.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+ * boards/arm64/imx8/imx8qm-mek/src/imx8qm-mek.h
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM64_IMX8_IMX8QM_MEK_SRC_IMX8_IMX8QM_MEK_H__
+#define __BOARDS_ARM64_IMX8_IMX8QM_MEK_SRC_IMX8_IMX8QM_MEK_H__
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <stdint.h>
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/****************************************************************************
+ * Public Functions Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: imx8_bringup
+ *
+ * Description:
+ *   Bring up board features
+ *
+ ****************************************************************************/
+
+#if defined(CONFIG_BOARDCTL) || defined(CONFIG_BOARD_LATE_INITIALIZE)
+int imx8_bringup(void);
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* __BOARDS_ARM64_IMX8_IMX8QM_MEK_SRC_IMX8_IMX8QM_MEK_H__ */