Skip to content

Commit

Permalink
Map RAM Disk OK. romfs_bind: ERROR: romfs_fsconfigure failed: -22
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Jul 20, 2023
1 parent 06e27e2 commit e8fa267
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 2 additions & 0 deletions arch/risc-v/src/qemu-rv/qemu_rv_mm_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ void qemu_rv_kernel_mappings(void)
binfo("map kernel data\n");
map_region(KSRAM_START, KSRAM_START, KSRAM_SIZE, MMU_KDATA_FLAGS);

#ifdef NOTUSED
/* Added RAM Disk */
//// From nuttx/boards/risc-v/litex/arty_a7/include/board_memorymap.h
/* ramdisk (RW) */
Expand All @@ -277,6 +278,7 @@ void qemu_rv_kernel_mappings(void)
_info("map RAM Disk\n");
map_region((uintptr_t)__ramdisk_start, (uintptr_t)__ramdisk_start, (uintptr_t)__ramdisk_size, MMU_KDATA_FLAGS);
_info("map RAM Disk done\n");
#endif // NOTUSED

#ifdef CONFIG_ARCH_MMU_TYPE_SV39

Expand Down
4 changes: 4 additions & 0 deletions boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ CONFIG_DEBUG_BINFMT_INFO=y
CONFIG_DEBUG_BINFMT_WARN=y
CONFIG_DEBUG_ERROR=y
CONFIG_DEBUG_FEATURES=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ERROR=y
CONFIG_DEBUG_FS_INFO=y
CONFIG_DEBUG_FS_WARN=y
CONFIG_DEBUG_FULLOPT=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_SCHED=y
Expand Down
7 changes: 5 additions & 2 deletions boards/risc-v/qemu-rv/rv-virt/scripts/ld-kernel64.script
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ MEMORY
ksram (rwx) : ORIGIN = 0x80200000, LENGTH = 2048K /* w/ cache */
pgram (rwx) : ORIGIN = 0x80400000, LENGTH = 4096K /* w/ cache */
/* Added RAM Disk */
ramdisk (rwx) : ORIGIN = 0x84000000, LENGTH = 4096K /* w/ cache */
ramdisk (rwx) : ORIGIN = 0x80800000, LENGTH = 4096K /* w/ cache */
/* ramdisk (rwx) : ORIGIN = 0x84000000, LENGTH = 4096K */ /* w/ cache */
}

OUTPUT_ARCH("riscv")
Expand All @@ -37,10 +38,12 @@ __ksram_start = ORIGIN(ksram);
__ksram_size = LENGTH(ksram);
__ksram_end = ORIGIN(ksram) + LENGTH(ksram);

/* Added RAM Disk */
/* Page heap */

__pgheap_start = ORIGIN(pgram);
__pgheap_size = LENGTH(pgram);
__pgheap_size = LENGTH(pgram) + LENGTH(ramdisk);
/* Previously: __pgheap_size = LENGTH(pgram); */

/* Added RAM Disk */
/* Application ramdisk */
Expand Down

0 comments on commit e8fa267

Please sign in to comment.