You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/05/12 04:23:34 UTC

[GitHub] [incubator-nuttx] masayuki2009 opened a new pull request, #6242: rv-virt:knsh64

masayuki2009 opened a new pull request, #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242

   ## Summary
   
   - This PR consists of the following 2 commits
   - commit1: arch: risc-v: Add MMU support for qemu-rv
   - commit2: boards: rv-virt: Add knsh64 related files
   
   ## Impact
   
   - qemu-rv only
   
   ## Testing
   
   - Tested with qemu-6.2
   - Please note that mtimer is disabled for S-mode because
     the mtimer needs to be accessed in M-mode
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #6242: rv-virt:knsh64

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1408361175

   @masayuki2009 could you help?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] GooTal commented on pull request #6242: rv-virt:knsh64

Posted by "GooTal (via GitHub)" <gi...@apache.org>.
GooTal commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1409648892

   Oh thank you.
   I checked out to releases/12.0 and saw the updated readme. 
   BTW, can knsh64 run ostest? I notice that rv-virt:nsh64 got some built-in apps:
   ![图片](https://user-images.githubusercontent.com/40800103/215642956-1d2a4445-84d4-4674-9f95-eac3fd2c5cf5.png)
   
    I added these config variables in `nuttx/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig`:
   ```
   CONFIG_BUILTIN=y
   CONFIG_NSH_BUILTIN_APPS=y
   CONFIG_TESTING_OSTEST=y
   ```
   I read readme under `apps/testing/ostest` but it seems not working. Could you give me some advice?
   
   Thanks in advance.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] GooTal commented on pull request #6242: rv-virt:knsh64

Posted by "GooTal (via GitHub)" <gi...@apache.org>.
GooTal commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1409910314

   > By "added" did you run `make menuconfig` or add them by hand? `make menuconfig` is needed to insure the dependency.
   
   Oh sorry. I added them by hand. Thanks @davids5. It\`s really helpful that using menuconfig to ensure the dependency.
   
   And thanks a lot @masayuki2009 . I just noticed this in `nuttx/libs/libc/builtin/Kconfig` so that the menuconfig do not show this option.
   ```
   config BUILTIN
   	bool "Support Builtin Applications"
   	default n
   	depends on !BUILD_KERNEL
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] davids5 commented on pull request #6242: rv-virt:knsh64

Posted by "davids5 (via GitHub)" <gi...@apache.org>.
davids5 commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1409882231

   By "added" did you run `make menuconfig` or add them by hand?  `make menuconfig` is needed to insure the dependency.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #6242: rv-virt:knsh64

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1409945018

   There is a draft PR to enable ostest for kernel mode: https://github.com/apache/nuttx-apps/pull/1500. @GooTal you can try and refine it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #6242: rv-virt:knsh64

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pussuw commented on pull request #6242: rv-virt:knsh64

Posted by GitBox <gi...@apache.org>.
pussuw commented on PR #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242#issuecomment-1124555158

   > > Where are the M-mode traps directed to ?
   > 
   > @pussuw The M-mode traps are still routed to __trap_vec in qemu_rv_head.S However, I think this should be fixed later if S-mode is enabled.
   
   Ok, the SBI part of BUILD_KERNEL is still work in progress, when it is done I can fixup this too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pussuw commented on pull request #6242: rv-virt:knsh64

Posted by GitBox <gi...@apache.org>.
pussuw commented on PR #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242#issuecomment-1124549856

   Where are the M-mode traps directed to ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] masayuki2009 commented on pull request #6242: rv-virt:knsh64

