From 651d8f608882c9cfcb385d4b2c89b624e69ebc63 Mon Sep 17 00:00:00 2001 From: dengwenqi Date: Fri, 10 Nov 2023 15:10:06 +0800 Subject: [PATCH 1/4] fix: git status/git status --ignore normalization check problem --- math/gemmlowp/.gitignore | 1 + math/kissfft/.gitignore | 1 + math/ruy/.gitignore | 1 + system/flatbuffers/.gitignore | 1 + videoutils/openh264/.gitignore | 1 + 5 files changed, 5 insertions(+) create mode 100644 math/gemmlowp/.gitignore create mode 100644 math/kissfft/.gitignore create mode 100644 math/ruy/.gitignore create mode 100644 system/flatbuffers/.gitignore create mode 100644 videoutils/openh264/.gitignore diff --git a/math/gemmlowp/.gitignore b/math/gemmlowp/.gitignore new file mode 100644 index 0000000000..72be90b84c --- /dev/null +++ b/math/gemmlowp/.gitignore @@ -0,0 +1 @@ +/gemmlowp diff --git a/math/kissfft/.gitignore b/math/kissfft/.gitignore new file mode 100644 index 0000000000..2f47d6a3a6 --- /dev/null +++ b/math/kissfft/.gitignore @@ -0,0 +1 @@ +/kissfft diff --git a/math/ruy/.gitignore b/math/ruy/.gitignore new file mode 100644 index 0000000000..8566c611d4 --- /dev/null +++ b/math/ruy/.gitignore @@ -0,0 +1 @@ +/ruy diff --git a/system/flatbuffers/.gitignore b/system/flatbuffers/.gitignore new file mode 100644 index 0000000000..266005cbb1 --- /dev/null +++ b/system/flatbuffers/.gitignore @@ -0,0 +1 @@ +/flatbuffers diff --git a/videoutils/openh264/.gitignore b/videoutils/openh264/.gitignore new file mode 100644 index 0000000000..dec5af346a --- /dev/null +++ b/videoutils/openh264/.gitignore @@ -0,0 +1 @@ +openh264 From b1e5eb2ccb770e9bb4d1f244e9c140021146797f Mon Sep 17 00:00:00 2001 From: renzhiyuan1 Date: Thu, 23 May 2024 11:44:11 +0800 Subject: [PATCH 2/4] cmake:add kissfft CMake build Signed-off-by: renzhiyuan1 --- math/kissfft/CMakeLists.txt | 74 +++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 math/kissfft/CMakeLists.txt diff --git a/math/kissfft/CMakeLists.txt b/math/kissfft/CMakeLists.txt new file mode 100644 index 0000000000..07c8e5f06f --- /dev/null +++ b/math/kissfft/CMakeLists.txt @@ -0,0 +1,74 @@ +# ############################################################################## +# apps/math/kissfft/CMakeLists.txt +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for +# additional information regarding copyright ownership. The ASF licenses this +# file to you under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# +# ############################################################################## + +if(CONFIG_MATH_KISSFFT) + + # ############################################################################ + # Config and Fetch kissfft lib + # ############################################################################ + + set(KISSFFT_DIR ${CMAKE_CURRENT_LIST_DIR}/kissfft) + + if(NOT EXISTS ${KISSFFT_DIR}) + set(KISSFFT_URL + https://github.com/mborgerding/kissfft/archive/refs/tags/v130.zip) + FetchContent_Declare( + kissfft_fetch + URL ${KISSFFT_URL} SOURCE_DIR ${KISSFFT_DIR} BINARY_DIR + ${CMAKE_BINARY_DIR}/apps/math/kissfft/kissfft + DOWNLOAD_NO_PROGRESS true + TIMEOUT 30) + + FetchContent_GetProperties(kissfft_fetch) + + if(NOT kissfft_fetch_POPULATED) + FetchContent_Populate(kissfft_fetch) + + # Apply the patch after fetching the content + execute_process( + COMMAND ${CMAKE_COMMAND} -E echo "Applying patch to kissfft" + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) + + execute_process(COMMAND patch -d ${KISSFFT_DIR} -p1 < + ${CMAKE_CURRENT_LIST_DIR}/kissfft.patch) + endif() + endif() + + # ############################################################################ + # Sources + # ############################################################################ + + set(CSRCS ${KISSFFT_DIR}/kiss_fft.c ${KISSFFT_DIR}/tools/kiss_fftr.c) + + # ############################################################################ + # Include Directory + # ############################################################################ + + set(INCDIR ${CMAKE_CURRENT_LIST_DIR}/kissfft) + + # ############################################################################ + # Library Configuration + # ############################################################################ + + nuttx_add_library(kissfft STATIC) + target_sources(kissfft PRIVATE ${CSRCS}) + target_include_directories(kissfft PUBLIC ${INCDIR}) + +endif() From 70f6910977694e5416a389c5efcc09d6873002cf Mon Sep 17 00:00:00 2001 From: renzhiyuan1 Date: Thu, 23 May 2024 11:08:17 +0800 Subject: [PATCH 3/4] cmake:add gemmlowp CMake build Signed-off-by: renzhiyuan1 --- math/gemmlowp/CMakeLists.txt | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 math/gemmlowp/CMakeLists.txt diff --git a/math/gemmlowp/CMakeLists.txt b/math/gemmlowp/CMakeLists.txt new file mode 100644 index 0000000000..acff6f1130 --- /dev/null +++ b/math/gemmlowp/CMakeLists.txt @@ -0,0 +1,46 @@ +# ############################################################################## +# apps/math/gemmlowp/CMakeLists.txt +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for +# additional information regarding copyright ownership. The ASF licenses this +# file to you under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# +# ############################################################################## + +if(CONFIG_MATH_GEMMLOWP) + + # ############################################################################ + # Config and Fetch gemmlowp lib + # ############################################################################ + + set(GEMMLOWP_DIR ${CMAKE_CURRENT_LIST_DIR}/gemmlowp) + + if(NOT EXISTS ${GEMMLOWP_DIR}) + set(GEMMLOWP_URL + https://github.com/google/gemmlowp/archive/719139ce755a0f31cbf1c37f7f98adcc7fc9f425.zip + ) + FetchContent_Declare( + gemmlowp_fetch + URL ${GEMMLOWP_URL} SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/gemmlowp + BINARY_DIR ${CMAKE_BINARY_DIR}/apps/math/gemmlowp/gemmlowp + DOWNLOAD_NO_PROGRESS true + TIMEOUT 30) + + FetchContent_GetProperties(gemmlowp_fetch) + + if(NOT gemmlowp_fetch_POPULATED) + FetchContent_Populate(gemmlowp_fetch) + endif() + endif() +endif() From 4bc0a0ed07d9639967cc543367535b5e2b5db755 Mon Sep 17 00:00:00 2001 From: renzhiyuan1 Date: Thu, 23 May 2024 11:57:22 +0800 Subject: [PATCH 4/4] cmake:add ruy CMake build Signed-off-by: renzhiyuan1 --- math/ruy/CMakeLists.txt | 60 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 math/ruy/CMakeLists.txt diff --git a/math/ruy/CMakeLists.txt b/math/ruy/CMakeLists.txt new file mode 100644 index 0000000000..94dbcf7305 --- /dev/null +++ b/math/ruy/CMakeLists.txt @@ -0,0 +1,60 @@ +# ############################################################################## +# apps/math/ruy/CMakeLists.txt +# +# Licensed to the Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with this work for +# additional information regarding copyright ownership. The ASF licenses this +# file to you under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# +# ############################################################################## + +if(CONFIG_MATH_RUY) + + # ############################################################################ + # Config and Fetch ruy lib + # ############################################################################ + + set(RUY_DIR ${CMAKE_CURRENT_LIST_DIR}/ruy) + + if(NOT EXISTS ${RUY_DIR}) + set(RUY_URL + https://github.com/google/ruy/archive/d37128311b445e758136b8602d1bbd2a755e115d.zip + ) + FetchContent_Declare( + ruy_fetch + URL ${RUY_URL} SOURCE_DIR ${RUY_DIR} BINARY_DIR + ${CMAKE_BINARY_DIR}/apps/math/ruy/ruy + DOWNLOAD_NO_PROGRESS true + TIMEOUT 30) + + FetchContent_GetProperties(ruy_fetch) + + if(NOT ruy_fetch_POPULATED) + FetchContent_Populate(ruy_fetch) + endif() + endif() + + # ############################################################################ + # Include Directory + # ############################################################################ + + set(INCDIR ${CMAKE_CURRENT_LIST_DIR}/ruy) + + # ############################################################################ + # Library Configuration + # ############################################################################ + + nuttx_add_library(ruy STATIC) + target_include_directories(ruy PUBLIC ${INCDIR}) + +endif()