When we use libmetal with other headers using stdatomic.h, we'll get
symbol conflict if we don't enable HAVE_STDATOMIC_H in libmetal. The
best solution might be using cmake to detect headers automatically, but
we can't. Fortunately we have CONFIG_HAVE_ATOMICS macro now, which can
replace HAVE_STDATOMIC_H when we're not using cmake.
Note: 2-Steps to use CONFIG_HAVE_ATOMICS
1. Include compiler.h for CONFIG_HAVE_ATOMICS definition
2. Check CONFIG_HAVE_ATOMICS instead of HAVE_STDATOMIC_H
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)
------------------
How to test
From within nuttx/. Configure:
cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja
(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja
This uses ninja generator (install with sudo apt install ninja-build). To build:
$ cmake --build build
menuconfig:
$ cmake --build build -t menuconfig
--------------------------
2. cmake/build: reformat the cmake style by cmake-format
https://github.com/cheshirekow/cmake_format
$ pip install cmakelang
$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done
Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
Patch 17:
virtio: follow virtio 1.2 spec, add more virtio status and device
Patch 18:
virtio: decoupling the transport layer and virtio device layer
1. Add virtio device api to decouple the transport layer and virtio
device layer.
2. Move the vrings info and virtqueue allocation/free to the
remoteproc transport layer;
3. Because 2, modify the rpmsg device also;
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
wget is missing from some system (like macOS and Windows native),
it's better to use curl to simplify build environment.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Make.dep file should be updated by .config changed after first make.
There are 2 cases affected for this problem:
1) Add source files by config symbol
2) Include header files in #ifdef directive
These 2 cases may not be included in Make.dep and this may prevent the
differential build from working correctly.
This port was effort of a number of people, I rather arbitrarily gave authorship to Guiding Li because he has the largest number of fundamental quashed commits from the Xiamoi repository.
Squashed commit of the following:
Author: Xiang Xiao <xiaoxiang@pinecone.net>
include/nuttx/b2c.h and libx/libc/string: Add non-standard string functions to deal with cases where there are more than 8-bits in a type char.
Author: Gregory Nutt <gnutt@nuttx.org>
Fix several build issues/missing definitiona needed for OpenAMP build in drivers/.
Add OpenAMP code has been reviewed and ran through tools/nxstyle (with all reports accounted for).
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
tools/: Fix the minor issue in Makefile
Author: Gregory Nutt <gnutt@nuttx.org>
drivers/rptun/rptun.c: Review for coding standard. Run against tools/nxstyle.
tools/LibTargets.mk: Fix some TABs that were turned into spaces by a copy-paste.
fs/hostfs: Add configure and build support for hostfs RPC.
drivers/timer: Add configure and build support for syslog RTC.
drivers/syslog: Add configure and build support for syslog RPC.
drivers/serial: Add configure and build support for serial RPC.
Kconfig, tools/*.mk. openamp/: Add basic OpenAMP build support.
drivers/rptun: Add configure and build support for OpenAMP tunnel drivers.
drivers/net: Update Make.defs and Kconfig for OpenSDA support.
Remove drivers/clk/clk-rpmsg.c drivers/power/rpmsg_regulator.c. These depend on upstreaming support for a new subsystem based on the clk/regulator is model from Linux. Removed because we want to separate the activities. We will just try to get the basic OpenAMP support in place for now.
Remove drivers/misc/misc_rpmsg.c and include/nuttx/misc/misc_rpmsg.h. These are specific to the Xiaomi application.
Author: zhuyanlin <zhuyanlin@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.
Author: Jianli Dong <dongjianli@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.
Author: Guiding Li <liguiding@pinecone.net>
This commit brings in the OpenAMP OS driver/RPC components from https://github.com/FishsemiCode/nuttx. Initial commit is source files only. Additional changes to Kconfig and Make.defs files still needed.