summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-09 13:51:13 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-09 13:51:13 -0600
commite1a2eb632337a317f799f79d7761188af9c9530a (patch)
tree6b55860f69bf5e1fdb71e4d929941c4dee068a8a /nuttx/configs
parent8b285e2a1b5dab0e0f98f7ca11153409ff0e80a9 (diff)
downloadpx4-nuttx-e1a2eb632337a317f799f79d7761188af9c9530a.tar.gz
px4-nuttx-e1a2eb632337a317f799f79d7761188af9c9530a.tar.bz2
px4-nuttx-e1a2eb632337a317f799f79d7761188af9c9530a.zip
SAMA5D4-EK kernel config can now boot from a ROMFS file system
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/sama5d4-ek/Kconfig32
-rw-r--r--nuttx/configs/sama5d4-ek/README.txt121
-rwxr-xr-xnuttx/configs/sama5d4-ek/include/.gitignore1
-rw-r--r--nuttx/configs/sama5d4-ek/knsh/defconfig12
-rw-r--r--nuttx/configs/sama5d4-ek/knsh/defconfig.ROMFS999
-rw-r--r--nuttx/configs/sama5d4-ek/src/sam_bringup.c37
-rw-r--r--nuttx/configs/sama5d4-ek/src/sama5d4-ek.h7
7 files changed, 1177 insertions, 32 deletions
diff --git a/nuttx/configs/sama5d4-ek/Kconfig b/nuttx/configs/sama5d4-ek/Kconfig
index e0087c43b..acd0adfdb 100644
--- a/nuttx/configs/sama5d4-ek/Kconfig
+++ b/nuttx/configs/sama5d4-ek/Kconfig
@@ -286,6 +286,38 @@ config SAMA5D4EK_HSMCI1_MOUNT_MOUNTPOINT
endif # SAMA5D4EK_HSMCI1_MOUNT
+config SAMA5D4EK_ROMFS_MOUNT
+ bool "ROMFS boot mount"
+ default n
+ depends on FS_ROMFS
+ ---help---
+ By selecting this option, you an build mount a ROMFS file system as
+ part of the system boot operation. NOTE that the board logic
+ contains no a priori ROMFS file system. In order to use this option,
+ you must provide the file nuttx/configs/sama5d4-ek/include/boot_romfsimg.h.
+ You might use logic in the tool at apps/tools/mkromfsimg.sh to create
+ this header file.
+
+if SAMA5D4EK_ROMFS_MOUNT
+
+config SAMA5D4EK_ROMFS_ROMDISK_MINOR
+ int "ROM disk minor device number"
+ default 0
+
+config SAMA5D4EK_ROMFS_ROMDISK_DEVNAME
+ string "ROM disk block device"
+ default "/dev/ram0"
+
+config SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE
+ int "ROM disk sector size"
+ default 512
+
+config SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT
+ string "ROMFS mount point"
+ default "/bin"
+
+endif # SAMA5D4EK_ROMFS_MOUNT
+
if INPUT_MXT
config SAMA5D4EK_MXT_I2CFREQUENCY
diff --git a/nuttx/configs/sama5d4-ek/README.txt b/nuttx/configs/sama5d4-ek/README.txt
index 4b380ff04..1e760c0a2 100644
--- a/nuttx/configs/sama5d4-ek/README.txt
+++ b/nuttx/configs/sama5d4-ek/README.txt
@@ -3702,7 +3702,7 @@ Configurations
CONFIG_SAMA5_DDRCS_PGHEAP=n : Don't try to set up the page allocator
Memory Management
- CONFIG_GRAN=n : Disable the granule allocator
+ CONFIG_GRAN=n : Disable the granule allocator
CONFIG_MM_PGALLOC=n : Disable the page allocator
4. A system call interface is enabled and the ELF test programs interface with the base RTOS code system calls. This eliminates the need for symbol tables to link with the base RTOS (symbol tables are still used, however, to interface with the common C library instaniation). Relevant configuration settings:
@@ -3776,17 +3776,69 @@ Configurations
CONFIG_MM_KERNEL_HEAP=y : Enable a kernel heap
CONFIG_MM_KERNEL_HEAPSIZE=8192 : (temporary.. will change)
- 4. Board initialization is performed performed before the application
+ 4. By default, this configuration is setup to boot from an SD card.
+ Unfortunately, there some issues when using the SD card that prevent
+ this from working properly (see STATUS below). And alternative is to
+ use a built-in ROMFS file system that does not suffer from the
+ (assumed) HSMCI bug.
+
+ So why isn't this the default configuration? Because it does not
+ build out-of-the-box. You have to take special steps in the build
+ process as described below.
+
+ Assuming that you will want to reconfigure to use the ROMFS (rather than debugging HSCMI), you will need to disable all of these settings:
+
+ System Type->ATSAMA5 Peripheral Support
+ CONFIG_SAMA5_HSMCI0=n : Disable HSMCI0 support
+ CONFIG_SAMA5_XDMAC0=n : XDMAC0 is no longer needed
+
+ System Type
+ CONFIG_SAMA5_PIO_IRQ=n : PIO interrupts are no longer needed
+
+ Device Drivers -> MMC/SD Driver Support
+ CONFIG_MMCSD=n : Disable MMC/SD support
+
+ File System
+ CONFIG_FS_FAT=n : FAT file system no longer needed
+
+ Board Selection
+ CONFIG_SAMA5D4EK_HSMCI0_MOUNT=y : Don't mount HSMCI0 at boot
+
+ And then enable these features in order to use the ROMFS boot file
+ system:
+
+ File System
+ CONFIG_FS_ROMFS=y : Enable the ROMFS file system
+
+ Board Selection
+ CONFIG_SAMA5D4EK_ROMFS_MOUNT=y : Mount the ROMFS file system at boot
+ CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT="/bin"
+ CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME="/dev/ram0"
+ CONFIG_SAMA5D4EK_ROMFS_ROMDISK_MINOR=0
+ CONFIG_SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE=512
+
+ Then you will need to follow some special build instructions below
+ in order to build and install the ROMFS file system image.
+
+ UPDATE: The ROMFS configuration is pre-configured in the the
+ file nuttx/configs/sama5d4-ek/knsh/defconfig.ROMFS
+
+ 5. Board initialization is performed performed before the application
is started:
RTOS Features -> RTOS Hooks
CONFIG_BOARD_INITITIALIZE=y
- The board initialization will mount the FAT filesystem on an SD card
- inserted int the HSMCI0 slot (full size). The SAMA4D4-EK provides
- two SD memory card slots: (1) a full size SD card slot (J10), and
- (2) a microSD memory card slot (J11). The full size SD card slot
- connects via HSMCI0; the microSD connects vi HSMCI1. See the relevant
+ In the special ROMFS boot configuration, you need to do nothing
+ additional: The board initialization will mount the ROMFS file
+ system at boot time.
+
+ In the default configuration, however, the board initialization
+ will instead mount the FAT filesystem on an SD card inserted in
+ the HSMCI0 slot (full size). The SAMA4D4-EK provides two SD
+ memory card slots: (1) a full size SD card slot (J10), and (2) a
+ microSD memory card slot (J11). The full size SD card slot connects
+ via HSMCI0; the microSD connects vi HSMCI1. See the relevant
configuration settings above in the paragraph entitled "HSMCI Card
Slots" above.
@@ -3809,21 +3861,46 @@ Configurations
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_FSTYPE="vfat"
CONFIG_SAMA5D4EK_HSMCI0_MOUNT_MOUNTPOINT="/bin"
- 5. General build directions:
-
- $ cd nuttx/tools : Go to the tools sub-directory
- $ ./configure.sh sama5d4-ek/kernel : Establish this configuration
- $ cd .. : Back to the NuttX build directory
- : Edit setenv.sh to use the correct path
- $ . ./setenv.sh : Set up the PATH variable
- $ make : Build the kernel
- : This should create the nuttx ELF
- $ make export : Create the kernel export package
- : You should have a file like nuttx-export-*.zip
- $ cd apps/ : Go to the apps/ directory
- $ tools/mkimport.sh -x <zip-file> : Use the full path to nuttx-export-*.zip
- $ make import : This will build the file system
-
+ 6a. General build directions (boot from SD card):
+
+ $ cd nuttx/tools : Go to the tools sub-directory
+ $ ./configure.sh sama5d4-ek/kernel : Establish this configuration
+ $ cd .. : Back to the NuttX build directory
+ : Edit setenv.sh to use the correct path
+ $ . ./setenv.sh : Set up the PATH variable
+ $ make : Build the kerne with a dummy ROMFS image
+ : This should create the nuttx ELF
+ $ make export : Create the kernel export package
+ : You should have a file like
+ : nuttx-export-*.zip
+ $ cd apps/ : Go to the apps/ directory
+ $ tools/mkimport.sh -x <zip-file> : Use the full path to nuttx-export-*.zip
+ $ make import : This will build the file system.
+
+ You will then need to copy the files from apps/bin to an SD card to
+ create the the bootable SD card.
+
+ 6b. General build directions (boot from ROMFS image):
+
+ $ cd nuttx/tools : Go to the tools sub-directory
+ $ ./configure.sh sama5d4-ek/kernel : Establish this configuration
+ $ cd .. : Back to the NuttX build directory
+ : Edit setenv.sh to use the correct path
+ $ . ./setenv.sh : Set up the PATH variable
+ $ touch configs/sama5d4-ek/include/boot_romfsimg.h
+ $ make : Build the kernel with a dummy ROMFS image
+ : This should create the nuttx ELF
+ $ make export : Create the kernel export package
+ : You should have a file like
+ : nuttx-export-*.zip
+ $ cd apps/ : Go to the apps/ directory
+ $ tools/mkimport.sh -x <zip-file> : Use the full path to nuttx-export-*.zip
+ $ make import : This will build the file system
+ $ tools/mkromfsimg.sh : Create the real ROMFS image
+ $ mv boot_romfsimg.h ../nuttx/configs/sama5d4-ek/include/boot_romfsimg.h
+ $ cd nuttx/ : Rebuild the system with the correct
+ $ make clean_context all : ROMFS file system
+
STATUS:
2014-9-4: The kernel works up to the point where the nsh 'init'
diff --git a/nuttx/configs/sama5d4-ek/include/.gitignore b/nuttx/configs/sama5d4-ek/include/.gitignore
new file mode 100755
index 000000000..0558284d5
--- /dev/null
+++ b/nuttx/configs/sama5d4-ek/include/.gitignore
@@ -0,0 +1 @@
+/boot_romfsimg.h \ No newline at end of file
diff --git a/nuttx/configs/sama5d4-ek/knsh/defconfig b/nuttx/configs/sama5d4-ek/knsh/defconfig
index 2758f7672..6ef5c2264 100644
--- a/nuttx/configs/sama5d4-ek/knsh/defconfig
+++ b/nuttx/configs/sama5d4-ek/knsh/defconfig
@@ -180,7 +180,7 @@ CONFIG_ARCH_CHIP_ATSAMA5D44=y
# CONFIG_SAMA5_WDT is not set
CONFIG_SAMA5_RTC=y
# CONFIG_SAMA5_ICM is not set
-CONFIG_SAMA5_HSMC=y
+# CONFIG_SAMA5_HSMC is not set
# CONFIG_SAMA5_SMD is not set
# CONFIG_SAMA5_SAIC is not set
# CONFIG_SAMA5_UART0 is not set
@@ -477,13 +477,7 @@ CONFIG_DEV_RANDOM=y
# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set
# CONFIG_PWM is not set
CONFIG_ARCH_HAVE_I2CRESET=y
-CONFIG_I2C=y
-# CONFIG_I2C_SLAVE is not set
-CONFIG_I2C_TRANSFER=y
-CONFIG_I2C_WRITEREAD=y
-# CONFIG_I2C_POLLED is not set
-# CONFIG_I2C_TRACE is not set
-CONFIG_I2C_RESET=y
+# CONFIG_I2C is not set
# CONFIG_SPI is not set
# CONFIG_I2S is not set
CONFIG_RTC=y
@@ -492,7 +486,7 @@ CONFIG_RTC_DATETIME=y
# CONFIG_WATCHDOG is not set
# CONFIG_TIMER is not set
# CONFIG_ANALOG is not set
-CONFIG_AUDIO_DEVICES=y
+# CONFIG_AUDIO_DEVICES is not set
# CONFIG_VIDEO_DEVICES is not set
# CONFIG_BCH is not set
# CONFIG_INPUT is not set
diff --git a/nuttx/configs/sama5d4-ek/knsh/defconfig.ROMFS b/nuttx/configs/sama5d4-ek/knsh/defconfig.ROMFS
new file mode 100644
index 000000000..8642df347
--- /dev/null
+++ b/nuttx/configs/sama5d4-ek/knsh/defconfig.ROMFS
@@ -0,0 +1,999 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
+#
+
+#
+# Build Setup
+#
+CONFIG_EXPERIMENTAL=y
+# CONFIG_DEFAULT_SMALL is not set
+# CONFIG_HOST_LINUX is not set
+# CONFIG_HOST_OSX is not set
+CONFIG_HOST_WINDOWS=y
+# CONFIG_HOST_OTHER is not set
+# CONFIG_WINDOWS_NATIVE is not set
+CONFIG_WINDOWS_CYGWIN=y
+# CONFIG_WINDOWS_MSYS is not set
+# CONFIG_WINDOWS_OTHER is not set
+
+#
+# Build Configuration
+#
+# CONFIG_APPS_DIR="../apps"
+# CONFIG_BUILD_FLAT is not set
+CONFIG_BUILD_KERNEL=y
+
+#
+# Binary Output Formats
+#
+# CONFIG_RRLOAD_BINARY is not set
+CONFIG_INTELHEX_BINARY=y
+# CONFIG_MOTOROLA_SREC is not set
+CONFIG_RAW_BINARY=y
+# CONFIG_UBOOT_UIMAGE is not set
+
+#
+# Customize Header Files
+#
+# CONFIG_ARCH_STDINT_H is not set
+# CONFIG_ARCH_STDBOOL_H is not set
+# CONFIG_ARCH_MATH_H is not set
+# CONFIG_ARCH_FLOAT_H is not set
+# CONFIG_ARCH_STDARG_H is not set
+
+#
+# Debug Options
+#
+# CONFIG_DEBUG is not set
+CONFIG_ARCH_HAVE_STACKCHECK=y
+# CONFIG_ARCH_HAVE_HEAPCHECK is not set
+# CONFIG_DEBUG_SYMBOLS is not set
+CONFIG_ARCH_HAVE_CUSTOMOPT=y
+# CONFIG_DEBUG_NOOPT is not set
+# CONFIG_DEBUG_CUSTOMOPT is not set
+CONFIG_DEBUG_FULLOPT=y
+
+#
+# System Type
+#
+CONFIG_ARCH_ARM=y
+# CONFIG_ARCH_AVR is not set
+# CONFIG_ARCH_HC is not set
+# CONFIG_ARCH_MIPS is not set
+# CONFIG_ARCH_RGMP is not set
+# CONFIG_ARCH_SH is not set
+# CONFIG_ARCH_SIM is not set
+# CONFIG_ARCH_X86 is not set
+# CONFIG_ARCH_Z16 is not set
+# CONFIG_ARCH_Z80 is not set
+CONFIG_ARCH="arm"
+
+#
+# ARM Options
+#
+# CONFIG_ARCH_CHIP_A1X is not set
+# CONFIG_ARCH_CHIP_C5471 is not set
+# CONFIG_ARCH_CHIP_CALYPSO is not set
+# CONFIG_ARCH_CHIP_DM320 is not set
+# CONFIG_ARCH_CHIP_IMX is not set
+# CONFIG_ARCH_CHIP_KINETIS is not set
+# CONFIG_ARCH_CHIP_KL is not set
+# CONFIG_ARCH_CHIP_LM is not set
+# CONFIG_ARCH_CHIP_TIVA is not set
+# CONFIG_ARCH_CHIP_LPC17XX is not set
+# CONFIG_ARCH_CHIP_LPC214X is not set
+# CONFIG_ARCH_CHIP_LPC2378 is not set
+# CONFIG_ARCH_CHIP_LPC31XX is not set
+# CONFIG_ARCH_CHIP_LPC43XX is not set
+# CONFIG_ARCH_CHIP_NUC1XX is not set
+CONFIG_ARCH_CHIP_SAMA5=y
+# CONFIG_ARCH_CHIP_SAMD is not set
+# CONFIG_ARCH_CHIP_SAM34 is not set
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+# CONFIG_ARCH_ARM7TDMI is not set
+# CONFIG_ARCH_ARM926EJS is not set
+# CONFIG_ARCH_ARM920T is not set
+# CONFIG_ARCH_CORTEXM0 is not set
+# CONFIG_ARCH_CORTEXM3 is not set
+# CONFIG_ARCH_CORTEXM4 is not set
+CONFIG_ARCH_CORTEXA5=y
+# CONFIG_ARCH_CORTEXA8 is not set
+CONFIG_ARCH_FAMILY="armv7-a"
+CONFIG_ARCH_CHIP="sama5"
+CONFIG_ARCH_HAVE_FPU=y
+CONFIG_ARCH_FPU=y
+CONFIG_ARCH_HAVE_LOWVECTORS=y
+CONFIG_ARCH_LOWVECTORS=y
+# CONFIG_ARCH_ROMPGTABLE is not set
+
+#
+# ARMv7-A Configuration Options
+#
+CONFIG_ARMV7A_HAVE_L2CC=y
+CONFIG_ARMV7A_HAVE_L2CC_PL310=y
+
+#
+# L2 Cache Configuration
+#
+# CONFIG_ARMV7A_L2CC_PL310 is not set
+# CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set
+CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW=y
+# CONFIG_ARMV7A_TOOLCHAIN_DEVKITARM is not set
+# CONFIG_ARMV7A_TOOLCHAIN_GNU_EABIL is not set
+# CONFIG_ARMV7A_TOOLCHAIN_GNU_EABIW is not set
+# CONFIG_ARMV7A_TOOLCHAIN_GNU_OABI is not set
+# CONFIG_ARMV7A_DECODEFIQ is not set
+
+#
+# SAMA5 Configuration Options
+#
+CONFIG_SAMA5_HAVE_AESB=y
+CONFIG_SAMA5_HAVE_ICM=y
+CONFIG_SAMA5_HAVE_UART0=y
+CONFIG_SAMA5_HAVE_UART1=y
+CONFIG_SAMA5_HAVE_USART4=y
+# CONFIG_SAMA5_HAVE_CAN0 is not set
+# CONFIG_SAMA5_HAVE_CAN1 is not set
+# CONFIG_SAMA5_HAVE_DMA is not set
+CONFIG_SAMA5_HAVE_DDR32=y
+CONFIG_SAMA5_HAVE_XDMA=y
+CONFIG_SAMA5_HAVE_LCDC=y
+# CONFIG_SAMA5_HAVE_GMAC is not set
+# CONFIG_SAMA5_HAVE_EMACA is not set
+CONFIG_SAMA5_HAVE_EMACB=y
+CONFIG_SAMA5_HAVE_EMAC1=y
+# CONFIG_SAMA5_HAVE_HSMCI2 is not set
+CONFIG_SAMA5_HAVE_SAIC=y
+CONFIG_SAMA5_HAVE_SBM=y
+CONFIG_SAMA5_HAVE_SFC=y
+CONFIG_SAMA5_HAVE_SPI2=y
+# CONFIG_SAMA5_HAVE_TC is not set
+CONFIG_SAMA5_HAVE_TC1=y
+CONFIG_SAMA5_HAVE_TC2=y
+CONFIG_SAMA5_HAVE_TRUSTZONE=y
+CONFIG_SAMA5_HAVE_TWI3=y
+CONFIG_SAMA5_HAVE_VDEC=y
+# CONFIG_ARCH_CHIP_SAMA5D3 is not set
+CONFIG_ARCH_CHIP_SAMA5D4=y
+# CONFIG_ARCH_CHIP_ATSAMA5D31 is not set
+# CONFIG_ARCH_CHIP_ATSAMA5D33 is not set
+# CONFIG_ARCH_CHIP_ATSAMA5D34 is not set
+# CONFIG_ARCH_CHIP_ATSAMA5D35 is not set
+# CONFIG_ARCH_CHIP_ATSAMA5D36 is not set
+# CONFIG_ARCH_CHIP_ATSAMA5D41 is not set
+# CONFIG_ARCH_CHIP_ATSAMA5D42 is not set
+# CONFIG_ARCH_CHIP_ATSAMA5D43 is not set
+CONFIG_ARCH_CHIP_ATSAMA5D44=y
+
+#
+# SAMA5 Peripheral Support
+#
+# CONFIG_SAMA5_AES is not set
+# CONFIG_SAMA5_TDES is not set
+# CONFIG_SAMA5_AESB is not set
+# CONFIG_SAMA5_DBGU is not set
+# CONFIG_SAMA5_PIT is not set
+# CONFIG_SAMA5_WDT is not set
+CONFIG_SAMA5_RTC=y
+# CONFIG_SAMA5_ICM is not set
+# CONFIG_SAMA5_HSMC is not set
+# CONFIG_SAMA5_SMD is not set
+# CONFIG_SAMA5_SAIC is not set
+# CONFIG_SAMA5_UART0 is not set
+# CONFIG_SAMA5_UART1 is not set
+# CONFIG_SAMA5_USART0 is not set
+# CONFIG_SAMA5_USART1 is not set
+# CONFIG_SAMA5_USART2 is not set
+CONFIG_SAMA5_USART3=y
+CONFIG_SAMA5_USART4=y
+# CONFIG_SAMA5_TWI0 is not set
+# CONFIG_SAMA5_TWI1 is not set
+# CONFIG_SAMA5_TWI2 is not set
+# CONFIG_SAMA5_TWI3 is not set
+# CONFIG_SAMA5_HSMCI0 is not set
+# CONFIG_SAMA5_HSMCI1 is not set
+# CONFIG_SAMA5_SBM is not set
+# CONFIG_SAMA5_SFC is not set
+# CONFIG_SAMA5_SPI0 is not set
+# CONFIG_SAMA5_SPI1 is not set
+# CONFIG_SAMA5_SPI2 is not set
+# CONFIG_SAMA5_TC0 is not set
+# CONFIG_SAMA5_TC1 is not set
+# CONFIG_SAMA5_TC2 is not set
+# CONFIG_SAMA5_PWM is not set
+# CONFIG_SAMA5_ADC is not set
+# CONFIG_SAMA5_XDMAC0 is not set
+# CONFIG_SAMA5_XDMAC1 is not set
+# CONFIG_SAMA5_UHPHS is not set
+# CONFIG_SAMA5_UDPHS is not set
+# CONFIG_SAMA5_EMACB is not set
+# CONFIG_SAMA5_EMAC0 is not set
+# CONFIG_SAMA5_EMAC1 is not set
+# CONFIG_SAMA5_LCDC is not set
+# CONFIG_SAMA5_ISI is not set
+# CONFIG_SAMA5_SHA is not set
+CONFIG_SAMA5_TRNG=y
+# CONFIG_SAMA5_ARM is not set
+# CONFIG_SAMA5_FUSE is not set
+# CONFIG_SAMA5_MPDDRC is not set
+# CONFIG_SAMA5_VDEC is not set
+# CONFIG_SAMA5_SECURE is not set
+# CONFIG_SAMA5_PIO_IRQ is not set
+
+#
+# External Memory Configuration
+#
+# CONFIG_SAMA5_HAVE_NAND is not set
+# CONFIG_SAMA5_HAVE_PMECC is not set
+# CONFIG_SAMA5_BOOT_ISRAM is not set
+CONFIG_SAMA5_BOOT_SDRAM=y
+
+#
+# Heap Configuration
+#
+CONFIG_SAMA5_ISRAM_HEAP=y
+CONFIG_SAMA5_DDRCS_RESERVE=y
+CONFIG_SAMA5_DDRCS_HEAP_END=0x28000000
+CONFIG_SAMA5_DDRCS_PGHEAP=y
+CONFIG_SAMA5_DDRCS_PGHEAP_OFFSET=0x08000000
+CONFIG_SAMA5_DDRCS_PGHEAP_SIZE=134217728
+
+#
+# Architecture Options
+#
+# CONFIG_ARCH_NOINTC is not set
+# CONFIG_ARCH_VECNOTIRQ is not set
+# CONFIG_ARCH_DMA is not set
+CONFIG_ARCH_HAVE_IRQPRIO=y
+# CONFIG_ARCH_L2CACHE is not set
+CONFIG_ARCH_HAVE_COHERENT_DCACHE=y
+CONFIG_ARCH_HAVE_ADDRENV=y
+CONFIG_ARCH_NEED_ADDRENV_MAPPING=y
+CONFIG_ARCH_HAVE_VFORK=y
+CONFIG_ARCH_HAVE_MMU=y
+# CONFIG_ARCH_HAVE_MPU is not set
+CONFIG_ARCH_NAND_HWECC=y
+# CONFIG_ARCH_HAVE_EXTCLK is not set
+CONFIG_ARCH_USE_MMU=y
+CONFIG_ARCH_ADDRENV=y
+CONFIG_ARCH_TEXT_VBASE=0x80000000
+CONFIG_ARCH_DATA_VBASE=0x80100000
+CONFIG_ARCH_HEAP_VBASE=0x80200000
+CONFIG_ARCH_STACK_VBASE=0x80300000
+CONFIG_ARCH_TEXT_NPAGES=256
+CONFIG_ARCH_DATA_NPAGES=256
+CONFIG_ARCH_HEAP_NPAGES=256
+CONFIG_ARCH_STACK_NPAGES=256
+# CONFIG_PAGING is not set
+# CONFIG_ARCH_IRQPRIO is not set
+CONFIG_ARCH_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
+# CONFIG_ARCH_IDLE_CUSTOM is not set
+# CONFIG_ARCH_HAVE_RAMFUNCS is not set
+# CONFIG_ARCH_HAVE_RAMVECTORS is not set
+
+#
+# Board Settings
+#
+CONFIG_BOARD_LOOPSPERMSEC=65775
+# CONFIG_ARCH_CALIBRATION is not set
+
+#
+# Interrupt options
+#
+CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
+CONFIG_ARCH_INTERRUPTSTACK=2048
+# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set
+
+#
+# Boot options
+#
+# CONFIG_BOOT_RUNFROMEXTSRAM is not set
+# CONFIG_BOOT_RUNFROMFLASH is not set
+# CONFIG_BOOT_RUNFROMISRAM is not set
+CONFIG_BOOT_RUNFROMSDRAM=y
+# CONFIG_BOOT_COPYTORAM is not set
+
+#
+# Boot Memory Configuration
+#
+CONFIG_RAM_START=0x20000000
+CONFIG_RAM_VSTART=0x20000000
+CONFIG_RAM_SIZE=268435456
+# CONFIG_ARCH_HAVE_SDRAM is not set
+
+#
+# Board Selection
+#
+CONFIG_ARCH_BOARD_SAMA5D4_EK=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="sama5d4-ek"
+
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+CONFIG_ARCH_HAVE_BUTTONS=y
+CONFIG_ARCH_BUTTONS=y
+CONFIG_ARCH_HAVE_IRQBUTTONS=y
+CONFIG_ARCH_IRQBUTTONS=y
+CONFIG_NSH_MMCSDMINOR=0
+
+#
+# Board-Specific Options
+#
+CONFIG_SAMA5D4_MB_REVC=y
+# CONFIG_SAMA5D4EK_384MHZ is not set
+# CONFIG_SAMA5D4EK_396MHZ is not set
+CONFIG_SAMA5D4EK_528MHZ=y
+CONFIG_SAMA5D4EK_DRAM_BOOT=y
+CONFIG_SAMA5D4EK_ROMFS_MOUNT=y
+CONFIG_SAMA5D4EK_ROMFS_ROMDISK_MINOR=0
+CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME="/dev/ram0"
+CONFIG_SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE=512
+CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT="/bin"
+# CONFIG_SAMA5D4EK_SLOWCLOCK is not set
+
+#
+# RTOS Features
+#
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_ENVIRON is not set
+
+#
+# Clocks and Timers
+#
+CONFIG_ARCH_HAVE_TICKLESS=y
+# CONFIG_SCHED_TICKLESS is not set
+CONFIG_USEC_PER_TICK=10000
+# CONFIG_SYSTEM_TIME64 is not set
+# CONFIG_CLOCK_MONOTONIC is not set
+# CONFIG_JULIAN_TIME is not set
+CONFIG_MAX_WDOGPARMS=2
+CONFIG_PREALLOC_WDOGS=32
+CONFIG_WDOG_INTRESERVE=4
+CONFIG_PREALLOC_TIMERS=4
+
+#
+# Tasks and Scheduling
+#
+CONFIG_INIT_FILEPATH=y
+CONFIG_USER_INITPATH="/bin/init"
+CONFIG_RR_INTERVAL=200
+CONFIG_TASK_NAME_SIZE=32
+CONFIG_MAX_TASK_ARGS=4
+CONFIG_MAX_TASKS=16
+CONFIG_SCHED_HAVE_PARENT=y
+# CONFIG_SCHED_CHILD_STATUS is not set
+CONFIG_SCHED_WAITPID=y
+
+#
+# Pthread Options
+#
+# CONFIG_MUTEX_TYPES is not set
+CONFIG_NPTHREAD_KEYS=4
+
+#
+# Performance Monitoring
+#
+# CONFIG_SCHED_CPULOAD is not set
+# CONFIG_SCHED_INSTRUMENTATION is not set
+
+#
+# Files and I/O
+#
+CONFIG_DEV_CONSOLE=y
+# CONFIG_FDCLONE_DISABLE is not set
+# CONFIG_FDCLONE_STDIO is not set
+# CONFIG_SDCLONE_DISABLE is not set
+CONFIG_NFILE_DESCRIPTORS=8
+CONFIG_NFILE_STREAMS=8
+CONFIG_NAME_MAX=32
+# CONFIG_PRIORITY_INHERITANCE is not set
+
+#
+# RTOS hooks
+#
+CONFIG_BOARD_INITIALIZE=y
+CONFIG_BOARD_INITTHREAD=y
+CONFIG_BOARD_INITTHREAD_STACKSIZE=2048
+CONFIG_BOARD_INITTHREAD_PRIORITY=240
+# CONFIG_SCHED_STARTHOOK is not set
+# CONFIG_SCHED_ATEXIT is not set
+CONFIG_SCHED_ONEXIT=y
+CONFIG_SCHED_ONEXIT_MAX=2
+
+#
+# Signal Numbers
+#
+CONFIG_SIG_SIGUSR1=1
+CONFIG_SIG_SIGUSR2=2
+CONFIG_SIG_SIGALARM=3
+CONFIG_SIG_SIGCHLD=4
+CONFIG_SIG_SIGCONDTIMEDOUT=16
+CONFIG_SIG_SIGWORK=17
+
+#
+# POSIX Message Queue Options
+#
+CONFIG_PREALLOC_MQ_MSGS=4
+CONFIG_MQ_MAXMSGSIZE=32
+
+#
+# Stack and heap information
+#
+CONFIG_IDLETHREAD_STACKSIZE=1024
+CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=2048
+CONFIG_LIB_SYSCALL=y
+CONFIG_SYS_RESERVED=5
+CONFIG_SYS_NNEST=2
+
+#
+# Device Drivers
+#
+# CONFIG_DISABLE_POLL is not set
+CONFIG_DEV_NULL=y
+CONFIG_DEV_ZERO=y
+CONFIG_ARCH_HAVE_RNG=y
+CONFIG_DEV_RANDOM=y
+# CONFIG_LOOP is not set
+
+#
+# Buffering
+#
+# CONFIG_DRVR_WRITEBUFFER is not set
+# CONFIG_DRVR_READAHEAD is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set
+# CONFIG_PWM is not set
+CONFIG_ARCH_HAVE_I2CRESET=y
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_I2S is not set
+CONFIG_RTC=y
+CONFIG_RTC_DATETIME=y
+# CONFIG_RTC_ALARM is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_TIMER is not set
+# CONFIG_ANALOG is not set
+# CONFIG_AUDIO_DEVICES is not set
+# CONFIG_VIDEO_DEVICES is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+# CONFIG_MMCSD is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+# CONFIG_ARCH_HAVE_UART is not set
+# CONFIG_ARCH_HAVE_UART0 is not set
+# CONFIG_ARCH_HAVE_UART1 is not set
+# CONFIG_ARCH_HAVE_UART2 is not set
+# CONFIG_ARCH_HAVE_UART3 is not set
+# CONFIG_ARCH_HAVE_UART4 is not set
+# CONFIG_ARCH_HAVE_UART5 is not set
+# CONFIG_ARCH_HAVE_UART6 is not set
+# CONFIG_ARCH_HAVE_UART7 is not set
+# CONFIG_ARCH_HAVE_UART8 is not set
+# CONFIG_ARCH_HAVE_SCI0 is not set
+# CONFIG_ARCH_HAVE_SCI1 is not set
+# CONFIG_ARCH_HAVE_USART0 is not set
+# CONFIG_ARCH_HAVE_USART1 is not set
+# CONFIG_ARCH_HAVE_USART2 is not set
+CONFIG_ARCH_HAVE_USART3=y
+CONFIG_ARCH_HAVE_USART4=y
+# CONFIG_ARCH_HAVE_USART5 is not set
+# CONFIG_ARCH_HAVE_USART6 is not set
+# CONFIG_ARCH_HAVE_USART7 is not set
+# CONFIG_ARCH_HAVE_USART8 is not set
+
+#
+# USART Configuration
+#
+CONFIG_USART3_ISUART=y
+CONFIG_USART4_ISUART=y
+CONFIG_MCU_SERIAL=y
+CONFIG_STANDARD_SERIAL=y
+CONFIG_SERIAL_NPOLLWAITERS=2
+CONFIG_USART3_SERIAL_CONSOLE=y
+# CONFIG_USART4_SERIAL_CONSOLE is not set
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# USART3 Configuration
+#
+CONFIG_USART3_RXBUFSIZE=256
+CONFIG_USART3_TXBUFSIZE=256
+CONFIG_USART3_BAUD=115200
+CONFIG_USART3_BITS=8
+CONFIG_USART3_PARITY=0
+CONFIG_USART3_2STOP=0
+# CONFIG_USART3_IFLOWCONTROL is not set
+# CONFIG_USART3_OFLOWCONTROL is not set
+
+#
+# USART4 Configuration
+#
+CONFIG_USART4_RXBUFSIZE=256
+CONFIG_USART4_TXBUFSIZE=256
+CONFIG_USART4_BAUD=115200
+CONFIG_USART4_BITS=8
+CONFIG_USART4_PARITY=0
+CONFIG_USART4_2STOP=0
+# CONFIG_USART4_IFLOWCONTROL is not set
+# CONFIG_USART4_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
+# CONFIG_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+# CONFIG_ARCH_HAVE_NET is not set
+# CONFIG_ARCH_HAVE_PHY is not set
+# CONFIG_NET is not set
+
+#
+# Crypto API
+#
+# CONFIG_CRYPTO is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
+#
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_FS_AUTOMOUNTER is not set
+# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
+CONFIG_FS_READABLE=y
+# CONFIG_FS_WRITABLE is not set
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_FS_FAT is not set
+# CONFIG_FS_NXFFS is not set
+CONFIG_FS_ROMFS=y
+# CONFIG_FS_SMARTFS is not set
+# CONFIG_FS_BINFS is not set
+# CONFIG_FS_PROCFS is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG_ENABLE is not set
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_NX is not set
+
+#
+# Memory Management
+#
+CONFIG_MM_KERNEL_HEAP=y
+CONFIG_MM_KERNEL_HEAPSIZE=8192
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_ARCH_HAVE_HEAP2 is not set
+CONFIG_GRAN=y
+CONFIG_GRAN_SINGLE=y
+# CONFIG_GRAN_INTR is not set
+CONFIG_MM_PGALLOC=y
+CONFIG_MM_PGSIZE=4096
+
+#
+# Audio Support
+#
+# CONFIG_AUDIO is not set
+
+#
+# Binary Formats
+#
+# CONFIG_BINFMT_DISABLE is not set
+# CONFIG_BINFMT_EXEPATH is not set
+# CONFIG_NXFLAT is not set
+CONFIG_ELF=y
+CONFIG_ELF_ALIGN_LOG2=2
+CONFIG_ELF_STACKSIZE=2048
+CONFIG_ELF_BUFFERSIZE=128
+CONFIG_ELF_BUFFERINCR=32
+CONFIG_BUILTIN=y
+# CONFIG_PIC is not set
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+
+#
+# Library Routines
+#
+
+#
+# Standard C Library Options
+#
+CONFIG_STDIO_BUFFER_SIZE=64
+CONFIG_STDIO_LINEBUFFER=y
+CONFIG_NUNGET_CHARS=2
+CONFIG_LIB_HOMEDIR="/"
+# CONFIG_LIBM is not set
+# CONFIG_NOPRINTF_FIELDWIDTH is not set
+# CONFIG_LIBC_FLOATINGPOINT is not set
+CONFIG_LIB_RAND_ORDER=1
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_EXECFUNCS is not set
+CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
+CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+# CONFIG_LIBC_LOCALTIME is not set
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Non-standard Library Support
+#
+CONFIG_SCHED_WORKQUEUE=y
+CONFIG_SCHED_HPWORK=y
+CONFIG_SCHED_WORKPRIORITY=192
+CONFIG_SCHED_WORKPERIOD=50000
+CONFIG_SCHED_WORKSTACKSIZE=2048
+# CONFIG_SCHED_LPWORK is not set
+# CONFIG_LIB_KBDCODEC is not set
+# CONFIG_LIB_SLCDCODEC is not set
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+# CONFIG_CXX_NEWLONG is not set
+
+#
+# uClibc++ Standard C++ Library
+#
+# CONFIG_UCLIBCXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+CONFIG_BUILTIN_PROXY_STACKSIZE=1024
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CONFIGDATA is not set
+# CONFIG_EXAMPLES_CPUHOG is not set
+# CONFIG_EXAMPLES_CXXTEST is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+CONFIG_EXAMPLES_HELLO=y
+CONFIG_EXAMPLES_HELLO_PROGNAME="hello"
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_NRF24L01TERM is not set
+CONFIG_EXAMPLES_NSH=y
+CONFIG_EXAMPLES_NSH_PROGNAME="init"
+# CONFIG_EXAMPLES_NSH_CXXINITIALIZE is not set
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_POSIXSPAWN is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RANDOM is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERIALBLASTER is not set
+# CONFIG_EXAMPLES_SERIALRX is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_SLCD is not set
+# CONFIG_EXAMPLES_SMART is not set
+# CONFIG_EXAMPLES_TCPECHO is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_WEBSERVER is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_TIFF is not set
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_NETLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# FreeModBus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+CONFIG_NSH_LIBRARY=y
+
+#
+# Command Line Configuration
+#
+CONFIG_NSH_READLINE=y
+# CONFIG_NSH_CLE is not set
+CONFIG_NSH_LINELEN=80
+# CONFIG_NSH_DISABLE_SEMICOLON is not set
+# CONFIG_NSH_CMDPARMS is not set
+CONFIG_NSH_MAXARGUMENTS=6
+CONFIG_NSH_ARGCAT=y
+CONFIG_NSH_NESTDEPTH=3
+# CONFIG_NSH_DISABLEBG is not set
+# CONFIG_NSH_BUILTIN_APPS is not set
+
+#
+# Disable Individual commands
+#
+# CONFIG_NSH_DISABLE_ADDROUTE is not set
+# CONFIG_NSH_DISABLE_CAT is not set
+# CONFIG_NSH_DISABLE_CD is not set
+# CONFIG_NSH_DISABLE_CP is not set
+# CONFIG_NSH_DISABLE_CMP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_DF is not set
+# CONFIG_NSH_DISABLE_DELROUTE is not set
+# CONFIG_NSH_DISABLE_ECHO is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_FREE is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HELP is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_KILL is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_LS is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKDIR is not set
+# CONFIG_NSH_DISABLE_MKFIFO is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_MH is not set
+# CONFIG_NSH_DISABLE_MOUNT is not set
+# CONFIG_NSH_DISABLE_MW is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_PWD is not set
+# CONFIG_NSH_DISABLE_RM is not set
+# CONFIG_NSH_DISABLE_RMDIR is not set
+# CONFIG_NSH_DISABLE_SET is not set
+# CONFIG_NSH_DISABLE_SH is not set
+# CONFIG_NSH_DISABLE_SLEEP is not set
+# CONFIG_NSH_DISABLE_TEST is not set
+# CONFIG_NSH_DISABLE_UMOUNT is not set
+# CONFIG_NSH_DISABLE_UNSET is not set
+# CONFIG_NSH_DISABLE_USLEEP is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+
+#
+# Configure Command Options
+#
+CONFIG_NSH_CMDOPT_DF_H=y
+CONFIG_NSH_CODECS_BUFSIZE=128
+CONFIG_NSH_CMDOPT_HEXDUMP=y
+CONFIG_NSH_FILEIOSIZE=1024
+
+#
+# Scripting Support
+#
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLE_ITEF is not set
+# CONFIG_NSH_DISABLE_LOOPS is not set
+# CONFIG_NSH_ROMFSETC is not set
+
+#
+# Console Configuration
+#
+CONFIG_NSH_CONSOLE=y
+# CONFIG_NSH_ALTCONDEV is not set
+# CONFIG_NSH_ARCHINIT is not set
+
+#
+# NxWidgets/NxWM
+#
+
+#
+# Platform-specific Support
+#
+# CONFIG_PLATFORM_CONFIGDATA is not set
+
+#
+# System Libraries and NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# EMACS-like Command Line Editor
+#
+# CONFIG_SYSTEM_CLE is not set
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# FLASH Erase-all Command
+#
+
+#
+# Intel HEX to binary conversion
+#
+# CONFIG_SYSTEM_HEX2BIN is not set
+
+#
+# I2C tool
+#
+
+#
+# INI File Parser
+#
+# CONFIG_SYSTEM_INIFILE is not set
+
+#
+# NxPlayer media player library / command Line
+#
+# CONFIG_SYSTEM_NXPLAYER is not set
+
+#
+# RAM test
+#
+# CONFIG_SYSTEM_RAMTEST is not set
+
+#
+# readline()
+#
+CONFIG_SYSTEM_READLINE=y
+CONFIG_READLINE_ECHO=y
+
+#
+# P-Code Support
+#
+
+#
+# PHY Tool
+#
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sudoku
+#
+# CONFIG_SYSTEM_SUDOKU is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
+
+#
+# VI Work-Alike Editor
+#
+# CONFIG_SYSTEM_VI is not set
+
+#
+# Stack Monitor
+#
+
+#
+# USB CDC/ACM Device Commands
+#
+
+#
+# USB Composite Device Commands
+#
+
+#
+# USB Mass Storage Device Commands
+#
+
+#
+# USB Monitor
+#
+
+#
+# Zmodem Commands
+#
+# CONFIG_SYSTEM_ZMODEM is not set
diff --git a/nuttx/configs/sama5d4-ek/src/sam_bringup.c b/nuttx/configs/sama5d4-ek/src/sam_bringup.c
index d94cebcfc..f4782bd8c 100644
--- a/nuttx/configs/sama5d4-ek/src/sam_bringup.c
+++ b/nuttx/configs/sama5d4-ek/src/sam_bringup.c
@@ -50,14 +50,23 @@
# include <apps/usbmonitor.h>
#endif
+#include <nuttx/fs/ramdisk.h>
#include <nuttx/binfmt/elf.h>
#include "sama5d4-ek.h"
+#ifdef HAVE_ROMFS
+# include <arch/board/boot_romfsimg.h>
+#endif
+
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
+#define NSECTORS(n) \
+ (((n)+CONFIG_SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE-1) / \
+ CONFIG_SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE)
+
/* Debug ********************************************************************/
#ifdef CONFIG_BOARD_INITIALIZE
@@ -86,7 +95,7 @@ int sam_bringup(void)
{
#if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_HSMCI) || \
defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) || defined(HAVE_WM8904) || \
- defined(HAVE_AUTOMOUNTER) || defined(HAVE_ELF)
+ defined(HAVE_AUTOMOUNTER) || defined(HAVE_ELF) || defined(HAVE_ROMFS)
int ret;
#endif
@@ -178,6 +187,32 @@ int sam_bringup(void)
sam_automount_initialize();
#endif
+#ifdef HAVE_ROMFS
+ /* Create a ROM disk for the /etc filesystem */
+
+ ret = romdisk_register(CONFIG_SAMA5D4EK_ROMFS_ROMDISK_MINOR, romfs_img,
+ NSECTORS(romfs_img_len),
+ CONFIG_SAMA5D4EK_ROMFS_ROMDISK_SECTSIZE);
+ if (ret < 0)
+ {
+ message("ERROR: romdisk_register failed: %d\n", -ret);
+ }
+ else
+ {
+ /* Mount the file system */
+
+ ret = mount(CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
+ CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT,
+ "romfs", MS_RDONLY, NULL);
+ if (ret < 0)
+ {
+ message("ERROR: mount(%s,%s,romfs) failed: %d\n",
+ CONFIG_SAMA5D4EK_ROMFS_ROMDISK_DEVNAME,
+ CONFIG_SAMA5D4EK_ROMFS_MOUNT_MOUNTPOINT, errno);
+ }
+ }
+#endif
+
#ifdef HAVE_USBHOST
/* Initialize USB host operation. sam_usbhost_initialize() starts a thread
* will monitor for USB connection and disconnection events.
diff --git a/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h b/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h
index dbcc0987f..7f316d13e 100644
--- a/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h
+++ b/nuttx/configs/sama5d4-ek/src/sama5d4-ek.h
@@ -69,6 +69,7 @@
#define HAVE_AUDIO_NULL 1
#define HAVE_PMIC 1
#define HAVE_ELF 1
+#define HAVE_ROMFS 1
/* HSMCI */
/* Can't support MMC/SD if the card interface(s) are not enable */
@@ -462,6 +463,12 @@
# undef HAVE_ELF
#endif
+/* ROMFS */
+
+#ifndef CONFIG_FS_ROMFS
+# undef HAVE_ROMFS
+#endif
+
/* LEDs *****************************************************************************/
/* There are 3 LEDs on the SAMA5D4-EK:
*