Skip to content

Commit 01d7a21

Browse files
committed
doc: refactor section Upgrading Packages
Major overhaul and simplification of both language and structure to improve accessibility and UX in new documentation framework. Signed-off-by: Joachim Wiberg <[email protected]>
1 parent a110761 commit 01d7a21

File tree

1 file changed

+126
-134
lines changed

1 file changed

+126
-134
lines changed

doc/developers-guide.md

Lines changed: 126 additions & 134 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@ on Buildroot to finalize the target filesystem and generate the images.
136136
The final `run` argument is explained below.
137137

138138

139+
### YANG Model
140+
141+
When making changes to the `confd` and `statd` services, you will often
142+
need to update the YANG models. If you are adding a new YANG module,
143+
it's best to follow the structure of an existing one. However, before
144+
making any changes, **always discuss them with the Infix core team**.
145+
This helps avoid issues later in development and makes pull request
146+
reviews smoother.
139147

140148
### `confd`
141149

@@ -215,174 +223,156 @@ To replay:
215223
This is especially useful when working in isolated environments or debugging
216224
issues without direct access to the DUT.
217225

218-
### Upgrading Packages
219226

220-
#### Buildroot
227+
## Upgrading Packages
228+
229+
### Buildroot
221230

222-
Kernelkit maintains an internal [fork of
223-
Buildroot](https://github.com/kernelkit/buildroot), with branches
224-
following the naming scheme `YYYY.MM.patch-kkit`
231+
The Kernelkit team maintains an internal [fork of Buildroot][9], with
232+
branches following the naming scheme `YYYY.MM.patch-kkit`
225233
e.g. `2025.02.1-kkit`, which means a new branch should be created
226234
whenever Buildroot is updated. These branches should contain **only**
227235
changes to existing packages (but no new patches), modifications to
228236
Buildroot itself or upstream backports.
229237

230-
KernelKit track the latest Buildroot LTS (Long-Term Support) release
231-
and updates. The upgrade of LTS minor releases is expected to have low
232-
impact and should be done as soon there is a patch release of
233-
Buildroot LTS is available.
238+
The team tracks the latest Buildroot LTS (Long-Term Support) release and
239+
updates. The impact of minor LTS release upgrades is expected to have a
240+
very low impact and should be done as soon there is a patch release of a
241+
Buildroot LTS available.
234242

235243
> **Depending on your setup, follow the appropriate steps below.**
236244
237-
🔁 If you **already have** the Buildroot repo locally
245+
#### Repo locally cloned already
238246

239247
1. Navigate to the Buildroot directory
240-
```bash
241-
$ cd buildroot
242-
```
243-
2. Pull the latest changes from KernelKit
244-
```bash
245-
$ git pull
246-
```
247-
3. Fetch the latest tags from upstream
248-
```bash
249-
$ git fetch upstream --tags
250-
```
251248

249+
cd buildroot/
250+
251+
1. Pull the latest changes from KernelKit
252+
253+
git pull
254+
255+
1. Fetch the latest tags from upstream
252256

253-
🆕 If you don't have the repo locally
257+
git fetch upstream --tags
258+
259+
#### No local repo yet
254260

255261
1. Clone the Kernelkit Buildroot repository
256-
```bash
257-
$ git clone [email protected]:kernelkit/buildroot.git
258-
```
259-
260-
2. Add the upstream remote
261-
```bash
262-
$ git remote add upstream https://gitlab.com/buildroot.org/buildroot.git
263-
```
264-
3. Checkout old KernelKit branch
265-
```bash
266-
$ git checkout 2025.02.1-kkit
267-
```
268-
269-
270-
🛠 Continue from here (applies to both cases):
271-
272-
4. Create a new branch based on the **previous** KernelKit Buildroot
273-
release (e.g. `2025.02.1-kkit`) and name it according to the naming scheme (e.g. `2025.02.2-kkit`)
274-
```bash
275-
$ git checkout -b 2025.02.2-kkit
276-
```
277-
5. Rebase the new branch onto the corresponding upstream release
278-
```bash
279-
$ git rebase 2025.02.2
280-
```
281-
> [!NOTE] It is **not** allowed to rebase the branch when bumped in Infix.
282-
283-
6. Push the new branch and tags
284-
```bash
285-
$ git push origin 2025.02.2-kkit --tags
286-
```
287-
7. In Infix, checkout new branch of Buildroot
288-
```bash
289-
$ cd buildroot
290-
$ git fetch
291-
$ git checkout 2025.02.2-kkit
292-
```
293-
8. Push changes
294-
Commit and push the changes. Don’t forget to update the changelog.
295-
296-
9. Create a pull request.
297-
298-
> [!NOTE] Remember to set the pull request label to `ci:main` to ensure full CI coverage.
299-
300-
301-
#### Linux kernel
302-
303-
KernelKit maintains an internal [fork of Linux
304-
kernel](https://github.com/kernelkit/linux), with branches following
305-
the naming scheme `kkit-linux-[version].y`, e.g. `kkit-6.12.y`, which
306-
means a new branch should be created whenever the major kernel version
307-
is updated. This branch should contain *all* kernel patches used by
308-
Infix.
309-
310-
KernelKit track the latest Linux kernel LTS (Long-Term Support)
311-
release and updates. The upgrade of LTS minor releases is expected to
312-
have low impact and should be done as soon as a patch release of the
313-
LTS Linux kernel is available.
314-
315-
316-
🔁 If you **already have** the Linux kernel repo locally
262+
263+
git clone [email protected]:kernelkit/buildroot.git
264+
265+
1. Add the upstream remote
266+
267+
git remote add upstream https://gitlab.com/buildroot.org/buildroot.git
268+
269+
1. Checkout old KernelKit branch
270+
271+
git checkout 2025.02.1-kkit
272+
273+
> [!NOTE]
274+
> Below, it is **not** allowed to rebase the branch when bumped in Infix.
275+
276+
#### Continue Here
277+
278+
1. Create a new branch based on the **previous** KernelKit Buildroot
279+
release (e.g. `2025.02.1-kkit`) and name it according to the naming
280+
scheme (e.g. `2025.02.2-kkit`)
281+
282+
git checkout -b 2025.02.2-kkit
283+
284+
1. Rebase the new branch onto the corresponding upstream release
285+
286+
git rebase 2025.02.2
287+
288+
1. Push the new branch and tags
289+
290+
git push origin 2025.02.2-kkit --tags
291+
292+
1. In Infix, checkout new branch of Buildroot
293+
294+
cd buildroot
295+
git fetch
296+
git checkout 2025.02.2-kkit
297+
298+
1. Commit and push the changes. *Remember to update the ChangeLog!*
299+
300+
1. Create a pull request.
301+
302+
> [!NOTE]
303+
> Remember to set the pull request label to `ci:main` to ensure full CI
304+
> coverage.
305+
306+
307+
### Linux kernel
308+
309+
The KernelKit team maintains an internal [fork of Linux kernel][10],
310+
with branches following the naming scheme `kkit-linux-[version].y`,
311+
e.g. `kkit-6.12.y`, which means a new branch should be created whenever
312+
the major kernel version is updated. This branch should contain *all*
313+
kernel patches used by Infix.
314+
315+
The team tracks the latest Linux kernel LTS (Long-Term Support) release
316+
and updates. The upgrade of LTS minor releases is expected to have low
317+
impact and should be done as soon as a patch release of the LTS Linux
318+
kernel is available.
319+
320+
#### Repo locally cloned already
317321

318322
1. Navigate to the Linux kernel directory
319-
```bash
320-
$ cd linux
321-
```
322-
2. Get latest changes from KernelKit
323-
```bash
324-
$ git pull
325-
```
326-
3. Fetch the latest tags from upstream
327-
```bash
328-
$ git fetch upstream --tags
329-
```
330-
331-
🆕 If you don't have the repo locally
323+
324+
cd linux
325+
326+
1. Get latest changes from KernelKit
327+
328+
git pull
329+
330+
1. Fetch the latest tags from upstream
331+
332+
git fetch upstream --tags
333+
334+
#### No local repo yet
332335

333336
1. Clone the KernelKit Linux kernel repository
334-
```bash
335-
$ git clone [email protected]:kernelkit/linux.git
336-
```
337-
2. Add the upstream remote
338-
```bash
339-
$ git remote add upstream git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
340-
```
341337

342-
3. Checkout correct kernel branch
343-
```bash
344-
$ git checkout kkit-linux-6.12.y
345-
```
338+
git clone [email protected]:kernelkit/linux.git
339+
340+
1. Add the upstream remote
341+
342+
git remote add upstream git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
346343

347-
🛠 Continue from here (applies to both cases)
344+
1. Checkout correct kernel branch
348345

346+
git checkout kkit-linux-6.12.y
349347

350-
4. Rebase on the upstream release
351-
```bash
352-
$ git rebase v6.12.29
353-
```
348+
#### Continue Here
354349

355-
6. Push changes and the tags
356-
```bash
350+
1. Rebase on the upstream release
357351

358-
$ git push -f origin kkit-linux-6.12.y --tags
359-
```
352+
git rebase v6.12.29
360353

361-
**Move to your infix directory**
354+
1. Push changes and the tags
355+
356+
git push -f origin kkit-linux-6.12.y --tags
362357

363-
7. Generate patches
364-
```bash
365-
$ make x86_64_defconfig
366-
$ cd output
367-
$ ../utils/kernel-refresh.sh -k /path/to/linux -o 6.12.28 -t v6.12.29
368-
```
369-
> [!NOTE] See help of `kernel-refresh.sh` script for more information
358+
**Move to your Infix source tree**
370359

360+
> [!NOTE]
361+
> See help of `kernel-refresh.sh` script for more information.
371362
372-
8. Push changes
373-
Commit and push the changes. Don’t forget to update the s:changelog:doc/ChangeLog.md.
363+
1. Generate patches
374364

375-
9. Create a pull request.
376-
> [!NOTE] Remember to set the pull request label to `ci:main` to ensure full CI coverage.
365+
make x86_64_defconfig
366+
cd output
367+
../utils/kernel-refresh.sh -k /path/to/linux -o 6.12.28 -t v6.12.29
377368

369+
1. Commit and push the changes. Remember to update the ChangeLog
370+
1. Create a pull request
378371

379-
### Agree on YANG Model
372+
> [!NOTE]
373+
> Remember to set the pull request label to `ci:main` to ensure full CI
374+
> coverage.
380375
381-
When making changes to the `confd` and `statd` services, you will often need to update
382-
the YANG models. If you are adding a new YANG module, it's best to follow the
383-
structure of an existing one. However, before making any changes, **always discuss
384-
them with the Infix core team**. This helps avoid issues later in development and
385-
makes pull request reviews smoother.
386376

387377

388378
Testing
@@ -476,3 +466,5 @@ $ git submodule update --init
476466
[6]: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow
477467
[7]: https://cli.github.com/
478468
[8]: https://github.com/kernelkit/infix/blob/main/utils/gh-dl-artifact.sh
469+
[9]: https://github.com/kernelkit/buildroot
470+
[10]: https://github.com/kernelkit/linux

0 commit comments

Comments
 (0)