Commit Graph

117 Commits

Author SHA1 Message Date
guoshichao 4c01594d5b nuttx: remove the unnecessary -pipe build option
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-31 10:22:20 +08:00
Ville Juven b3e511c5a8 arm64/qemu: Add knsh target for armv8a qemu board
This adds a qemu test target for testing kernel mode with arm64
2024-08-23 10:26:34 -03:00
cuiziwei e21885b84a nuttx/boards:Uniform initialization format for init_array.
(1) Keep the `.init_array` and `.ctors` symbols and sort them according to their initialization priority.
(2) Exclude symbols ending with crtend.* and crtbegin.* to support c++
application.if we not exclude crtend.* crtbegin.* frame_dummy will be
added when enable any c++ application with global variables, this symbol
execution is problematic, removing it does not affect the application.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-19 19:48:32 +08:00
zouboan d74a612a6e zynq-mpsoc/zcu111: independent JTAG configs from normal nsh configs 2024-07-30 12:41:30 -03:00
Yanfeng Liu cde13a74b1 boards/imx93-evk: add sdimage cleanup
This adds clean of imx9-sdimage.img upon distclean so that to unblock CI
checks.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-07-25 18:42:15 +08:00
zouboan 85e8536fbe zcu111: add support for board led 2024-07-16 18:50:52 -03:00
zouboan 0510b1eeb7 boards/arm64: add initial support for Zynq Mpsoc ZCU111 Evaluation Kit 2024-07-13 20:51:39 -03:00
Eero Nurkkala 48cf91a7be arm64/imx9: ccm: add default clk init
This adds enablers for setting various clocks to some default
values. Also, this provides helpers to grant nonsecure access
to a number of clocks. Bootloader may utilize these to make
the system boot in a deterministic manner.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2024-07-09 21:14:11 -03:00
Alan Carvalho de Assis 82946d0d5f net: Enable ICMP by default if IPv4 is enabled
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-07-09 17:08:27 +08:00
xuxingliang ab693f8aee arm64/qemu: add support poweroff/reboot command
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-06-21 22:44:09 +08:00
wangming9 4422c26c78 arch/arm64: Change the ARM configuration to ARM64.Add ARM64_NEON configuration
Summary:
1. Change the ARM to ARM64
2. Add CONFIG_ARM64_NEON

Signed-off-by: wangming9 <wangming9@xiaomi.com>
2024-06-20 09:41:28 +08:00
Neale Ferguson 73b15a87dc Fix SHMODULEFLAGS so that we link dynamically correctly
* arch/risc-v/src/common/Toolchain.defs
  arch/xtensa/src/lx6/Toolchain.defs
  arch/xtensa/src/lx7/Toolchain.defs
  - Define SHMODULEFLAGS etc. for sotest/dynload
  - Add --entry=__start to SHMODULEFLAGS

* boards/arm64/qemu/qemu-armv8a/scripts/Make.defs
  boards/sim/sim/sim/scripts/Make.defs
  - Define SHMODULEFLAGS etc. for sotest/dynload
2024-06-12 23:21:16 -03:00
simbit18 fde641fac9 Fix Kconfig style
correct block name board
Remove extra TABs
Add comments
2024-05-29 17:15:57 -03:00
Yanfeng Liu bfa1799f1c arm64/imx9evk: enlarge ocram size to unblock CI
This temporary fix is just to unblock CI errors:

