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>
After https://github.com/apache/nuttx/pull/15075, the size of the
stack size has decreased 8 bytes and the init stack size for the
rv-virt:citest defconfig was near its full capacity, which lead to
crashing the `ps` command. The init stack size for this defconfig
was increased from 2048 to 3072 to avoid stack overflow.
reason:
svc call may trigger hardfault
Background
The origin of this issue is our desire to eliminate the function of storing
"regs" in g_current_regs and instead utilize (*running_task)->xcp.regs for storage.
The benefits of this approach include faster storage speed and
avoiding multiple accesses to g_current_regs during context switching,
thus ensuring that whether returning from an interrupt or an exception,
we consistently use this_task()->xcp.regs
Issue Encountered
However, when storing registers, we must ensure that (running_task)->xcp.regs is invalid
so that it can be safely overwritten.
According to the existing logic, the only scenario where (running_task)->xcp.regs
is valid is during restore_context. We must accurately identify this scenario.
Initially, we used the condition (running_task)==NULL for this purpose, but we deemed
this approach unsatisfactory as it did not align well with the actual logic.
(running_task) should not be NULL. Consequently, we adopted other arch-specific methods for judgment,
but due to special logic in some arch, the judgment was not accurate, leading to this issue.
Solution:
For armv6-m, we haven't found a more suitable solution, so we are sticking with (*running_task)==NULL.
For armv7-m/armv8-m, by removing support for primask, we can achieve accurate judgment.
PRIMASK is a design in armv6-m, that's why arm introduce BASEPRI from armv7-m.
It's wrong to provide this option for armv7-m/armv8-m arch.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
The Kconfig of system/usbmsc has updated to support setting paths that bind to LUN at runtime.
More details: https://github.com/apache/nuttx-apps/pull/2876
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
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>
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>
Add an option to use HSE on the Nucleo-H563ZI with board modification. This is enabled through board Kconfig.
It supplies the same PLL output frequencies using the HSE instead of HSI, for significantly more precise clocks.
hostfs will allow developers to access the current execution directory.
nsh> ls
/:
bin/
data/
dev/
etc/
proc/
tmp/
nsh> cd /data
nsh> ls
/data:
README.md
fs/
pass1/
cmake/
arch/
Signed-off-by: chao an <anchao@lixiang.com>
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>
knsh_romfs - for QEMU and legacy serial port
knsh_romfs_pci - for bare-metal Intel hardware and PCI serial port
Steps to build kernel image with user-space apps in romfs:
$ ./tools/configure.sh qemu-intel64/knsh_romfs
$ make -j
$ make export -j
$ pushd ../apps
$ ./tools/mkimport.sh -z -x ../nuttx/nuttx-export-*.tar.gz
$ make import -j
$ ./tools/mkromfsimg.sh
$ mv boot_romfsimg.h ../nuttx/arch/x86_64/src/board/romfs_boot.c
$ popd
$ make -j
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
USB ADB is enabled - Based on esp32s3-devkit/adb
Build
./tools/configure.sh -l esp32s3-devkit:txtable
make -j16
make flash ESPTOOL_PORT=/dev/ttyACMx
Test
$ adb -s 1234 shell
nsh> cat /etc/txtable.txt
TXTABLE0
data 0x100000 0
nsh> ls -l /dev/data
frw-rw-rw- 1044480 /dev/data
nsh>
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
reason:
up_set_current_regs initially had two functions:
1: To mark the entry into an interrupt state.
2: To record the context before an interrupt/exception. If we switch to
a new task, we need to store the upcoming context regs by calling up_set_current_regs(regs).
Currently, we record the context in other ways, so the second function is obsolete.
Therefore, we need to rename up_set_current_regs to better reflect its actual meaning,
which is solely to mark an interrupt.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
board_spiflash_init() => init_storage_partition() => parse_mtd_partition()
`parse_mtd_partition()` may return value that greater than zero when succ
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
After compilation, when starting nsh, the following crash occurs.
==2500151==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
==2500151==ASan shadow was supposed to be located in the [0x1ffff000-0x3fffffff] range.
==2500151==Process memory map follows:
0x30000000-0x33dd4000 /nuttx/nuttx
To avoid overlaps, change the starting address of the text segment.
Using Ttext-segment=0x30000000 causes a crash when starting the 32-bit SIM.
Using -Ttext-segment=0x50000000 causes a crash when starting the 64-bit SIM.
Setting -Ttext-segment=0x40000000 resolves all issues perfectly.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
profile-generate is used to generate compilation feedback optimization data, not just code coverage data
It will rely on the toolchain library:
nuttx/libs/libc/misc/lib_utsname.c:94:(.text.uname+0x2c): undefined reference to `__gcov_indirect_call_profiler_v4'
arm-none-eabi-ld: nuttx/libs/libc/misc/lib_utsname.c:113:(.text.uname+0x178): undefined reference to `__gcov_indirect_call'
arm-none-eabi-ld: nuttx/libs/libc/misc/lib_utsname.c:113:(.text.uname+0x188): undefined reference to `__gcov_time_profiler_counter'
arm-none-eabi-ld: nuttx/staging/libc.a(lib_utsname.o):(.data..LPBX0+0x30): undefined reference to `__gcov_merge_time_profile'
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
The large max command line length may cause stack overflow.
Test
./tools/configure.sh lm3s6965-ek:qemu-flat
make -j16
qemu-system-arm -semihosting \
-M lm3s6965evb \
-device loader,file=nuttx.bin,addr=0x00000000 \
-netdev user,id=user0 \
-serial mon:stdio -nographic
Link: https://github.com/apache/nuttx-apps/pull/2850
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>