Commit graph

179 commits

Author SHA1 Message Date
George Poulios
ddf74ae059 boards/imx93-evk: Add a flat build config with OP-TEE
Mostly for CI purposes to validate OP-TEE changes
against a flat build. It has not been runtime-tested
with any specific setup involving an actual OP-TEE.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-08-03 13:00:47 -03:00
lipengfei28
99103b79c5 boards/arm64/imx9: add imx95 support
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-07-28 09:58:02 -03:00
wangmingrong1
2d7e4f7e52 arch/arm64/fvp-v8r: enable Cmake
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-30 17:12:38 +08:00
wangmingrong1
ecd6a1db1a ci/arm64: Enhance CI inspection
1. nsh_fiq: arm64 clang makefile
2. nsh_gicv2: arm64 clang cmake

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-27 20:44:41 +08:00
wangjianyu3
5079105e17 boards: net tcp backlog is enabled by default
The configuration NET_TCPBACKLOG is enabled by default.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-26 09:32:54 -03:00
wangjianyu3
bb1cc40159 arm64/qemu: add config for fastboot tcp
Initialize configuration for fastboot TCP network device.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-19 10:10:01 +08:00
George Poulios
67c7a4018a arm64/imx9: Support & configure RGMII-ID on RTL8211F
For the RTL8211F PHY, configuration of RX/TXDLY was missing.
At least on my i.MX93 EVK, this is necessary for transmission
to work (RXDLY defaults to true on the PHY).

This commit brings support for RGMII internal delay configuration
(on or off for both directions) and enables it on the i.MX93 EVK
board. The introduced Kconfig is set to default to 'n', to avoid
breaking the functionality of other, out-of-tree boards based on
i.MX93, running the RTL8211F PHY, or to avoid introducing
unnecessary code on boards running other PHYs.

Configuration of internal delay on other PHYs is not
implemented, and results in a warning (but no error).

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-06-05 08:58:24 +02:00
George Poulios
e382e2d525 arm64/imx9: Add missing ENET1 RGMII TXC pin muxing
MUX_ENET1_TXC was missing from both the EVK board
definition and the IO muxing configuration function
of the ENET1 driver. As a result, transmission does
not work (unless the muxing is set by default in some
board? -not the case with EVK). This commit adds the
configuration and adds the definition to i.MX93 EVK.

