Commit graph

79 commits

Author SHA1 Message Date
Lingao Meng
302422ad9d everywhere: replace double words
import os
import re

common_words = set([
    'about', 'after', 'all', 'also', 'an', 'and',
     'any', 'are', 'as', 'at',
    'be', 'because', 'but', 'by', 'can', 'come',
    'could', 'day', 'do', 'even',
    'first', 'for', 'get', 'give', 'go', 'has',
    'have', 'he', 'her',
    'him', 'his', 'how', 'I', 'in', 'into', 'it',
    'its', 'just',
    'know', 'like', 'look', 'make', 'man', 'many',
    'me', 'more', 'my', 'new',
    'no', 'not', 'now', 'of', 'one', 'only', 'or',
    'other', 'our', 'out',
    'over', 'people', 'say', 'see', 'she', 'so',
    'some', 'take', 'tell', 'than',
    'their', 'them', 'then', 'there', 'these',
    'they', 'think',
    'this', 'time', 'two', 'up', 'use', 'very',
    'want', 'was', 'way',
    'we', 'well', 'what', 'when', 'which', 'who',
    'will', 'with', 'would',
    'year', 'you', 'your'
])

valid_extensions = set([
    'c', 'h', 'yaml', 'cmake', 'conf', 'txt', 'overlay',
    'rst', 'dtsi',
    'Kconfig', 'dts', 'defconfig', 'yml', 'ld', 'sh', 'py',
    'soc', 'cfg'
])

def filter_repeated_words(text):
    # Split the text into lines
    lines = text.split('\n')

    # Combine lines into a single string with unique separator
    combined_text = '/*sep*/'.join(lines)

    # Replace repeated words within a line
    def replace_within_line(match):
        return match.group(1)

    # Regex for matching repeated words within a line
    within_line_pattern =
	re.compile(r'\b(' +
		'|'.join(map(re.escape, common_words)) +
		r')\b\s+\b\1\b')
    combined_text = within_line_pattern.
		sub(replace_within_line, combined_text)

    # Replace repeated words across line boundaries
    def replace_across_lines(match):
        return match.group(1) + match.group(2)

    # Regex for matching repeated words across line boundaries
    across_lines_pattern = re.
		compile(r'\b(' + '|'.join(
			map(re.escape, common_words)) +
			r')\b(\s*[*\/\n\s]*)\b\1\b')
    combined_text = across_lines_pattern.
		sub(replace_across_lines, combined_text)

    # Split the text back into lines
    filtered_text = combined_text.split('/*sep*/')

    return '\n'.join(filtered_text)

def process_file(file_path):
    with open(file_path, 'r', encoding='utf-8') as file:
        text = file.read()

    new_text = filter_repeated_words(text)

    with open(file_path, 'w', encoding='utf-8') as file:
        file.write(new_text)

def process_directory(directory_path):
    for root, dirs, files in os.walk(directory_path):
        dirs[:] = [d for d in dirs if not d.startswith('.')]
        for file in files:
            # Filter out hidden files
            if file.startswith('.'):
                continue
            file_extension = file.split('.')[-1]
            if
	file_extension in valid_extensions:  # 只处理指定后缀的文件
                file_path = os.path.join(root, file)
                print(f"Processed file: {file_path}")
                process_file(file_path)

directory_to_process = "/home/mi/works/github/zephyrproject/zephyr"
process_directory(directory_to_process)

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2024-06-25 06:05:35 -04:00
Pisit Sawangvonganan
f51c8ee739 doc: releases: fix typo
Utilize a code spell-checking tool to scan for and correct spelling errors
in all files within the doc/releases directory.

The typo in the 'Issue Related Items' section will be left unchanged.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-01-25 18:14:31 -05:00
Herman Berget
12ae3e373d doc: release-notes: Document Bluetooth EATT API change
A field was added to the `bt_gatt_<operation>_params` structs when
`CONFIG_BT_EATT` is enabled. This changes the experimental API for EATT.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-08-19 11:59:52 +02:00
Michal Narajowski
fab8e29ee2 Bluetooth: Mesh: Add model publish support to Health Client
Mesh Profile Specification errata 11310
Section 4.4.4.1
"This model shall support model publication, as defined in Section
4.2.2 of the Mesh Profile specification and model subscription,
as defined in section 4.2.3 of the Mesh Profile specification."