Posted by "masayuki2009 (via GitHub)" <gi...@apache.org>.
masayuki2009 commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1408363469

   @GooTal 
   Please see boards/risc-v/qemu-rv/rv-virt/README.txt
   
   ```
   3.2 Configure and build NuttX for BUILD_KERNEL
   
     $ mkdir ./nuttx; cd ./nuttx
     $ git clone https://github.com/apache/nuttx.git nuttx
     $ git clone https://github.com/apache/nuttx-apps.git apps
     $ cd nuttx
     $ make distclean
     $ ./tools/configure.sh rv-virt:knsh64
     $ make V=1 -j7
     $ make export V=1
     $ cd ../apps
     $ ./tools/mkimport.sh -z -x ../nuttx/nuttx-export-*.tar.gz
     $ make import V=1
     $ cd ../nuttx
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] GooTal commented on pull request #6242: rv-virt:knsh64

Posted by "GooTal (via GitHub)" <gi...@apache.org>.
GooTal commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1411360041

   > There is a draft PR to enable ostest for kernel mode: [apache/nuttx-apps#1500](https://github.com/apache/nuttx-apps/pull/1500) from @pussuw . @GooTal you can try and refine it.
   
   Thanks for your invitation. I\`ll follow the updates during porting NuttX to LoongArch. Currently I\`m porting nsh64 and knsh64 to qemu-system-loongarch64.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pussuw commented on a diff in pull request #6242: rv-virt:knsh64

Posted by GitBox <gi...@apache.org>.
pussuw commented on code in PR #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242#discussion_r870967724


##########
arch/risc-v/src/qemu-rv/qemu_rv_timerisr.c:
##########
@@ -61,11 +61,13 @@
 
 void up_timer_initialize(void)
 {
+#ifndef CONFIG_BUILD_KERNEL

Review Comment:
   I think this is unnecessary. The mtimer driver forwards access to SBI, if CONFIG_ARCH_USE_S_MODE is defined.
   
   But this is fine also if you don't need the ticker.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] GooTal commented on pull request #6242: rv-virt:knsh64

Posted by "GooTal (via GitHub)" <gi...@apache.org>.
GooTal commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1408244997

   Hello, i tried to run rv-virt:knsh64. But it didn`t work well. Here are the commands:
   ```
   ./tools/configure.sh -l rv-virt:knsh64   # step1
   make -j8   # step2
   qemu-system-riscv64 -semihosting -M virt -cpu rv64 -smp 8 -bios none -kernel nuttx -nographic  #step3
   ```
    I didn`t got any error in step1 and step2. But the error occurred in step3 and it`s stuck here:
    
   ![图片](https://user-images.githubusercontent.com/40800103/215435897-d2274954-e376-40d9-a791-e5cbc77ab722.png)
   
   Did i use the right command for qemu-system-riscv64 to run nuttx? Or did i miss something else?
   
   Thanks a lot!
   @xiaoxiang781216 @masayuki2009 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] masayuki2009 commented on a diff in pull request #6242: rv-virt:knsh64

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on code in PR #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242#discussion_r870970202


##########
arch/risc-v/src/qemu-rv/qemu_rv_timerisr.c:
##########
@@ -61,11 +61,13 @@
 
 void up_timer_initialize(void)
 {
+#ifndef CONFIG_BUILD_KERNEL

Review Comment:
   The SBI is not integrated yet, so the mtimer is disabled.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #6242: rv-virt:knsh64

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242#issuecomment-1124553905

   >Where are the M-mode traps directed to ?
   
   @pussuw 
   The M-mode traps are still routed to __trap_vec in qemu_rv_head.S
   However, I think this should be fixed later if S-mode is enabled.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #6242: rv-virt:knsh64

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242#issuecomment-1124659433

   ```
   curl: (28) Failed to connect to www.phyplusinc.com port 80: Connection timed out
   cp: cannot stat 'libphy62xxble.a': No such file or directory
   make[1]: *** [chip/Make.defs:82: .buildlib] Error 1
   make[1]: Target 'context' not remade because of errors.
   make: *** [tools/Unix.mk:425: arch/arm/src/.context] Error 2
   make: Target 'all' not remade because of errors.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] masayuki2009 commented on pull request #6242: rv-virt:knsh64

Posted by GitBox <gi...@apache.org>.
masayuki2009 commented on PR #6242:
URL: https://github.com/apache/incubator-nuttx/pull/6242#issuecomment-1124555749

   @pussuw 
   Thanks for reviewing this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] masayuki2009 commented on pull request #6242: rv-virt:knsh64

Posted by "masayuki2009 (via GitHub)" <gi...@apache.org>.
masayuki2009 commented on PR #6242:
URL: https://github.com/apache/nuttx/pull/6242#issuecomment-1409905854

   @GooTal 
   
   >BTW, can knsh64 run ostest? I notice that rv-virt:nsh64 got some built-in apps:
   
   Currently, no. 
   Because the ostest uses some non-POISX API (i.e. task_create) which can not be used for BUILD_KERNEL.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org