WARN: other, out-of-tree i.MX93 boards need to define
MUX_ENET1_TXC accordingly, otherwise build will break.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-06-05 08:58:24 +02:00
George Poulios
08f41244bc boards/imx93-evk: Tidy up board.h ENET1 section
i.MX93 EVK board.h had an unmatched #endif directive
accidentally matching the top-level header file guard.
It also had a dual definition of BOARD_ENET1_PHY_LIST
with the same values. None of these issues affect the
functionality, as they ended up (almost) with equivalent
end result.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-06-05 08:58:24 +02:00
Lars Kruse
3ce85ca54e style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
George Poulios
70b595146b boards/imx93-evk: kernel build with OPTEE/SMC
Add a kernel build with OP-TEE/SMC driver enabled to
i.MX93 EVK (target imx93-evk:koptee). Since this is
derived from the 'knsh' target, it is also preconfigured
for use with AHAB boot (see
https://spsdk.readthedocs.io/en/latest/examples/ahab/imx93/imx93_ahab_uboot.html).

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-13 10:14:01 +08:00
George Poulios
7ea8b59a59 boards/imx93-evk: kernel build for AHAB boot
Add kernel build (target imx93-evk:knsh) to i.MX93 EVK.
This target is preconfigured for use with AHAB boot (see
https://spsdk.readthedocs.io/en/latest/examples/ahab/imx93/imx93_ahab_uboot.html)
as a replacement of U-Boot proper (BL33 at EL2), hence
the load address is set to 0x80200000.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-03 11:25:54 +08:00
chao an
52482219c8 libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.

CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-11 09:43:22 +08:00
anjiahao
c9a150781c arch/arm64: remove unrecognized command-line option
aarch64-none-elf-gcc: error: unrecognized command-line option '-mlong-calls'

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-04-09 23:07:29 +08:00
Lup Yuen Lee
cf6781efad boards/arm64/a527/avaota-a1: Add support for PINE64 Yuzuki Avaota-A1 SBC (Allwinner A527 SoC)
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

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-21 07:17:07 +08:00
chao an
e5388558a6 qemu/ivshmem: switch proxy/server roles
In this PR we switch proxy/server roles to set proxy as remoteproc master,
This will help us communicate with the linux kernel without making any changes
in the rpproxy_ivshmem configuration.

Build NuttX RTOS:
$ cmake -B proxy -DBOARD_CONFIG=qemu-armv8a:rpproxy_ivshmem -GNinja
$ cmake --build proxy
$ qemu-system-aarch64 -cpu cortex-a53 -nographic -machine virt,virtualization=on,gic-version=3 -kernel proxy/nuttx \
  -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,addr=0xb \
  -object memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/ivshmem0,size=4194304,share=yes

Bringup Linux Kernel:
$ qemu-system-aarch64 -M virt -cpu cortex-a57 -smp 1 -m 4G -kernel linux/arch/arm64/boot/Image -initrd busybox-1.35.0/initramfs.cpio.gz \
  -nographic -append "init=/init console=ttyAMA0" \
  -device ivshmem-plain,id=shmem0,memdev=shmmem-shmem0,addr=0xb -object \
  memory-backend-file,id=shmmem-shmem0,mem-path=/dev/shm/ivshmem0,size=4194304,share=yes

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd070]
[    0.000000] Linux version 6.14.0-rc1-00035-g998ca87a4914 (archer@archer) (aarch64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #7 SMP PREEMPT Tue Feb 11 12:19:40 CST 2025
[    0.000000] KASLR enabled
[    0.000000] random: crng init done
[    0.000000] Machine model: linux,dummy-virt
...
[    1.001209] remoteproc remoteproc0: ivshmem_rproc is available
[    1.001548] remoteproc remoteproc0: attaching to ivshmem_rproc
[    1.001721] ivshmem_rproc 0000:00:0b.0: dma declare pa=0x80000000d0 dma=0xd0 size=65536
[    1.002164] ivshmem_rproc 0000:00:0b.0: mem entry pa=0x80000100d0 dma=0x100d0, size=4128560
[    1.003605] ivshmem_rproc 0000:00:0b.0: attach entry
[    1.005573] virtio_rpmsg_bus virtio1: rpmsg host is online
[    1.005741] rproc-virtio rproc-virtio.1.auto: registered virtio1 (type 7)
[    1.005873] remoteproc remoteproc0: remote processor ivshmem_rproc is now attached
[    1.012959] virtio_rpmsg_bus virtio1: creating channel rpmsg-syslog addr 0x400
[    1.014240] virtio_rpmsg_bus virtio1: creating channel rpmsg-sensor addr 0x401
[    1.014454] virtio_rpmsg_bus virtio1: creating channel rpmsg-ping addr 0x402
[    1.014644] rpmsg_ping virtio1.rpmsg-ping.-1.1026: rpmsg_ping_probe

below is rpmsg-syslog from NuttX kernel
...
[    1.116680] [    0.000000] [ 0] [  INFO] [proxy] pci_register_rptun_ivshmem_driver: Register ivshmem driver, id=0, cpuname=server, master=0
[    1.116867] [    0.025900] [ 3] [  INFO] [proxy] pci_scan_bus: pci_scan_bus for bus 0
[    1.116987] [    0.026900] [ 3] [  INFO] [proxy] pci_scan_bus: class = 00000600, hdr_type = 00000000
[    1.117121] [    0.027100] [ 3] [  INFO] [proxy] pci_scan_bus: 00:00 [1b36:0008]
[    1.117232] [    0.027500] [ 3] [  INFO] [proxy] pci_setup_device: pbar0 set bad mask
[    1.117349] [    0.027700] [ 3] [  INFO] [proxy] pci_setup_device: pbar1 set bad mask
[    1.117460] [    0.027900] [ 3] [  INFO] [proxy] pci_setup_device: pbar2 set bad mask
[    1.117573] [    0.028100] [ 3] [  INFO] [proxy] pci_setup_device: pbar3 set bad mask
[    1.117692] [    0.028200] [ 3] [  INFO] [proxy] pci_setup_device: pbar4 set bad mask

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-12 15:41:37 +01:00
chao an
69b0cefe80 arm64/qemu-armv8a/ivshmem: add ivshmem(Inter-VM share memory) example
rpproxy_ivshmem:  Remote slave(client) proxy process.
rpserver_ivshmem: Remote master(host) server process.

Please refer to the official Qemu ivshmem documentation for more information:

https://www.qemu.org/docs/master/system/devices/ivshmem.html

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-10 15:47:05 -03:00
chao an
7e96b0d934 drivers/devicetree: fix typo FDT_PCI_PREFTCH -> FDT_PCI_PREFETCH
should be FDT_PCI_PREFETCH

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-10 15:47:05 -03:00
chao an
55f616f055 arm64/qemu/fdt: merge ioresource MEM64 to prefetchable memory
this commit with fix prefetchable memory fault on IVSHMEM

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-10 15:47:05 -03:00
chao an
fa44369e0f arm64/qemu/fdt: fix build break
nuttx/boards/arm64/qemu/qemu-armv8a/src/qemu_bringup.c: In function 'register_pci_host_from_fdt':
nuttx/boards/arm64/qemu/qemu-armv8a/src/qemu_bringup.c:138:15: error: too few arguments to function 'fdt_get_reg_base'
  138 |   cfg.start = fdt_get_reg_base(fdt, offset);
      |               ^~~~~~~~~~~~~~~~
In file included from nuttx/boards/arm64/qemu/qemu-armv8a/src/qemu_bringup.c:34:
nuttx/include/nuttx/fdt.h:253:11: note: declared here
  253 | uintptr_t fdt_get_reg_base(FAR const void *fdt, int offset, int index);
      |           ^~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-10 15:47:05 -03:00
chao an
e50b5773de arm64/qemu/fdt: remove duplicate mmio parser code
reuse fdt_virtio_mmio_devices_register() to avoid duplicate

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-10 15:47:05 -03:00
zouboan
22f2d39e21 arch/zynq-mpsoc improve the ethernet driver
1. Changes the phyadd to 0xC to speed up the training of phyadd.
2. Set RX DMA buffer size configureable.
3. Create netnsh configs as ethernet boot from QSPI FLASH.
4. Fix some typo in #15720 which is nonsynchronous with local code.
2025-02-07 20:21:18 +08:00
zouboan
d36b2f94d3 zcu111: add support for net and dp83867 phy
The PS-side Gigabit Ethernet MAC (GEM) implements a 10/100/1000 Mb/s
Ethernet interface, which connects to a TI DP83867IRPAP Ethernet
RGMII PHY before being routed to an RJ45 Ethernet connector on ZCU111
board.The RGMII Ethernet PHY is boot strapped to PHY address 5'b01100
(0x0C) and Auto Negotiation is set to Enable.This commit add Ethernet
support for ZCU111 board and TI DP83867IRPAP Ethernet RGMII PHY.
2025-02-02 14:17:45 +08:00
zouboan
1452f32b14 zynq-mpsoc: add support for pll 2025-01-27 10:13:30 +08:00
lipengfei28
82cf59bff5 arch/arm64: use UP_DSB, UP_DMB, UP_ISB as barrier standard API
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2025-01-20 20:13:07 +08:00
wangjianyu3
f3b31ef1df boards: Replace CONFIG_NSH_LINELEN with CONFIG_LINE_MAX
Details: https://github.com/apache/nuttx-apps/pull/2943

1. find boards/ -name defconfig | xargs sed -i 's/CONFIG_NSH_LINELEN/CONFIG_LINE_MAX/g'
2. ./tools/refresh.sh --silent --defaults all

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-15 00:07:58 +08:00
wangmingrong1
22d8a50a7b defconfig: Delete the redundant Kasan configuration on CI
arm/qemu-v7a:
            1. Keep arm/smp configuration, use kasan in generic mode
arm64/qemu-v8a:
            1. Keep arm/citest configuration, use kasan in generic mode
            2. Keep arm/swtags configuration, use kasan in software tag mode
sim:
            1. Keep sim/ostest, use asan
	    2. Keep sim/ostest_oneholder, use kasan in generic mode

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-01-14 00:05:39 +08:00
simbit18
aaef87e5b6 Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
2025-01-07 21:39:50 +08:00
mazhuang
60683d7495 nuttx/boards/XXX/defconfig:DEV_ZERO is not set
Signed-off-by: mazhuang <mazhuang@xiaomi.com>
2024-12-30 22:22:29 +08:00
Matteo Golin
e96fb6b118 arch/bcm2711, boards/raspberry-pi-4b: Add preliminary support for the BCM2711 and Raspberry Pi 4B.
Includes a Mini-UART NSH console for the 4B, tested on the 4GB RAM
model. Part of an I2C driver which can only read, boiler-plate for a SPI
driver, and a GPIO driver with limited pins. Some tools are present for
automatically fetching the boot files and creating the `config.txt` file
based on selected Kconfig options.
2024-12-17 16:43:17 +08:00
chao an
894b1431e3 arm64/imx9: refrash defconfig of imx93-evk
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-12 13:47:22 +08:00
zouboan
0d0638ac98 zcu111: add support for user led 2024-12-09 21:17:48 +08:00
wangmingrong1
e2729f58d4 arm64/qemu: Enable lto compilation by default
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-05 20:36:37 +08:00
wangmingrong1
79758c5150 arm64/lto: Fix link error after opening lto
CPP:  /mnt/vela/github/NX/nuttx/boards/arm64/qemu/qemu-armv8a/scripts/dramboot.ld-> /mnt/vela/github/NX/nutLD: nuttx
Please update the link script, section ['.kasan.global'] cannot be found
`.eh_frame' referenced in section `.text.frame_dummy' of /mnt/vela/github/Toolchains/arm64-gcc-13/bin/../lib/gcc/aarch64-none-elf/13.2.1/crtbegin.o: defined in discarded section `.eh_frame' of /mnt/vela/github/Toolchains/arm64-gcc-13/bin/../lib/gcc/aarch64-none-elf/13.2.1/crtbegin.o
`.eh_frame' referenced in section `.text.frame_dummy' of /mnt/vela/github/Toolchains/arm64-gcc-13/bin/../lib/gcc/aarch64-none-elf/13.2.1/crtbegin.o: defined in discarded section `.eh_frame' of /mnt/vela/github/Toolchains/arm64-gcc-13/bin/../lib/gcc/aarch64-none-elf/13.2.1/crtbegin.o
Memory region         Used Size  Region Size  %age Used

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-05 13:23:59 +08:00
wangmingrong1
95ed02ec22 arm64/qemu: Add 9pfs configuration
Convenient for qemu debugging and adding ci check
We can learn to use the following command to mount 9pfs on qemu64:

qemu-system-aarch64 -cpu max -nographic \
        -machine virt,virtualization=on,gic-version=3,mte=on \
        -fsdev local,security_model=none,id=fsdev0,path=/xxxx -device virtio-9p-device,id=fs0,fsdev=fsdev0,mount_tag=host \
        -chardev stdio,id=con,mux=on, -serial chardev:con \
        -mon chardev=con,mode=readline  -kernel ./nuttx/nutt

mkdir mnt
mount -t v9fs -o trans=virtio,tag=host mnt

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-03 18:19:09 +08:00
wangmingrong1
77d993623c boards/mte: Dependencies changed, so need to delete it now
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-03 15:45:53 +08:00
wangmingrong1
360c053eca arm64/qemu: Add arm64 mte defconfig support
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-02 11:04:11 -03:00
wangmingrong1
208f31c27f boards/qemu64: Due to dependency changes, the test program of kasantest is deleted.
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-02 19:49:22 +08:00
wangmingrong1
07493f1c8e gcov: Add gcov gcc implementation and toolchain to ci compilation
When running qemu/nsh_smp or sim/nsh configuration, run gcov -d /tmp/xxx
to save all gcov generated data and export them to the host. Use
./tools/gcov.sh to parse and generate reports. For details, see:
Documentation/applications/system/gcov/index.rst

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-28 19:35:34 +08:00
Jouni Ukkonen
74cdb53027 tools/imx9: Add norimage support to bootloader
Fetch fspi header and fcb generation script,
using mkimage generate nor bootable image.
compile bootloader using -mstrict-align

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-11-22 18:53:21 +08:00
Xiang Xiao
4c2c41f9a6 boards/arm64: Remove the unused vdk/vdk-armv8r/scripts/dramboot.ld
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-16 17:42:09 +01:00
Eero Nurkkala
f2949f84a3 arm64/imx9: add imx93-evk ddr training
This performs the DDR training for imx93-evk. In addition to the source code,
it downloads binaries which are included in the final image. The bootloader
must be ARCH_CORTEX_A53 instead of A55 due to atomic instructions that don't
work with the OCRAM / EL3 combination.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2024-11-15 09:56:31 +08:00
wangmingrong1
ec3c064ff0 arm64/nsh: Enable gprof
Let's turn off kasan to prevent gprof from running recursively. And turn on gprof to add this profile library to the CI build.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-14 13:30:05 +08:00
Jouni Ukkonen
e2a9c84260 arch/arm64/imx9: Add trdc support
Trdc is configured in EL3 bootloader
Clock pre-initialization is also executed there.
Trdc board configuration for imx93evk included

Signed-off-by: Jouni Ukkonen <jouni.ukkonen@unikie.com>
2024-11-13 16:46:04 +08:00
Alin Jerpelea
db29a2a1be boards/arm64/zynq-mpsoc: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-12 22:20:59 +08:00
Alin Jerpelea
55a1416398 boards/arm64/vdk: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-12 22:20:59 +08:00
Alin Jerpelea
5c9f11d1b1 boards/arm64/rk3399: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-12 22:20:59 +08:00
Alin Jerpelea
c92c94737e boards/arm64/qemu: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-12 22:20:59 +08:00
Alin Jerpelea
531eb5e873 boards/arm64/imx9: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-12 22:20:59 +08:00
Alin Jerpelea
ab0873948a boards/arm64/imx8: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-12 22:20:59 +08:00