Skip to content

Commit 6c7bc3c

Browse files
eren-terziogluxiaoxiang781216
authored andcommitted
apps/nxdiag: Update nxdiag app due to script place changes
Nxdiag app build scripts updated due to changes to make diagnostic tools independent from nxdiag app. Change aims that nxdiag app does not a reqirement to fetch system information.
1 parent da615bf commit 6c7bc3c

File tree

3 files changed

+4
-1089
lines changed

3 files changed

+4
-1089
lines changed

system/nxdiag/Makefile

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
include $(APPDIR)/Make.defs
2424

25-
NXTOOLSDIR = $(APPDIR)$(DELIM)tools
25+
NXTOOLSDIR = $(realpath $(TOPDIR))$(DELIM)tools
2626
NXDIAGDIR = $(APPDIR)$(DELIM)system$(DELIM)nxdiag
2727

2828
# Sysinfo application info
@@ -68,41 +68,8 @@ endif
6868
# Espressif
6969

7070
ifeq ($(CONFIG_SYSTEM_NXDIAG_ESPRESSIF),y)
71-
72-
ARCH_ESP_HALDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)chip$(DELIM)esp-hal-3rdparty
73-
74-
# If the esp-hal-3rdparty directory is not in the arch directory, then it can be
75-
# cloned to the nxdiag directory for debugging purposes.
76-
HALDIR := $(shell \
77-
if [ -f $(ARCH_ESP_HALDIR)$(DELIM).git$(DELIM)index ]; then \
78-
echo "$(ARCH_ESP_HALDIR)"; \
79-
else \
80-
echo "$(NXDIAGDIR)$(DELIM)esp-hal-3rdparty"; \
81-
fi \
82-
)
83-
84-
INFO_DEPS += espressif_prepare
85-
86-
espressif_prepare:
87-
ifeq ($(HALDIR),$(ARCH_ESP_HALDIR))
88-
@echo "Unshallowing Espressif HAL..."
89-
(cd ${HALDIR} && git fetch && git fetch --tags)
90-
endif
91-
92-
ifdef ESPTOOL_BINDIR
93-
NXDIAG_FLAGS += --espressif "$(ESPTOOL_BINDIR)" "$(HALDIR)"
94-
else
95-
NXDIAG_FLAGS += --espressif "$(TOPDIR)" "$(HALDIR)"
96-
endif
97-
98-
ifeq ($(CONFIG_SYSTEM_NXDIAG_ESPRESSIF_CHIP),y)
99-
ifneq ($(CONFIG_SYSTEM_NXDIAG_ESPRESSIF_CHIP_WO_TOOL),y)
100-
NXDIAG_FLAGS += --espressif_chip
101-
else
102-
NXDIAG_FLAGS += --espressif_chip_runtime
103-
endif
104-
endif
105-
71+
NXDIAG_FLAGS += "--target_info"
72+
PY_FLAGS += "-B"
10673
endif
10774

10875
# Common build
@@ -117,7 +84,7 @@ checkpython3:
11784
fi
11885

11986
sysinfo.h : checkpython3 $(INFO_DEPS)
120-
@python3 $(NXTOOLSDIR)$(DELIM)host_sysinfo.py $(NXDIAG_FLAGS) > sysinfo.h
87+
@python3 $(PY_FLAGS) $(NXTOOLSDIR)$(DELIM)host_info_dump.py $(NXDIAG_FLAGS) > sysinfo.h
12188
if ([ $$? -ne 0 ]); then \
12289
echo "ERROR: Failed to generate sysinfo.h"; \
12390
exit 1; \

0 commit comments

Comments
 (0)