```
Configuration/Tool: imx93-evk/bootloader
...
aarch64-none-elf-ld: region `ocram' overflowed by 88 bytes
```

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-28 19:39:11 +08:00
Eero Nurkkala 2f753a48c7 arm64: s/ARCH_BOOT_EL3/ARCH_ARM64_EXCEPTION_LEVEL/g
Search and replace ARCH_BOOT_EL3 with more generic
ARCH_ARM64_EXCEPTION_LEVEL that holds the EL level
in an integer variable.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2024-05-21 09:02:35 +08:00
Eero Nurkkala 1d3ce6b527 arm64/imx9: provide EL3 bootloader support for iMX9
This provides a capable bootloader that may be run from OCRAM.
The OCRAM contains regions that are always zero, so the linker
file avoids those with best effort.

iMX9 infrastructure expects:
  - 0x20480000 (Start of OCRAM, AHAB)
  - 0x2049a000 (NuttX or SPL)
  - 0x204e0000 (ARM Trustzone, not used)

When started from SD-card, the offsets are:
  - 0x1f000 with AHAB
  - 0xa000  without AHAB

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2024-05-21 09:02:35 +08:00
Ville Juven 35ee532cb4 boards/imx93-evk: Fix potential warning about unused variable
"ret" might be unused, which causes an error due to -Werror
2024-05-16 17:14:25 -03:00
Stuart Ianna c4dbabb1bb drivers/devicetree: Add a set of commonly used FDT utilities. 2024-05-09 01:37:11 +08:00
Jani Paalijarvi c11ffaa78f arm64/imx9: Add DMA preflight support for uSDHC
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Jani Paalijarvi 602bd685ec arm64/imx9: Add uSDHC driver
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-08 08:48:12 +08:00
Jukka Laitinen cc9c3ed80b arch/arm64/src/imx9: Add Ethernet driver
This adds a driver for i.MX93 ENET1 MAC block

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-05-02 16:30:41 -03:00
Ville Juven 3079caf2ce arm64/imx9: Add DMA memory allocator
Add a simple allocator for DMA safe memory. It will provide contiguous
blocks of memory with D-Cache line size alignment.

NOTE: The optimal granule size is the D-Cache line size (64), but due
to restrictions in the granule allocator this would result in a maximum
block size of 2K only, thus use 256B granules instead givin 8K max block
size.

Once the granule allocator is fixed this limitation can be removed.
2024-04-30 19:46:58 +08:00
Xu Xingliang 62c2b3e1ec lvgl: update existing config to use lvgl v9
These configs are changed based on below rules.
1. always enable +CONFIG_LV_USE_NUTTX=y
2. If touchpad is used, enable +CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y
3. enable log by +CONFIG_LV_USE_LOG=y
4. If -CONFIG_LV_MEM_CUSTOM=y previously defined, replace it with +CONFIG_LV_USE_CLIB_MALLOC=y +CONFIG_LV_USE_CLIB_SPRINTF=y +CONFIG_LV_USE_CLIB_STRING=y
5. If -CONFIG_LV_PORT_USE_FBDEV=y, default config is for fbdev. If -CONFIG_LV_PORT_USE_LCDDEV=y, +CONFIG_LV_USE_NUTTX_LCD=y
6. Remove all -CONFIG_LV_TICK_CUSTOM=y -CONFIG_LV_TICK_CUSTOM_INCLUDE="port/lv_port_tick.h"
7. If -CONFIG_LV_PORT_LCDDEV_DOUBLE_BUFFER=y, replace it with CONFIG_LV_NUTTX_LCD_DOUBLE_BUFFER=y. For fbdev, double buffer is automatically detected.
8. If -CONFIG_LV_COLOR_16_SWAP=y, need to upgrade the LCD driver to support hardware byte order swap.

Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-04-29 10:06:43 +08:00
Ville Juven 0d9a3d94eb imx9_clockconfig: Add way to set PLL frequencies
This patch adds a way to configure PLL frequencies. The configuration is
given by board logic.

These values should only be modified by the bootloader, but we don't have
that yet so the flag is never activated.
2024-04-25 19:24:16 -03:00
Ville Juven 1a4f298265 arm64/imx9: Enable DMA for I2C and SPI 2024-04-24 11:52:53 +08:00
Ville Juven d73aab9f71 arm64/imx9: Add LPSPI driver
Add driver for LPSPI

Co-authored-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-18 10:58:02 -03:00
Jukka Laitinen 58f0ee6364 arch/arm64/src/imx9: Add a more capable uart driver
Add an uart driver supporting LPUART1-8, dma, flow control, tc etc.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-17 00:10:10 +08:00
Jukka Laitinen 9beb73d0f0 boards/arm64/imx9/imx93-evk/src/imx9_pwm.c: Fix initialization of TPM PWM registration
Fix typo causing TPM PWM not initializing on EVK board

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-16 10:47:35 -03:00
Ville Juven f8c5b91522 arm64/imx9: Add LPI2C driver 2024-04-16 19:14:43 +08:00
simbit18 7677f10d3f fix nxstyle
fix Relative file path does not match actual file.
2024-04-16 19:09:12 +08:00
chenrun1 48a399479c Fixed CI issues caused by moving OSPERF in https://github.com/apache/nuttx-apps/pull/2346
====================================================================================
Cmake in present: qemu-armv8a/nsh_smp
Configuration/Tool: qemu-armv8a/nsh_smp
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig

no changes added to commit (use "git add" and/or "git commit -a")

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-04-08 14:08:55 +08:00
W-M-R 0ede3fc377 kasan: Implementing global variable out of bounds detection
Extracting global variable information using scripts:
kasan_global.py:
1. Extract the global variable information provided by the -- param asan globals=1 option
2. Generate shadow regions for global variable out of bounds detection
Makefile:
1. Implement multiple links, embed the shadow area into the program, and call it by the Kasan module

Signed-off-by: W-M-R <mike_0528@163.com>
2024-04-07 23:31:13 +08:00
Jukka Laitinen 16b30ea659 boards/arm64/imx9/imx93-evk: Enable PWM from TPM3ch3 on imx93-evk pin GPIO_IO24
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-05 10:13:32 -03:00
Jukka Laitinen 0040dcf858 boards/arm64/imx9/imx93-evk/configs/nsh/defconfig: Enable USB and CDCACM
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-04 15:47:32 -03:00
Jukka Laitinen 193d490f77 boards/arm64/imx9/imx93-evk: Add PWM support utilizing flexio-pwm
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-04-04 23:17:59 +08:00
Ville Juven 3294598541 arm64/imx9: Add GPIO, IOMUX and external interrupt support
This adds memory mapped registers and drivers for digital I/O.
2024-04-04 12:12:01 +08:00
Ville Juven 738bdb95b7 arm64_head.S: Add explicit input section for __start
As __start must be placed at a precise location, a separate, explicit
input section is needed to guarantee this.

Why is this an issue ? NuttX uses --entry=__start which puts __start in
its correct location, but out-of-tree builds won't work, so it more robust
to use an explicit section for the startup code and enforce its placement
in the linker script.
2024-03-23 00:21:54 +08:00
ligd a1836de09a fdt: move fdx_xx extend APIs from boards to drivers
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-22 18:51:33 +08:00
Ville Juven f2437b7f6a arm64/imx9: Add JLinkScript for imx93-evk
This is needed, as it contains the DAP addresses.
2024-03-20 20:13:14 +08:00
Ville Juven a7713af0ef arm64/imx9: Add board for imx93-evk
Adds board definition for imx93-evk board

- Support for the Cortex-A55 core in i.MX93, support for the Cortex-M33
  core is _not_ provided
- "nsh" profile is provided, this includes a minimalistic feature set
  which boots the SoM to nsh console
- A bootloader is required, u-boot has been tested
2024-03-20 20:13:14 +08:00
ligd 27ef7576ff arm64/defconfig: improve the arm64 defconfig
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-01 21:05:00 +09:00
ligd 85bc84f5c5 arm64: remove the CONFIG_DEBUG_SCHED_INFO=y
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-03-01 21:05:00 +09:00
Masayuki Ishikawa 7c31be27e3 boards: qemu-armv8a: Add nxrecorder to defconfigs
Summary:
- This commit adds nxrecorder to netnsh/netnsh_hv/netnsh_smp/
  netnsh_smp_hv defconfigs.

Impact:
- None

Testing:
- Tested with qemu-8.2.0 on Raspi4B with USB Audio

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2024-02-05 05:54:04 -08:00
fangxinyong c479ccb8aa sched: move etc romfs mount from nsh to sched/init
Usually the startup script is placed under /etc. The contents of the etc directory
are compiled and linked with Nuttx binary in the form of romfs. After startup,
it will be  mounted by Nsh.

etc is generated by the different boards, that use genromfs and xxd tools to generate
and compile it into the Nuttx, for example: boards/arm/at32/at32f437-mini/tool/mkromfs.sh
The more common method is etc image generated from the content in the corresponding
board/arch/board/board/src/etc directory, and added by Makefile for example:
boards/sim/sim/sim/src/etc.

But in kernel/protected mode, Nuttx kernel and apps are run in different privileged/
non-privileged mode or the isolated binarys, so as that nsh should use syscall to
access Nuttx kernel by exported API. In this scenario, nsh can not mount the etc image
content, because that is generated in board and as a part of Nuttx kernel.

changes:

- move etc romfs mount from nsh to Nuttx, but keep the script to parse and execute.
- move and rename the related CONFIG, move customized nsh_romfsimg.h to etc_romfs.c
  in boards, and no need declaration for romfs_img/romfs_img_len.

This commit changes and updates all configurations in Nuttx arch/board as much as possible,
but if any missing, please refer to the following simple guide:

- rename CONFIG_NSH_ROMFSETC to CONFIG_ETC_ROMFS, and delete CONFIG_NSH_ARCHROMFS in defconfig
- rename the etc romfs mount configs, for example CONFIG_NSH_FATDEVNO to CONFIG_ETC_FATDEVNO
- move customized nsh_romfsimg.h to etc_romfs.c in board/arch/board/board/src and no need
  declaration for romfs_img/romfs_img_len.
- delete default nsh_romfsimg.h, if ROMFSETC is enabled, should generate and compile etc_romfs.c
  in board/arch/board/board/src.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2024-01-09 21:29:46 -03:00
Bowen Wang ce16288494 qemu_bringup: add tmppfs mount for qemu-armv8a
tmpfs can be used for the rpmsgfs test after the qemu rptun driver
added.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-01-04 20:06:11 -08:00
Xiang Xiao b9bd88d9d3 rptun: Select OPENMAP under RPTUN
to simplify the IPC related configuration

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-12-28 11:08:57 +08:00
xuxin19 524425573e CMake:init arm64 CMake qemu-armv8a build
this patch contains arm64 Toolchain, arch common, qemu board and arm64 libc modifications.
support using CMake to compile the qemu executable file.

```
 cmake -B build -DBOARD_CONFIG=qemu-armv8a:nsh -GNinja
 cmake --build build -t menuconfig
 cmake --build build
 qemu-system-aarch64 -cpu cortex-a53 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
```
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-12-27 07:27:17 -08:00
Masayuki Ishikawa 659c9e7f4b boards: qemu-armv8a: Add virtio-sound
Summary:
- Add virtio-sound to the following configs
  netnsh, netnsh_smp, netnsh_hv, netnsh_smp_hv

Impact:
- None

Testing:
- nxplayer works on qemu-8.2.0-rc3 (ubuntu-20.04 amd64, macOS13.6 M1/MBP)
- NOTE: raspi3b+ (ubuntu-20.04 server) has a noise issue

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-12-14 20:01:25 +08:00
Bowen Wang f01f290c3f qemu/config: enable CONFIG_DEV_SIMPLE_ADDRENV for all qemu configs
Enable CONFIG_DEV_SIMPLE_ADDRENV for all the qemu configs that used
the virtio driver to fix compile error when use the NuttX implemented
metal io read/write operations.
Becasue up_addrenv_pa_to_va() and up_addrenv_va_to_pa() are not
implemented by default.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2023-11-17 09:42:52 +01:00
dongjiuzhu1 8ad88a3fc5 qemu/arm64: implement up_textheap_align and support sotest
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-30 18:20:22 +08:00