Skip to content

Latest commit

 

History

History
118 lines (85 loc) · 5.33 KB

kdevops-autorefs.md

File metadata and controls

118 lines (85 loc) · 5.33 KB

kdevops Git references generation

Workflow

The process involves managing and switching between Default and User Git References for Kconfig files in the workflows/linux/ directory. make menuconfig creates and updates kdevops default references files (refs/default/Kconfig.*) using kernel.org and static references defined in a YAML configuration file (refs/static/*.yaml), with an update frequency limit of 24 hours. Manual and forced updates can also be done using make refs-default. make refs-user generates and switches to user references files (refs/user/Kconfig.*), until they are cleared with make refs-user-clean or make refs-default is run.

Here's a breakdown of the process:

Default References Mode

By default, references in workflows/linux/refs/default/Kconfig.* are used.

User References Mode

References in workflows/linux/refs/user/Kconfig.* are only used when make refs-user is run. Then, workflows/linux/refs/default/Kconfig.* are ignored.

Switching back to Default References Mode (from User References Mode)

This can be accomplished by clearing the user generated references with make refs-user-clean (target hidden from help) or by forcing the generation of default references with make refs-user.

Default References for Linus, Next and Stable trees: Updating Kconfig with Latest References

make menuconfig automatically creates workflows/linux/refs/default/Kconfig.{linus, stable, next} files using the latest releases from kernel.org and static references from workflows/linux/refs/default/{linux, next, stable}.yaml. Subsequent make menuconfig runs will not regenerate these files for 24 hours after the last update.

Default References for Linus, Next and Stable trees: Forced Update

Running make refs-default forces the update of workflows/linux/refs/default/Kconfig.* files using their corresponding YAML files and kernel.org release information.

Default References for Development trees: Static References

Files like workflows/linux/refs/default/Kconfig.{btrfs-devel, cel-linux, jlayton-linux, kdevops-linux, mcgrof-linus, mcgrof-next} are auto-generated and maintained in kdevops tree. When adding new references, update workflow/linux/refs/static/{btrfs-devel, cel-linux, jlayton-linux, kdevops-linus, mcgrof-linus, mcgrof-next}.yaml manually before running make refs-default. Send a patch with the changes upstream.

User References: Generating User Git References

Running make refs-user generates workflows/linux/refs/user/Kconfig.* files including statically defined references and the last 15 references found upstream. The Kconfig menu uses these new files until switching back to Default References Mode.

Description

kdevops facilitates the automatic generation of Git References (or refs), ensuring that repositories used for bootlinux are always up to date with the latest refs available in Kconfig.

The automation of this process is integrated into Make through menuconfig, and the following targets: refs-default and refs-user.

These targets ensure that the files refs/default/Kconfig.* and refs/user/Kconfig.* are automatically generated using the scripts/generate_refs.py script file.

The refs/default/Kconfig.* files contain both statically defined references and the latest release version references for the Linus, Next, and Stable trees. Since these three trees are subject to change, their refs/default/Kconfig.* files are not included in the repository and are generated every time make menuconfig or make refs-default is run. Note that with menuconfig, files are only generated if 24 hours have passed since last update.

Files that usually remain unchanged, such as the one for the Mcgrof Next tree (workflows/linux/Kconfig.kreleases-mcgrof-next), (or any other Development tree) are included in the kdevops tree as they only contain statically defined references. To update these, the accompanying YAML file is used as input. These files are generated automatically, enabling kdevops to augment them when make refs-user is run (see more below in the user paragraph).

For example, the workflows/linux/Kconfig.kreleases-mcgrof-next autogenerated file uses workflows/linux/mcgrof-next-refs.yaml as an input. Extending that file is encourage when including new static references that kdevops needs to keep track, followed by running make refs-default for the refs/default/Kconfig.mcgrof-next to be generated.

The refs/user/Kconfig.* files are user-generated files containing both statically defined references and the last 15 references found upstream for Linus, Stable, Next and Development trees. These files will be created empty when make is invoked, as they are required for Kconfig to function. However, when make refs-user is run, the Kconfig menu would use these instead of the default ones until they are manually cleared with make refs-user-clean. or make refs-default is run.

Finally, if kernel.org is unreachable, make refs-default will use only static references and make refs-user will produce no output.