Any data structure declaration tagged with __net_socket will end up
in the kernel object table with type K_OBJ_NET_SOCKET. These all
correspond to objects which are associated with socket file
descriptors and can handle the socket vtable API.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Now we can build up lists of data structures matching a list
of particular tags, with __subsystem being just one case.
Relax searches to also look inside C files, since struct
prototypes may be declared there as well.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This change extends the parse_syscalls.py script to scan for a
__subsystem sentinal added to driver api declarations. It thens
generates a list that is passed into gen_kobject_list.py to extend
the subsystems list. This allows subsystems to be declared in the
code instead of a separate python list and provides a mechanism for
defining out-of-tree subsystems.
Signed-off-by: Corey Wharton <coreyw7@fb.com>
We have several scripts used by the build system related
to generating code for system calls, privileged mode stacks,
kernel object metadata, and application shared memory
partitions. Add some overview documentation for each.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Found by "disordered --shuffle-dirents=yes".
Sorting os.walk() in scripts/subfolder_list.py removes the randomness in
the following files:
build/zephyr/misc/generated/syscalls_subdirs.txt
build/zephyr/CMakeFiles/syscall_list_h_target.dir/ or build.ninja
Sorting os.walk() in scripts/parse_syscalls.py removes the randomness
in:
build/zephyr/misc/generated/syscalls.json
build/zephyr/include/generated/syscall_dispatch.c
build/zephyr/include/generated/syscall_list.h
Note my (limited so far) testing did *not* observe any randomness in any
object file that this would address; the main purpose here is to remove
a very large amount of noise in diffoscope.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
parse_syscalls.py was doing too much and was generating
derived and partial string output information that was
completed later by gen_syscalls.py.
Now parse_syscalls.py just breaks up system call information into
non-derived data which is fully processed by gen_syscalls.py.
The goal is to ease maintenance of system call generation with
all the mechanism on what to do with system call information in
one script location rather than two of them.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Previously the syscall list was generated only from the include
folder. This is a limitation when the application tries to create
system calls. This patch create a simple way to include these
new syscalls without the application touching the kernel.
This can be enabled by a Kconfig CONFIG_APPLICATION_DEFINED_SYSCALL.
Once enabled the application source directory will be scanned to
find all application defined syscalls.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
In order to support both "/" and "\" as OS path separators,
use the correct Python os.sep helper.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit fixes
https://github.com/zephyrproject-rtos/zephyr/issues/5008.
It does so by splitting up gen_syscalls.py into two scripts with a
json metadata file to communicate syscall metadata between them. The
parsing script parses header files from include/ and writes syscall
metadata to a file if the contents changed. The generation script
reads from the json file and generates syscall code.
The build system DAG now looks like this:
always_rebuild -> json -> syscalls -> offset.o
The script for generating json will do so only if the content changes,
this ensures that the entire DAG does not always do a full rebuild.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>