Signed-off-by: Michal Narajowski <michal.narajowski@codecoup.pl>
2022-08-01 18:04:42 +01:00
Connor Graydon
70cca36acc doc: release: Fix typo in release-notes-3.1.rst
Fix a spelling typo and grammar in release-notes-3.1.rst

Signed-off-by: Connor Graydon <connor.graydon@intel.com>
2022-06-09 11:34:48 +02:00
Seppo Takalo
e0296ca0b9 net: lwm2m: Allow initializing opaque and string data to zero length
By default, any string or opaque data that LwM2M engine initializes
sets data lenght to same value as given buffer length for that
resource.

However, on run time, engine keeps track how much data is written
to each resource, so when reading from any resource, should only
return data that has been written there. But uninitialized resources
return the content of the whole buffer.

Fixed the problem by introducing macros INIT_OBJ_RES_LEN(),
INIT_OBJ_RES_MULTI_DATA_LEN() and INIT_OBJ_RES_DATA_LEN() that
allows you to give the amount of data existing in buffer when
the resource is initialized. This sets the data_len and max_data_len
variables correctly.

Also introduced new functions lwm2m_engine_get_res_buf() and
lwm2m_engine_set_res_buf() that distinct between data size and
buffer size. Deprecated the previous functions
lwm2m_engine_get_res_data() and lwm2m_engine_set_res_data()

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2022-06-09 11:30:37 +02:00
Connor Graydon
d84989a718 doc: release: Fix a couple more typos in release doc
Fixing a couple more typos in release-notes-3.1.rst

Signed-off-by: Connor Graydon <connor.graydon@intel.com>
2022-06-08 18:48:38 -04:00
Dominik Ermel
078fb60b11 doc/release-notes: Add note on new Kconfig option for mcumgr
The commit adds note on addition of
CONFIG_IMG_MGMT_USE_HEAP_FOR_FLASH_IMG_CONTEXT.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-06-06 12:05:29 +02:00
Martí Bolívar
e27565e34d doc: release: 3.1.0 notes are no longer a working draft
Remove that from the title.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
3ba2078761 doc: release: manually curate list_issues.py output
Apply suggestions from Dan Kalowsky to clean up extraneous issues
included in the script's output.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
d0db31abe1 doc: releases: unify disjoint issue related sections for v3.1.0
There are three lists of issues in the release notes:

- security vulnerabilities which received CVEs
- other open bugs
- resolved issues

(Here, "issue" is a strictly more general term than "bug": every bug
is an issue, not every issue is a bug. This is GitHub-specific
jargon.)

The current structure is awkward. Clean it up by unifying the
lists under a single top level section and cleaning up the distinction
between issues and bugs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
f9d8165d3d doc: releases: unite disjoint bluetooth sections for v3.1.0
For some reason, there are two different sections covering bluetooth.
This is clearly incorrect; fix it by moving the content into a single
section.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
aea7696e6a doc: releases: fix location of "new APIs" content for v3.1.0
This needs to be in the "API changes" section, instead of in a
"Bluetooth" section where it currently is.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
5889b5ba86 doc: releases: fixes for v3.1.0
Make a pass through the file, trying to fix as many issues as possible
with how the notes are written. This includes fixes for tense and
invalid .rst role usage, as well as removal of any sections which have
missing content.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
ce091d30d0 doc: releases: known issues for v3.1.0
Every release notes page includes a section for known issues.

In previous releases, we have linked to a GitHub query which displays
open issues. The problem with this approach is that the information
immediately goes stale, making this section's content less than useful.

We can do better now that we have a bug snapshot workflow and a script
capable of dumping snapshot contents in the same almost-rst-format
used by list_issues.py.

Use it as follows to archive the known open bugs at time of release:

