lupyuen opened a new pull request, #15996:
URL: https://github.com/apache/nuttx/pull/15996

   ## Summary
   
   This PR adds support for the Allwinner A527 Arm64 SoC. This will be used by 
the upcoming port of NuttX for PINE64 Yuzuki Avaota-A1 SBC. And for Arm64 PR 
Test Bot.
   
   Most of the code was derived from NuttX for QEMU Arm64 Kernel Build 
`qemu-armv8a:knsh`. [The modified code is explained 
here](https://lupyuen.github.io/articles/avaota#appendix-port-nuttx-to-avaota-a1)
   
   ### Modified Files in arch/arm64
   
   `Kconfig`: Added ARCH_CHIP_A527 for A527 SoC
   
   ### New Files in arch/arm64
   
   `include/a527/chip.h`: A527 Definitions
   
   `include/a527/irq.h`: External Interrupts
   
   `src/a527/chip.h`: Memory Map
   
   `src/a527/a527_boot.c`, `a527_boot.h`: Startup Code
   
   `src/a527/a527_initialize.c`: Power Management
   
   `src/a527/a527_lowputc.S`: UART Output
   
   `src/a527/a527_serial.c`: Serial Driver
   
   `src/a527/a527_textheap.c`: Text Heap
   
   `src/a527/a527_timer.c`: A527 Timer
   
   `src/a527/Kconfig`: A527 Config
   
   `src/a527/Make.defs`, `CMakeLists.txt`: Makefiles
   
   ### Documentation
   
   `platforms/arm64/a527/index.rst`: Added A527 SoC
   
   ## Impact
   
   This PR is needed for the upcoming port of NuttX for PINE64 Yuzuki Avaota-A1 
SBC.
   
   No impact on existing code, since the source files are not used by existing 
code.
   
   ## Testing
   
   We tested the source files on PINE64 Yuzuki Avaota-A1 SBC. NuttX boots 
correctly to NSH Shell and passes OSTest:
   
   - [Board Source Code](https://github.com/lupyuen2/wip-nuttx/pull/99/files)
   - [NuttX 
Log](https://gist.github.com/lupyuen/6365762343133a843276bb87d2da17a1)
   - [Build 
Log](https://gist.github.com/lupyuen/7296022328dadcfac88a38d4b3eec892)
   - [Demo Video](https://youtu.be/XTDw245n5tM)
   
   ```text
   - Ready to Boot Primary CPU
   - Boot from EL2
   - Boot from EL1
   - Boot to C runtime for OS Initialize
   
   NuttShell (NSH) NuttX-12.4.0
   nsh> uname -a
   NuttX 12.4.0 42c0ed4a89 Mar 13 2025 09:13:56 arm64 avaota-a1
   
   nsh> ls -l /dev
   /dev:
    crw-rw-rw-           0 console
    crw-rw-rw-           0 null
    brw-rw-rw-    16777216 ram0
    crw-rw-rw-           0 ttyS0
    crw-rw-rw-           0 zero
   
   nsh> ps
     PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            
STACK    USED FILLED COMMAND
       0     0   0 FIFO     Kthread   - Ready              0000000000000000 
0008176 0000928  11.3%  Idle_Task
       1     0 192 RR       Kthread   - Waiting  Semaphore 0000000000000000 
0008112 0000992  12.2%  hpwork 0x40833568 0x408335b8
       2     0 100 RR       Kthread   - Waiting  Semaphore 0000000000000000 
0008112 0000992  12.2%  lpwork 0x408334e8 0x40833538
       4     4 100 RR       Task      - Running            0000000000000000 
0008128 0002192  26.9%  /system/bin/init
   
   nsh> free
         total       used       free    maxused    maxfree  nused  nfree name
     125542400      33880  125508520      53032  125484976     58      5 Kmem
       4194304     245760    3948544               3948544               Page
   
   nsh> hello
   Hello, World!!
   
   nsh> getprime
   Set thread priority to 10
   Set thread policy to SCHED_RR
   Start thread #0
   thread #0 started, looking for primes < 10000, doing 10 run(s)
   thread #0 finished, found 1230 primes, last one was 9973
   Done
   getprime took 162 msec
   
   nsh> ostest
   ...
   Final memory usage:
   VARIABLE  BEFORE   AFTER
   ======== ======== ========
   arena        a000    26000
   ordblks         2        4
   mxordblk     6ff8    1aff8
   uordblks     27e8     6700
   fordblks     7818    1f900
   user_main: Exiting
   ostest_main: Exiting with status 0
   nsh>
   ```
   


-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to