summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2024-09-10scripts/Makefile.lib: do not include CONFIG_DEVICE_TREE_INCLUDES in ↵Rasmus Villemoes1-4/+1
dtsi_include_list The commit mentioned in Fixes broke the CONFIG_DEVICE_TREE_INCLUDES feature, with the result that any board setting any non-empty value for that fails to build. The parent of the mentioned commit refactoring a bit by introducing the dtsi_include_list variable and changing cmd_dtc to loop over that was fine. However, the .dtsi files mentioned in CONFIG_DEVICE_TREE_INCLUDES are not supposed to be generated via the build system. They are meant for e.g. including a public key for verified boot (generated with the key2dtsi script), or for injecting some stuff to the /config node (say, a bootcmd or a load-environment setting or things like that). The files can either live in-tree in a private branch or completely outside, e.g. in some Yocto metadata. But regardless, U-Boot's build system will never know anything about them, so when the mentioned commit did dtsi_include_list_deps = $(addprefix $(obj)/,$(subst $(quote),,$(dtsi_include_list))) things broke, because if CONFIG_DEVICE_TREE_INCLUDES is for example "/path/to/public_key.dtsi", this would add a dependency on $(obj)//path/to/public_key.dtsi to each $(obj)/*.dtb target, yielding make[3]: *** No rule to make target 'arch/arm/dts/imx6dl-aristainetos2c_7.dtb', needed by 'dtbs'. Stop. To fix that while preserving the introduced CONFIG_EFI_CAPSULE_ESL_FILE behaviour, disentangle CONFIG_DEVICE_TREE_INCLUDES from dtsi_include_list from which dtsi_include_list_deps is built, and instead just add the items directly to the $(foreach) loop. Fixes: a958988b62 ("scripts/Makefile.lib: Add dtsi include files as deps for building DTB") Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Tested-by: Emil Kronborg <emil.kronborg@protonmail.com>
2024-08-15scripts/decodecode: update from Linux v6.10Heinrich Schuchardt1-21/+148
For decoding RISC-V dumps we need to update the script. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-07-31Merge patch series "Endian Kconfig improvements"Tom Rini1-1/+1
Jiaxun Yang <jiaxun.yang@flygoat.com> says: This is a subset of my previous arm64_be work. I wish this could be merged first so it would be easier to work against xtensa and arm64 be support.
2024-07-31config: Use CONFIG_SYS_BIG_ENDIAN in code whenever possibleJiaxun Yang1-1/+1
So CONFIG_SYS_BIG_ENDIAN is our cross architecture option for selecting machine endian, while the old CONFIG_CPU_BIG_ENDIAN is defined by Arc only. Use it whenever possible to ensure big endian code path is enabled for all possible big endian machines. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
2024-07-29fixdep: Support VPLSimon Glass1-0/+2
Add VPL support in this tool. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: f86ca5ad8f7 ("Introduce Verifying Program Loader (VPL)")
2024-07-26sandbox: Fix LTO to work with STACKPROTECTORAndrew Goodbody1-2/+3
Add the STACKPROTECTOR symbols to the script that generates the symbols that should not be removed by the use of LTO when linking a shared object. This prevents a fail to build due to link errors. https://source.denx.de/u-boot/u-boot/-/issues/35 Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-07-18Merge patch series "finish using .dtso for overlay source files"Tom Rini1-4/+19
Rasmus Villemoes <rasmus.villemoes@prevas.dk> says: This is a followup to the patches that landed in 2024.01 and nearly made sure that source files for producing .dtbo files use the .dtso extension. In the same release, a few new .dts files snuck in, and there was also some test code involving .dtbo -> .dtbo.S -> .dtbo.o I didn't really know how to handle at the time. This should finish the job, bring us in sync with linux (at least in this respect), and drop the .dts -> .dtbo build rule.
2024-07-18kbuild: Disallow DTB overlays to built from .dts named source filesRasmus Villemoes1-3/+0
[equivalent to linux commit 81d362732bac] As a follow up to the series allowing DTB overlays to built from .dtso files. Now that all overlays have been renamed, remove the ability to build from overlays from .dts files to prevent any files with the old name from accidental being added. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2024-07-18kbuild: Allow DTB overlays to built into .dtbo.S filesRasmus Villemoes1-1/+19
[linux commit 941214a512d8, modified for U-Boot by removing the include of vmlinux.lds.h and replacing STRUCT_ALIGNMENT by 16.] DTB files can be built into the kernel by converting them to assembly files then assembling them into object files. We extend this here for DTB overlays with the .dtso extensions. We change the start and end delimiting tag prefix to make it clear that this data came from overlay files. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2024-07-15Merge patch series "api: Remove duplicate newlines"Tom Rini18-70/+0
This removes a number of duplicate newlines throughout the codebase.
2024-07-15scripts: Remove duplicate newlinesMarek Vasut18-70/+0
Drop all duplicate newlines. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-07-14scripts/Makefile.lib: EFI: Use capsule CRT instead of ESL fileJonathan Humphreys1-8/+14
The EFI Capsule ESL file (EFI Signature List File) used for authentication is a binary generated from the EFI Capsule public key certificate. Instead of including it in the source repo, automatically generate it from the certificate file during the build process. Currently, sandbox is the only device using this, so removed its ESL file and set the (new) CONFIG_EFI_CAPSULE_CRT_FILE config to point to its public key certificate. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-07-14scripts/Makefile.lib: fixes: Embed capsule public key in platform's dtbJonathan Humphreys1-1/+1
The call to cmd_capsule_esl_gen was made directly rather than using the "cmd,xxx" syntax. Fixes: c7d4dfcd ("scripts/Makefile.lib: Embed capsule public key in platform's dtb") Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-06-26scripts/Makefile.lib: remove bootph-some-ram property from VPL/TPL/SPLQuentin Schulz1-1/+1
The property isn't useful in VPL/SPL/TPL as it is only for U-Boot proper pre-reloc, which has its own DTB. Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2024-05-21scripts/setlocalversion: sync with linux v6.9Rasmus Villemoes1-114/+112
The changes upstream since the last sync (2ed1b242ab2 "scripts/setlocalversion: sync with linux 5.8") are (5) 548b8b5168c9 scripts/setlocalversion: make git describe output more reliable 77a88274dc1a kbuild: replace LANG=C with LC_ALL=C 2a73cce2dad3 scripts/setlocalversion: remove mercurial, svn and git-svn supports a2be76a352f1 scripts/setlocalversion: remove workaround for old make-kpkg ffaf62a8050b scripts/setlocalversion: add more comments to -dirty flag detection 630ff0faf84e scripts/setlocalversion: factor out 12-chars hash construction 042da426f8eb scripts/setlocalversion: simplify the short version part 5df99bec210a scripts/setlocalversion: fix a bug when LOCALVERSION is empty (1) 7d153696e5db kbuild: do not include include/config/auto.conf from shell scripts (2) 129ab0d2d9f3 kbuild: do not quote string values in include/config/auto.conf f6e09b07cc12 kbuild: do not put .scmversion into the source tarball 992ebfab2a75 setlocalversion: simplify the construction of the short version 75280bdf49b2 setlocalversion: make indentation shallower (3) ec31f868ec67 setlocalversion: absorb $(KERNELVERSION) eed36d775177 setlocalversion: clean up the construction of version output (4) 6ab7e1f95e96 setlocalversion: use only the correct release tag for git-describe 05e96e96a315 kbuild: use git-archive for source package creation 3354c64d4184 scripts/setlocalversion: clean up stale comment 01e89a4acefc scripts/setlocalversion: also consider annotated tags of the form vx.y.z-${file_localversion} The only thing U-Boot has been applying on top was to deal with not sourcing include/config/auto.conf but instead using awk to extract the right value. Commit (1) did a very similar thing upstream, so we no longer need to do that. However, upstream then went a step further (2) and changed the convention for what goes into auto.conf, so RHS no longer contain double-quotes. That commit thus changed the sed pattern to no longer match those quotes, but as U-Boot has not yet adopted that change, we have to deal with that. In order to be a little forward-compatible, I did that in a way that should work both ways: # version string from CONFIG_LOCALVERSION -config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf) +config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf | tr -d '"') Furthermore, (3) now requires that there is an appropriate KERNELVERSION environment variable set. One way to deal with that would be to just modify the script to use UBOOTVERSION instead, but for now I've instead opted to let the Makefile provide KERNELVERSION=$(UBOOTVERSION) to keep the setlocalversion changes minimal. That variable is further put to use in (4). Note that the logic for mapping *VERSION -> [upstream annotated tag to look for] works unchanged in U-Boot for the current versioning scheme 20XX.YY(-rcN)?. My motivation for wanting to do this sync is to get (4) and (5), in order to get the setlocalversion output both more predictable and consistent across different build environments, i.e. independent of random local .gitconfig settings, total number of git objects and/or existence of unrelated tags (possibly from some tracked fork). Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2024-05-13scripts: gen_compile_commands: fix invalid escape sequence warningCaleb Connolly1-1/+1
Since Python 3.12 unrecognised escape sequences trigger a SyntaxWarning. Convert the '\#' string to a raw string so the backslash is correctly used as a literal. Ported from Linux commit dae4a0171e25 ("gen_compile_commands: fix invalid escape sequence warning"). This updates the script to be in-line with Linux 6.9-rc6. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: João Marcos Costa <jmcosta944@gmail.com>
2024-05-07common.h: Remove this file and all referencesTom Rini2-3/+3
With all files that had included this file directly having been updated, we can now remove this file. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-04-29dts: support building all dtb files for a specific vendorCaleb Connolly1-0/+13
This adjusts OF_UPSTREAM to behave more like the kernel by allowing for all the devicetree files for a given vendor to be compiled. This is useful for Qualcomm in particular as most boards are supported by a single U-Boot build just provided with a different DT. Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Amlogic boards builds
2024-04-17Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAMJonathan Humphreys1-1/+1
When CONFIG_OF_UPSTREAM is enabled, DTS files are in SOC subdirectories (vs the top level dts directory), but when CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, the dynamically created dtsi file containing the capsule ESL DT node is in the parent directory. This results in a build failure because the #include inserted in the DTS file is local to the current directory. Update Makefile to have the DT preprocessing of #includes search in the parent (dts top level) directory too. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-10build: Revive and update LDR format supportGreg Malysa1-0/+5
LDR format files are used primarily by Analog Devices processors but may be of interest to other vendors. Previously support existed for this format as part of the U-Boot build, but it has been unmaintained and unused for a long time. In preparation for adding support for modern ADI processors that use LDR, modernize the LDR support: - Introduce CONFIG_LDR_CPU as the CPU string recognized by the LDR tool may not be the same as CONFIG_CPU - Add an SPL target that repackages u-boot-spl inside an LDR file An almost identical target for packaging u-boot into an LDR file already exists and did not need to be created. Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> Signed-off-by: Ian Roberts <ian.roberts@timesys.com> Signed-off-by: Greg Malysa <greg.malysa@timesys.com>
2024-04-10scripts/Makefile.spl: Use 'sort' in SHRUNK_ARCH_DTB ruleTom Rini1-1/+1
With configs such as "am64x_evm_a53" or "imx8mp_venice" which list multiple device trees to build we get a warning such as: scripts/Makefile.spl:578: target 'spl/dts/freescale/' given more than once in the same rule If we sort this list first the warning goes away. Tested-by: Michal Simek <michal.simek@amd.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2024-03-13Makefile: Improve generated_defconfig file handlingSam Protsenko1-1/+1
Commit 2027e99e61aa ("Makefile: Run defconfig files through the C preprocessor") adds `generated_defconfig' file, but fails to clean that up. It might be useful to have that file around after `make' is done, but it's better to clean that up on `make clean'. Also we probably want to hide it in `git status' list. This patch makes the described changes, and also adds `-P' parameter to the CPP command that produces the `generated_defconfig' to avoid generating linemarkers. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> Fixes: 2027e99e61aa ("Makefile: Run defconfig files through the C preprocessor") Acked-by: Andrew Davis <afd@ti.com>
2024-03-11Merge tag 'v2024.04-rc4' into nextTom Rini1-1/+1
Prepare v2024.04-rc4
2024-03-04Merge branch '2024-03-02-assorted-updates' into nextTom Rini1-1/+1
- Assorted MediaTek, ASPEED, xenguest, s5p4418 and qemu-arm fixes - Assorted test fixes/updates/additions. - A few bootstd/related fixes. - Remove common.h from some files - Drop reiserfs - A few other assorted fixes throughout the tree.
2024-03-04Makefile: remove hardcoded device tree source directoryBryan Brattlof1-4/+13
Some boards that choose to utilize the OF_UPSTREAM directory for their device tree files will need to specify that directory instead of the traditional arch/$(ARCH)/dts/* path. Include the correct path to the board's dtbs depending on if OF_UPSTREAM is selected or not. Signed-off-by: Bryan Brattlof <bb@ti.com> Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Tested-by: Fabio Estevam <festevam@gmail.com>
2024-03-02scripts: dtc-version: Don't show error messagesDragan Simic1-1/+1
Prevent the error messages produced by which(1), such as the one quoted below, from being visible in the build outputs. which: no dtc in (./scripts/dtc) This makes the build outputs look a tiny bit cleaner. Signed-off-by: Dragan Simic <dsimic@manjaro.org> Reviewed-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
2024-03-01pylibfdt: Fix "invalid escape sequence '\w'" in setup.pyFlorian Schmaus1-1/+1
Once u-boot's build system invokes python3 scripts/dtc/pylibfdt/setup.py --quiet build_ext --inplace it may fail with scripts/dtc/pylibfdt/setup.py:40: SyntaxWarning: invalid escape sequence '\w' RE_KEY_VALUE = re.compile('(?P<key>\w+) *(?P<plus>[+])?= *(?P<value>.*)$') depending on the used Python version. Explicitly mark the regex string as raw string to avoid the warning. Signed-off-by: Florian Schmaus <flo@geekplace.eu> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-29Makefile: Allow upstream DT subtree to provide DT includesSumit Garg1-0/+5
Allow platforms to reuse DT headers and dtsi includes directly form upstream DT subtree which will be frequently synced with Linux kernel. This will further allow us to drop corresponding DT includes copy from U-Boot tree. Also, since the DT includes from upstream DT subtree are done after DT includes from U-Boot tree, so it shouldn't cause any conflicts. Tested-by: Bryan Brattlof <bb@ti.com> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2024-02-29scripts/Makefile.lib: Statically define *-u-boot.dtsi files locationSumit Garg1-13/+17
Allow u-boot to build DTB from a different directory tree such that *-u-boot.dtsi files can be included from a common location. Currently that location is arch/$(ARCH)/dts/, so statically define that common location. This is needed for platform owners to start building DTB files from devicetree-rebasing directory but still being able to include *-u-boot.dtsi files. Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2024-02-29Makefile: Add support for DT bindings schema checksSumit Garg1-2/+15
This adds the build infrastructure for checking DT binding schema documents and validating dtb files using the binding schema. Here we use devicetree-rebasing subtree to provide the DT bindings. Along with that adapt dts/upstream/Bindings/Makefile to align with old U-Boot Kbuild infrastructure. Dependency: ----------- The DT schema project must be installed in order to validate the DT schema binding documents and validate DTS files using the DT schema. The DT schema project can be installed with pip:: pip3 install dtschema Note that 'dtschema' installation requires 'swig' and Python development files installed first. On Debian/Ubuntu systems:: apt install swig python3-dev Testing: -------- Build dts files and check using DT binding schema: $ make dtbs_check Optionally, DT_SCHEMA_FILES can be passed in with a schema file(s) to use for validation. This makes it easier to find and fix errors generated by a specific schema. Note, at this point dtbs_check is an optional build target as there are many warnings generated due to custom DT properties used by many platforms in u-boot. It is expected with these checks that compliance with DT bindings to take place. Once that's done it can be added to CI builds to remain compliant with DT bindings. Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2024-02-27kbuild: Allow for CONFIG_SYS_CONFIG_NAME to be unsetTom Rini1-1/+1
It is possible to have a platform which does not require a board.h file to build, but today we need an empty one for our generated config.h file to be valid. Allow for omitting this file if CONFIG_SYS_CONFIG_NAME is not set. Signed-off-by: Tom Rini <trini@konsulko.com>
2024-02-06scripts/gen_compile_commands: update to Linux v6.7Brandon Maier1-7/+7
Adds support for assembly files and updates the LINE_PATTERN so it supports both "cmd" and "savedcmd", which allows reverting the U-Boot modification in commit 97fbb2eb016b ("scripts/gen_compile_commands.py: adapt _LINE_PATTERN"). Upstream commits: - 880946158b011 gen_compile_commands.py: fix path resolve with symlinks in it - 9e56d3be4bfd2 gen_compile_commands: Sort output compile commands by file name - 52c15e7e79285 gen_compile_commands: Allow the line prefix to still be cmd_ - 1c67921444bf6 gen_compile_commands: add assembly files to compilation database Signed-off-by: Brandon Maier <brandon.maier@collins.com> Cc: Joao Marcos Costa <jmcosta944@gmail.com>
2024-01-18get_maintainer.pl: slightly modify penguin_chiefAnthony Loiseau1-1/+1
Penguin chiefs are actually stripped out from get_maintainer results unless --git-chief-penguins is provided, which appends them to all results instead. This is a issue for U-Boot since Tom Rini (penguin chief) is also maintainer of some sub-trees ("ARM", "ARM TI" and "THE REST"). Hopefully, this match is performed case-senditive over name and email, therefore upper-casing Tom Rini last name workarounds the issue. Important note: This also fixes "THE REST" catch all section resulting in Tom Rini listed as (maintainer:THE REST) for all files. Hope there is not too much developers scripting their patch email header from get_maintainer.pl output, otherwise Tom Rini may be flooded. Cc: Tom Rini <trini@konsulko.com> Signed-off-by: Anthony Loiseau <anthony.loiseau@allcircuits.com>
2024-01-12Makefile: Run defconfig files through the C preprocessorAndrew Davis1-1/+2
This allows us to use some of the normal preprocessor directives inside defconfig files. Such as #define and #include. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Nishanth Menon <nm@ti.com>
2023-12-31Makefile: Use the fdtgrep -u flagSimon Glass1-1/+12
Use this flag so that the bootph binding is obeyed correctly. Add a comment about what is going on. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/12 Reviewed-by: Tom Rini <trini@konsulko.com>
2023-12-31sandbox: Correct SPL condition for building devicetreeSimon Glass1-1/+1
With sandbox, CONFIG_SANDBOX is y so the current rule ends up building the devicetree for only those SPL builds where it is unwanted. Correct the condition. This allows sandbox_vpl to produce a u-boot-vpl.dtb file. Fixes: e7fb789612e ("sandbox: Remove OF_HOSTFILE") Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-18Merge tag 'v2024.01-rc5' into nextTom Rini1-0/+5
Prepare v2024.01-rc5
2023-12-13tools/make_pip: Add mention of u_boot_pylib in tool listSimon Glass1-1/+1
This is not a tool but it is handled by the script, so update the help to include it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-13tools: Keep test_util and patman test files in the pip releaseSimon Glass1-1/+11
The test_util module is actually imported by some tools, e.g. binman so include it in the pip release. The patman tool uses its test code when starting up, so keep that too. Show a list of deleted files so it is clear what is happening. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-12-05scripts/Makefile.lib: print error when no public key is specifiedMasahisa Kojima1-0/+5
The current build system embeds the EFI Signature List(ESL) into the dtb to be used in the EFI capsule authentication. This ESL file is specified through the CONFIG_EFI_CAPSULE_ESL_FILE Kconfig option. If CONFIG_EFI_CAPSULE_ESL_FILE is not specified, U-boot build ends up with failure but the cause of failure is not easily understandable. Current error message is as follows. FATAL ERROR: Error reading file into data: Is a directoryCheck /home/ubuntu/src/ledge/u-boot/arch/arm/dts/.synquacer-sc2a11-developerbox.dtb.pre.tmp for errors make[2]: *** [scripts/Makefile.lib:355: arch/arm/dts/synquacer-sc2a11-developerbox.dtb] Error 1 make[1]: *** [dts/Makefile:44: arch-dtbs] Error 2 make: *** [Makefile:1165: dts/dt.dtb] Error 2 make: *** Waiting for unfinished jobs.... This commit shows the error message that CONFIG_EFI_CAPSULE_ESL_FILE must be specified when the EFI capsule authentication is enabled, then terminate the build with error. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Weizhao Ouyang <o451686892@gmail.com>
2023-11-10tree-wide: Replace http:// link with https:// link for ti.comNishanth Menon1-1/+1
Replace instances of http://www.ti.com with https://www.ti.com Signed-off-by: Nishanth Menon <nm@ti.com>
2023-10-30get_maintainer.pl: update from Linux kernel v6.5Tom Rini1-1/+2
Update U-Boot's version of scripts/get_maintainer.pl to sync it up with the latest changes to the Linux kernel's version of the same script. The last sync was with Linux kernel version v5.13-rc6. The commits to the kernel's get_maintainer.pl since then (starting with the most recent) are: 11fb48961e52 get_maintainer: Honor mailmap for in file emails 26d98e9f78da get_maintainer: don't remind about no git repo when --nogit is used Signed-off-by: Tom Rini <trini@konsulko.com>
2023-10-24checkpatch.pl: Make common.h check boarderTom Rini1-2/+8
At this point in time we should not add common.h to any new files, so make checkpatch.pl complain. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2023-10-11scripts/gen_compile_commands: fix usage messageJoao Marcos Costa1-2/+2
Replace mentions to 'kernel' by 'U-Boot' to avoid confusion. Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com> Tested-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-10-11doc: add documentation for gen_compile_commands.pyJoao Marcos Costa1-0/+1
This documentation briefly explains what is a compilation database, and how to use the script to generate one. This is not a portage, as there was no original documentation in the Linux sources. Acknowledge the documentation in the script's header and in doc/build index. Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com> Tested-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-10-11scripts/gen_compile_commands.py: add acknowledgmentsJoao Marcos Costa1-0/+1
Add acknowledgments for porting and modifying the script. Of course, the license, author, and copyright notice remain the same as in the original script. Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com> Tested-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-10-11scripts/gen_compile_commands.py: fix docstringJoao Marcos Costa1-1/+1
The referred tool is now in U-Boot. Replace "the Linux kernel" by "U-Boot" to make the docstring coherent. Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com> Tested-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-10-11scripts/gen_compile_commands.py: adapt _LINE_PATTERNJoao Marcos Costa1-1/+1
For U-Boot's context, the regular expression defined by _LINE_PATTERN should be adapted. Replace 'savedcmd' by 'cmd'. Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com> Tested-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-10-11scripts: Port Linux's gen_compile_commands.py to U-BootJoao Marcos Costa1-0/+228
This script generates a database of compiler flags, namely compile_commands.json. It is quite useful for text editors that use clangd LSP (e.g. Vim, Neovim). It was ported from Linux's sources: - tag: v6.4 - revision 6995e2de6891c724bfeb2db33d7b87775f913ad1 Modifications for U-Boot compatibility will be added in a follow-up commit. Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com> Tested-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
2023-10-11checkpatch: skip fdtdec_* check for toolsLars Feyaerts1-2/+2
Have checkpatch.pl skip warnings for use of fdtdec_* functions in ooling; livetree isn't used there. Signed-off-by: Lars Feyaerts <lars@bitbiz.be> Reviewed-by: Simon Glass <sjg@chromium.org>