common/arm_assert.c:80:14: warning: format specifies type 'unsigned int' but the argument has type 'uint32_t' (aka 'unsigned long') [-Wformat]
stack, ptr[0], ptr[1], ptr[2], ptr[3],
^~~~~
include/debug.h:119:59: note: expanded from macro '_alert'
__arch_syslog(LOG_EMERG, EXTRA_FMT format EXTRA_ARG, ##__VA_ARGS__)
~~~~~~ ^~~~~~~~~~~
Signed-off-by: chao.an <anchao@xiaomi.com>
Summary:
- Cast to unsigned char for strcmp and strncmp
- strcmp and strncmp are described following by opengroup.org
The sign of a non-zero return value shall be determined by the sign
of the difference between the values of the first pair of bytes
(both interpreted as type unsigned char) that differ in the strings
being compared.
https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcmp.htmlhttps://pubs.opengroup.org/onlinepubs/9699919799/functions/strncmp.html
Impact:
- strcmp and strncmp return value
Testing:
- ostest on sabre-6quad:smp w/ qemu
Signed-off-by: Oki Minabe <minabe.oki@gmail.com>
Summary:
- Correct boardctl function's return value
- In case of BOARDIOC_TESTSET, `ret' has 0 or 1 or an error,
but `ret' is ignored except error.
Impact:
- boardctl return value except errors
Testing:
- custom Cortex-A9 board
Signed-off-by: Oki Minabe <minabe.oki@gmail.com>
Summary:
- I noticed that maix-bit:smp does not work with QEMU.
- Actually, QEMU supports sifive_u (not K210) but it works
if FPU is disabled.
- This commit fixes this issue.
Impact:
- K210 with QEMU only
Testing:
- Tested with qemu-5.2
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Selecting this option will pass "-Map=$(TOPDIR)$(DELIM)nuttx.map" to ld
when linking NuttX ELF. That file can be useful for verifying
and debugging magic section games, and for seeing which
pieces of code get eliminated with DEBUG_OPT_UNUSED_SECTIONS.
Signed-off-by: chao.an <anchao@xiaomi.com>
Enable this option to optimization the unused input sections with the
linker by compiling with " -ffunction-sections -fdata-sections ", and
linking with " --gc-sections ".
Signed-off-by: chao.an <anchao@xiaomi.com>
This keeps backwards compatibility with apps that do not provide
envp. The old implementation passes NULL always and this change fixes
any regression caused by it.
Now that the environment strings are stored as an array of strings,
they can be passed from the application via char **environ, which
is really defined as a function call to get_environ_ptr().
This works as is for flat build, but protected mode and kernel mode
require a call gate, which is added here.
If address environments are in use, it is not possible to simply
memcpy from from one process to another. The current implementation
of env_dup does precisely this and thus, it fails at once when it is
attempted between two user processes.
The solution is to use the kernel's heap as an intermediate buffer.
This is a simple, effective and common way to do a fork().
Obviously this is not needed for kernel processes.
Follow: http://glennastory.net/boot/sysinit.html
This is first script that init runs is rc.sysinit. This
script does serval initialization tasks about basic service.
The boot sequence currently provided to the board level is:
board_earlyinitialize->
board_lateinitialize(Peripherals driver, core driver, ...)->
run rcS script(mount fs, run service) ->
board_appinitialize->
After this patch:
The boot sequence currently provided to the board level is:
board_earlyinitialize->
board_lateinitialize(core driver,...)->
run rc.sysinit script(mount fs, run core service) ->
board_appinitialize(Peripherals driver)->
run rcS script(run other service)->
So, Peripheral drivers can do more with the file system and
core services.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>