casaroli commented on code in PR #3977:
URL: https://github.com/apache/nuttx-apps/pull/3977#discussion_r4501775249


##########
wireless/bluetooth/zblue/Makefile:
##########
@@ -0,0 +1,208 @@
+############################################################################
+# apps/wireless/bluetooth/zblue/Makefile
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+# 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.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+ZBLUE_DIR = $(APPDIR)/wireless/bluetooth/zblue
+
+# Zephyr source, downloaded from the release tag
+
+ZEPHYR_REF := $(patsubst "%",%,$(strip $(CONFIG_ZBLUE_REF)))
+ZEPHYR_URL ?= https://github.com/zephyrproject-rtos/zephyr/archive
+ZEPHYR_TAR = zephyr-$(ZEPHYR_REF).tar.gz
+ZEPHYR_UNPACK = zephyr
+ZEPHYR = $(ZBLUE_DIR)/$(ZEPHYR_UNPACK)
+
+# Only the parts of the tree used by the Bluetooth host are unpacked
+
+ZEPHYR_PATHS = LICENSE Kconfig.constants include lib/net_buf lib/utils \
+               lib/uuid modules/mbedtls scripts/kconfig subsys/bluetooth \
+               subsys/crc subsys/logging subsys/settings
+
+$(ZEPHYR_TAR):
+       @echo "Downloading: $(ZEPHYR_URL)/$(ZEPHYR_REF).tar.gz"
+       $(Q) curl -L $(ZEPHYR_URL)/$(ZEPHYR_REF).tar.gz -o $(ZEPHYR_TAR)

Review Comment:
   The archive is selected by a tag and used without a checksum, and the build 
then runs Python code from it (`tools/zkconfig.py` loads the kconfiglib of the 
downloaded tree).
   Fix: add `ZBLUE_SHA256` for the default tag, check it with `sha256sum` here 
and with `EXPECTED_HASH SHA256=` in the `file(DOWNLOAD)` of CMakeLists.txt.



##########
wireless/bluetooth/zblue/Kconfig:
##########
@@ -0,0 +1,81 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+menuconfig ZBLUE
+       bool "zblue: Zephyr Bluetooth host"
+       default n
+       depends on ARCH_SIM

Review Comment:
   The host build needs the ELF `__start_`/`__stop_` section symbols, and nuttx 
#21479 excludes `sim:zblue` on Darwin for this reason, but this option can be 
selected on a macOS or Windows simulator.
   Fix: add `depends on HOST_LINUX`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to