Skip to content

Commit

Permalink
scripts: move gen_kobject_list.py to scripts/build/gen_kobject_list.py
Browse files Browse the repository at this point in the history
Move scripts needed by the build system and not designed to be run
individually or standalone into the build subfolder.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information
nashif authored and carlescufi committed Jul 12, 2022
1 parent c36307e commit efbadbb
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -753,12 +753,12 @@ add_custom_command(
OUTPUT ${DRV_VALIDATION}
COMMAND
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/gen_kobject_list.py
${ZEPHYR_BASE}/scripts/build/gen_kobject_list.py
--validation-output ${DRV_VALIDATION}
${gen_kobject_list_include_args}
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
DEPENDS
${ZEPHYR_BASE}/scripts/gen_kobject_list.py
${ZEPHYR_BASE}/scripts/build/gen_kobject_list.py
${PARSE_SYSCALLS_TARGET}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
Expand Down Expand Up @@ -895,7 +895,7 @@ if(CONFIG_USERSPACE)
NO_COVERAGE_FLAGS "${compiler_flags_priv}"
)

set(GEN_KOBJ_LIST ${ZEPHYR_BASE}/scripts/gen_kobject_list.py)
set(GEN_KOBJ_LIST ${ZEPHYR_BASE}/scripts/build/gen_kobject_list.py)
set(PROCESS_GPERF ${ZEPHYR_BASE}/scripts/process_gperf.py)
endif()

Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ scripts/gen_image_info.py @tejlmand
/scripts/ci/ @nashif
/arch/x86/gen_gdt.py @dcpleung @nashif
/arch/x86/gen_idt.py @dcpleung @nashif
/scripts/gen_kobject_list.py @dcpleung @nashif
/scripts/build/gen_kobject_list.py @dcpleung @nashif
/scripts/gen_kobject_placeholders.py @dcpleung
/scripts/gen_syscalls.py @dcpleung @nashif
/scripts/list_boards.py @mbolivar-nordic
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,7 @@ Userspace:
- include/zephyr/syscall.h
- kernel/userspace*
- scripts/build/gen_app_partitions.py
- scripts/gen_kobject_list.py
- scripts/build/gen_kobject_list.py
- scripts/gen_syscalls.py
- scripts/process_gperf.py
- scripts/gen_relocate_app.py
Expand Down
4 changes: 2 additions & 2 deletions cmake/kobj.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ function(gen_kobj gen_dir_out)
OUTPUT ${KOBJ_TYPES} ${KOBJ_OTYPE} ${KOBJ_SIZE}
COMMAND
${PYTHON_EXECUTABLE}
${ZEPHYR_BASE}/scripts/gen_kobject_list.py
${ZEPHYR_BASE}/scripts/build/gen_kobject_list.py
--kobj-types-output ${KOBJ_TYPES}
--kobj-otype-output ${KOBJ_OTYPE}
--kobj-size-output ${KOBJ_SIZE}
${gen_kobject_list_include_args}
$<$<BOOL:${CMAKE_VERBOSE_MAKEFILE}>:--verbose>
DEPENDS
${ZEPHYR_BASE}/scripts/gen_kobject_list.py
${ZEPHYR_BASE}/scripts/build/gen_kobject_list.py
${PARSE_SYSCALLS_TARGET}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
Expand Down
2 changes: 1 addition & 1 deletion doc/build/cmake/build-postprocess-4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions doc/build/cmake/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ The following is a detailed description of the scripts used during the build pro

.. _gen_kobject_list.py:

:zephyr_file:`scripts/gen_kobject_list.py`
:zephyr_file:`scripts/build/gen_kobject_list.py`
------------------------------------------

.. include:: ../../../scripts/gen_kobject_list.py
.. include:: ../../../scripts/build/gen_kobject_list.py
:start-after: """
:end-before: """

Expand Down
4 changes: 2 additions & 2 deletions doc/kernel/usermode/kernelobjects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ for creating core kernel objects and new driver subsystems.
Creating New Core Kernel Objects
================================

* In ``scripts/gen_kobject_list.py``, add the name of the struct to the
* In ``scripts/build/gen_kobject_list.py``, add the name of the struct to the
:py:data:`kobjects` list.

Instances of the new struct should now be tracked.
Expand All @@ -253,7 +253,7 @@ Creating New Driver Subsystem Kernel Objects
All driver instances are :c:struct:`device`. They are differentiated by
what API struct they are set to.

* In ``scripts/gen_kobject_list.py``, add the name of the API struct for the
* In ``scripts/build/gen_kobject_list.py``, add the name of the API struct for the
new subsystem to the :py:data:`subsystems` list.

Driver instances of the new subsystem should now be tracked.
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/sys/kobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct z_futex_data;
* @brief Kernel Object Types
*
* This enumeration needs to be kept in sync with the lists of kernel objects
* and subsystems in scripts/gen_kobject_list.py, as well as the otype_to_str()
* and subsystems in scripts/build/gen_kobject_list.py, as well as the otype_to_str()
* function in kernel/userspace.c
*/
enum k_objects {
Expand Down
2 changes: 1 addition & 1 deletion kernel/userspace.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct perm_ctx {
};

#ifdef CONFIG_GEN_PRIV_STACKS
/* See write_gperf_table() in scripts/gen_kobject_list.py. The privilege
/* See write_gperf_table() in scripts/build/gen_kobject_list.py. The privilege
* mode stacks are allocated as an array. The base of the array is
* aligned to Z_PRIVILEGE_STACK_ALIGN, and all members must be as well.
*/
Expand Down
File renamed without changes.

0 comments on commit efbadbb

Please sign in to comment.