$ wget https://builds.zephyrproject.io/zephyr/bug-snapshot/zephyr-bugs-2022-06-03.pickle.xz
$ unxz zephyr-bugs-2022-06-03.pickle.xz
$ ./scripts/dump_bugs_pickle.py zephyr-bugs-2022-06-03.pickle

Then copy paste the output into the release notes and handle .rst
escapes in the same way has previously been done for closed issues
since the last release.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Martí Bolívar
3c9e977347 doc: releases: resolved issues for v3.1.0
Follow along with the release checklist (#43286) like this:

$ ./scripts/release/list_issues.py -o zephyrproject-rtos -r zephyr -s
2022-02-22 -f issues.txt

Then copy issues.txt into the right place in the doc, and clean up the
resulting .rst errors by properly escaping and converting the markdown
format used in github issue titles.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 19:19:25 -05:00
Andrzej Głąbek
1491ab181b doc: release-notes-3.1: Add entry about dt_nodelabel_has_compat
Add information about redefined Kconfig preprocessor function
dt_nodelabel_has_compat.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-03 13:48:49 -07:00
Andrzej Głąbek
e7163cde62 doc: release-notes-3.1: Add more entries in ADC and PWM driver sections
Add information about new ADC facilities and about significant changes
in nRF PWM drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-03 13:48:49 -07:00
Martí Bolívar
5c6aaf709c doc: release: build and infrastructure for v3.1
Two significant highlights are the build system internals revamp and
the new Zephyr SDK.

Fixes: #46221

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 09:24:51 -07:00
Johann Fischer
f2e2bbd864 doc: release-notes-3.1: add release notes for USB
Add release notes for USB.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2022-06-03 16:23:46 +02:00
Krzysztof Chruscinski
540d26a010 release_notes: Add section about Logging and Shell
Update release_notes section for logging and shell.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-03 15:11:42 +02:00
Krzysztof Chruscinski
605822d775 release_notes: Update section about Counter driver
Add information about changes in counter driver.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-03 15:11:42 +02:00
Krzysztof Chruscinski
2b01713f81 release_notes: Add section about utilities
Add information about UTIL_LISTIFY deprecation.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-06-03 15:11:42 +02:00
Andrzej Głąbek
a5265c56b2 doc: releases: Add GPIO and I2S release notes for v3.1
Add release notes related to GPIO and I2S drivers.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-06-03 14:58:06 +02:00
Carles Cufi
2464bfe40d doc: relnotes: Add timer relnotes
Just a couple of mentions to relevant changes.

Closes #46222.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-03 14:57:39 +02:00
Carles Cufi
5fd8a59c72 doc: relnotes: Add SPI release notes
Not much activity, but a few changes to remark on the relnotes.

Closes #46218.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-03 14:57:39 +02:00
Stephanos Ioannidis
bc1b800a85 doc: release-notes: Add documentation release notes for 3.1
This commit adds the documentation release notes for the Zephyr 3.1
release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-06-03 12:17:11 +02:00
Robert Lubos
a1c2ecd2ae doc: release: 3.1: Add release notes for Ethernet
Add Ethernet release notes based on commit history.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-06-03 11:30:10 +02:00
Stephanos Ioannidis
16a482be55 doc: release-notes: Add ARM AArch32 release notes for 3.1
This commit adds the ARM AArch32 architecture release notes for the
Zephyr 3.1 release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-06-03 11:29:34 +02:00
Martí Bolívar
0854773129 doc: release: devicetree notes for v3.1
Some significant highlights include:

- new pinctrl and reset controller bindings
- enhanced ADC and PWM bindings
- zephyr-specific generation of MPU regions from devicetree
- new DT CAN API
- enhanced support for conversion from strings in the DTS
  to tokens in C
- many, many enhancements to existing bindings

Many thanks to everyone who contributed these great changes!

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 10:31:53 +02:00
Martí Bolívar
2dc1b071ae doc: release: split DT into its own section
By popular demand, create a separate devicetree section, splitting it
apart from the "build/infrastructure" section.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2022-06-03 10:31:53 +02:00
Henrik Brix Andersen
e2ad6cfdc7 doc: releases: 3.1: remove empty EEPROM section
Remove the empty EEPROM section. There are user-facing changes to the
EEPROM drivers/API for this release.

Fixes: #46213

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2022-06-03 09:32:09 +02:00
Yonatan Schachter
dfb0db9bfc Release notes: Added RPi Pico to v3.1.0 release notes
Add new features added to the Raspberry Pi Pico series to
the v3.1.0 release notes.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2022-06-03 09:31:19 +02:00
Stephanos Ioannidis
baa63bf83b doc: release-notes: Add C library release notes for 3.1
This commit adds the C library release notes for the Zephyr 3.1
release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-06-03 09:30:53 +02:00
Stephanos Ioannidis
77d9395f23 doc: release-notes: Add C++ subsystem release notes for 3.1
This commit adds the C++ subsystem release notes for the Zephyr 3.1
release.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-06-03 09:30:53 +02:00
Tom Burdick
fe9854c072 doc: release: Add i2c release notes for v3.1.0
Added comments about enhancements, drivers, and significant bug fixes.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-06-02 21:46:07 -07:00
Carlo Caione
b780a5f152 doc: release notes V3.1.0: Add ARM64 and IPC notes
Added notes for ARM64 and IPC.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-06-02 15:10:07 -07:00
Tom Burdick
11b9da4396 doc: release: Adds DMA release notes for v3.1.0
Adds comments on added drivers, improvements, and fixes for DMA

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2022-06-02 12:53:29 -07:00
Daniel DeGrasse
efbe031aa5 doc: release: add release notes for disk drivers
Add release notes for disk drivers. Primary update since 3.0 was
addition of generic SDMMC disk driver.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2022-06-02 12:53:10 -07:00
Evgeniy Paltsev
801fe1fa06 doc: add ARC release-notes for 3.1
Add ARC architecture and boards release notes

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2022-06-01 16:37:12 +02:00
Dominik Ermel
b332864640 doc/releases/3.1: Add notes on MCUMGR to zcbor transition
The commit adds release notes on MCUMGR transition from TinyCBOR
to zcbor, and deprecation of several Kconfig options that are
no longer needed.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2022-06-01 16:36:45 +02:00
Erwan Gouriou
5ba4811484 doc: release notes V3.1.0: Shields Updates
Update V3.1.0 release notes with shields additions.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-06-01 16:36:33 +02:00
Erwan Gouriou
8cae92f3eb doc: release notes V3.1.0: bt_disable and HCI close addition
Update V3.1.0 release notes with bt_disable addition

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-06-01 16:36:33 +02:00
Erwan Gouriou
86c4357c26 doc: release notes V3.1.0: STM32 Updates
Update V3.1.0 release notes with STM32 related changes.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2022-06-01 16:36:33 +02:00
Robert Lubos
3b27614ee7 doc: release: 3.1: Add release notes for networking
Add networking release notes based on commit history.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-06-01 16:36:02 +02:00
Gerard Marull-Paretas
dead2df30a doc: release-notes: add pinctrl release notes
Add list of platforms that have a new pinctrl driver to the release
notes.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-01 16:35:24 +02:00
Andrzej Puzdrowski
177dd8608f releae-note: note on MCUboot for 3.1.0 release
Added description on changes since the last major release
for the MCUboot.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2022-06-01 16:35:09 +02:00
Andy Ross
3fff886da3 doc/releases: 3.1 release notes for kernel/xtensa/x86
Not a huge release, but a handful of noteworthy new features (and one
important bug)

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2022-06-01 16:34:51 +02:00
Flavio Ceolin
87e08afaca doc: release: 3.1: Add power management notes
Add release notes for Power Management subsystem.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2022-06-01 16:34:44 +02:00
Carles Cufi
9a43a3e8a7 doc: relnotes: Add Bluetooth release notes for 3.1.0
As usual, populate the Bluetooth release notes, this time for Zephyr
3.1.0.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-06-01 12:59:38 +02:00