You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "lupyuen (via GitHub)" <gi...@apache.org> on 2025/03/17 09:05:59 UTC
[PR] boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC) [nuttx]
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC) [nuttx]
Posted by "lupyuen (via GitHub)" <gi...@apache.org>.
lupyuen commented on PR #16001:
URL: https://github.com/apache/nuttx/pull/16001#issuecomment-2728683450
@nuttxpr test avaota-a1: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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC) [nuttx]
Posted by "hartmannathan (via GitHub)" <gi...@apache.org>.
hartmannathan commented on code in PR #16001:
URL: https://github.com/apache/nuttx/pull/16001#discussion_r2006483186
##########
boards/arm64/a527/avaota-a1/Kconfig:
##########
Review Comment:
Should this file contain at least the header (minimum boilerplate?)
```
#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
```
(As a side note, I wonder whether Kconfig files should have the Apache standard license header, but that's a job for another pull request. :-)
--
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
Re: [PR] boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC) [nuttx]
Posted by "lupyuen (via GitHub)" <gi...@apache.org>.
lupyuen merged PR #16001:
URL: https://github.com/apache/nuttx/pull/16001
--
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
Re: [PR] boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC) [nuttx]
Posted by "nuttxpr (via GitHub)" <gi...@apache.org>.
nuttxpr commented on PR #16001:
URL: https://github.com/apache/nuttx/pull/16001#issuecomment-2728699505
[**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+15779&type=issues)
Build and Test Successful (avaota-a1:nsh)
https://gitlab.com/lupyuen/nuttx-build-log/-/snippets/4827074
```text
$ git clone https://github.com/lupyuen2/wip-nuttx nuttx --branch avaota-board
$ git clone https://github.com/apache/nuttx-apps apps --branch master
$ pushd nuttx
$ git reset --hard HEAD
HEAD is now at 03d8151e24 boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC)
$ popd
$ pushd apps
$ git reset --hard HEAD
HEAD is now at 0639a2ad7 boot/nxboot: enhance bootloader capabilities and decision logic
$ popd
NuttX Source: https://github.com/apache/nuttx/tree/03d8151e24bc27caa9d04f2d9c43a51deac25e40
NuttX Apps: https://github.com/apache/nuttx-apps/tree/0639a2ad7ba473463923ce377b0227763bf051f9
$ cd nuttx
$ tools/configure.sh avaota-a1:nsh
$ make -j
$ make -j export
$ pushd ../apps
$ ./tools/mkimport.sh -z -x ../nuttx/nuttx-export-12.4.0.tar.gz
$ make -j import
$ popd
$ genromfs -f initrd -d ../apps/bin -V NuttXBootVol
$ head -c 65536 /dev/zero
$ cat nuttx.bin /tmp/nuttx.pad initrd
$ scp Image thinkcentre:/tmp/Image
$ ssh thinkcentre sudo /home/user/copy-image.sh
$ sd-mux-ctrl --device-serial=sd-wire_02-09 --ts
$ mkdir -p /tmp/sda1
$ mount /dev/sda1 /tmp/sda1
$ cp /tmp/Image /tmp/sda1/
$ rm /tmp/Image
$ umount /tmp/sda1
$ sd-mux-ctrl --device-serial=sd-wire_02-09 --dut
$ cd /home/luppy/nuttx-build-farm
$ ssh thinkcentre
nsh> uname -a
NuttX 12.4.0 03d8151e24 Mar 17 2025 17:08:35 arm64 avaota-a1
nsh> ostest
======== ======== ========
arena a000 28000
ordblks 2 4
mxordblk 5ff8 1bff8
uordblks 27e8 6700
fordblks 7818 21900
user_main: Exiting
ostest_main: Exiting with status 0Now running https://github.com/lupyuen/nuttx-build-farm/blob/main/avaota-power.sh off
----- Power off Avaota-A1
[]
```
--
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
Re: [PR] boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC) [nuttx]
Posted by "lupyuen (via GitHub)" <gi...@apache.org>.
lupyuen commented on PR #16001:
URL: https://github.com/apache/nuttx/pull/16001#issuecomment-2735069199
Sorry @cederom: I need your help to review my PR, so that we can roll out PR Test Bot for Arm64. Thanks :-)
--
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
Re: [PR] boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC) [nuttx]
Posted by "lupyuen (via GitHub)" <gi...@apache.org>.
lupyuen commented on code in PR #16001:
URL: https://github.com/apache/nuttx/pull/16001#discussion_r2006609574
##########
boards/arm64/a527/avaota-a1/Kconfig:
##########
Review Comment:
@hartmannathan Yeah we might need to standardise the Kconfig Header (and license) across Arm and RISC-V. Arm32 and Arm64 use the Kconfig Header:
https://github.com/apache/nuttx/blob/28180b49d1e42230e27b8b43ea7b621d2d0c772b/boards/arm64/qemu/qemu-armv8a/Kconfig#L1-L7
But RISC-V uses Empty Kconfigs without Headers:
https://github.com/apache/nuttx/blob/master/boards/risc-v/qemu-rv/rv-virt/Kconfig
--
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