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

   ## Summary
   
   This PR adds support for the PINE64 Yuzuki Avaota-A1 SBC, based on Allwinner 
A527 Arm64 SoC. 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
   
   `boards/Kconfig`: Added Avaota-A1 board
   
   ### New Files in boards/arm64/a527/avaota-a1
   
   `src/a527_appinit.c`: Startup Code
   
   `src/a527_boardinit.c`: Init Code
   
   `src/a527_bringup.c`: Bringup Code
   
   `src/a527_power.c`: Power Off and Reset
   
   `src/avaota-a1.h`: Board Declarations
   
   `include/board.h`: Board Definitions
   
   `include/board_memorymap.h`: Memory Map
   
   `scripts/ld.script`, `gnu-elf.ld`: Linker Scripts
   
   `Makefile`, `scripts/Make.defs`: Makefiles
   
   `CMakeLists.txt`, `src/CMakeLists.txt`: CMakefiles
   
   `Kconfig`: Avaota-A1 Config
   
   `configs/nsh/defconfig`: Build Config for `avaota-a1:nsh`
   
   ### Documentation
   
   `platforms/arm64/a527/index.rst`: Added Avaota-A1 to Allwinner A527 SoC
   
   `platforms/arm64/a527/boards/avaota-a1/avaota-a1.jpg`: Photo of Avaota-A1, 
taken by me
   
   `platforms/arm64/a527/boards/avaota-a1/index.rst`: Building and booting 
NuttX for Avaota-A1
   
   ## Impact
   
   This PR is needed to support NuttX on Avaota-A1 SBC.
   
   No impact on existing code, since the source files are not used by existing 
code.
   
   ## Testing
   
   We tested the NuttX Build on Avaota-A1 SBC via MicroSD:
   
   - [Build Log](https://gitlab.com/lupyuen/nuttx-build-log/-/snippets/4827064)
   
   ```bash
   tools/configure.sh avaota-a1:nsh
   make
   ## Omitted: Build Initial RAM Disk, append to NuttX Kernel with padding, 
copy to MicroSD
   ```
   
   NuttX boots correctly to NSH Shell and passes OSTest:
   
   - [NuttX 
Log](https://gitlab.com/lupyuen/nuttx-build-log/-/snippets/4827064#L778)
   - [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 03d8151e24 Mar 17 2025 16:59:32 arm64 avaota-a1
   
   nsh> free
         total       used       free    maxused    maxfree  nused  nfree name
     125538304      33864  125504440      53024  125484976     58      5 Kmem
       4194304     245760    3948544               3948544               Page
   
   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 0x40834568 0x408345b8
       2     0 100 RR       Kthread   - Waiting  Semaphore 0000000000000000 
0008112 0000992  12.2%  lpwork 0x408344e8 0x40834538
       4     4 100 RR       Task      - Running            0000000000000000 
0008128 0002080  25.5%  /system/bin/init
   
   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> 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    28000
   ordblks         2        4
   mxordblk     5ff8    1bff8
   uordblks     27e8     6700
   fordblks     7818    21900
   user_main: Exiting
   ostest_main: Exiting with status 0
   ```
   


-- 
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