aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2023-08-31event: Support a simple spy recordSimon Glass
The current event spy is always passed the event context and the event. The context is always NULL for a static spy. The event is not often used. Introduce a 'simple' spy which takes no arguments. This allows us to drop the adaptation code that many of these spy records use. Update the event script to find these in the image. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-29scripts/Makefile.lib: Embed capsule public key in platform's dtbSughosh Ganu
The EFI capsule authentication logic in u-boot expects the public key in the form of an EFI Signature List(ESL) to be provided as part of the platform's dtb. Currently, the embedding of the ESL file into the dtb needs to be done manually. Add a target for generating a dtsi file which contains the signature node with the ESL file included as a property under the signature node. Include the dtsi file in the dtb. This brings the embedding of the ESL in the dtb into the U-Boot build flow. The path to the ESL file is specified through the CONFIG_EFI_CAPSULE_ESL_FILE symbol. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-08-29scripts/Makefile.lib: Add dtsi include files as deps for building DTBSughosh Ganu
At the time of building the DTB, some dtsi files can be selected for inclusion. Have these dtsi files as dependencies for the DTB target. This also ensures generation or updating the dtsi files if need be. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-08-29scripts/Makefile.lib: Collate all dtsi files for inclusionSughosh Ganu
At the time of building a device-tree file, all the *u-boot.dtsi files are looked for, in a particular order, and the first file found is included. Then, the list of files specified in the CONFIG_DEVICE_TREE_INCLUDES symbol are included. Combine these files that are to be included into a variable, and then include all these files in one go. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-08-09scripts: kconfig: Add config fragment support in board/../Jason Kacines
Add support to config fragments (.config) located in the /board directory. This will allow only base defconfigs to live in /configs and all fragments to live in their respective device directory in /board/.. Signed-off-by: Jason Kacines <j-kacines@ti.com>
2023-05-31scripts/Makefile.lib: change spelling of $(srctree)/arch/$(ARCH)/dts in ↵Rasmus Villemoes
dtc_cpp_flags Currently, all in-tree .dts files (apart from some under test/ and tools/), reside in arch/$ARCH/dts. However, in the linux kernel tree, dts files for arm64 boards, and probably in the not too distant future [1], arm boards as well, live in subdirectories of that. For private forks, using a vendor or project subdirectory is also more convenient to clearly separate private code from upstream - in the same way that code under board/ is also split and easy to maintain. In order to prepare for us to follow suit and do the splitting of the in-tree .dts files, and to make life a little easier for private forks that already place dts files not directly in arch/$ARCH/dts, change the $(srctree)/arch/$(ARCH)/dts path to instead refer to the directory of the .dts file being compiled. This should be a no-op for all existing cases. [1] https://lore.kernel.org/lkml/20220328000915.15041-1-ansuelsmth@gmail.com/ Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2023-05-15kbuild: Allow DTB overlays to built from .dtso named source filesRasmus Villemoes
[Linux commit 363547d2191c] Currently DTB Overlays (.dtbo) are build from source files with the same extension (.dts) as the base DTs (.dtb). This may become confusing and even lead to wrong results. For example, a composite DTB (created from a base DTB and a set of overlays) might have the same name as one of the overlays that create it. Different files should be generated from differently named sources. .dtb <-> .dts .dtbo <-> .dtso We do not remove the ability to compile DTBO files from .dts files here, only add a new rule allowing the .dtso file name. The current .dts named overlays can be renamed with time. After all have been renamed we can remove the other rule. [Import notes: Adapt to U-Boot by using the cmd_dtco function instead of cmd_dtc just like the current .dts -> .dtbo rule.] Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-15kbuild: add dtc as dependency on .dtb filesRasmus Villemoes
[Linux commit b8fc5b2157b1] If dtc is rebuilt, we should rebuild .dtb files with the new dtc. [Import notes: Back then there was no .dtbo rule in Linux's Makefile.lib, but the current .dtbo rules in Linux also have the $(DTC) dependency, so also add it to our .dtbo rule.] Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-15scripts/Makefile.dts: tweak logic for deciding which dtbs to buildRasmus Villemoes
The idea in 3609e1dc5f4d (dts: automatically build necessary .dtb files) was fine, but the implementation was suboptimal due to some misunderstandings on my part (and possibly defects in some defconfig files): - Sometimes DEFAULT_DEVICE_TREE is not included in OF_LIST or SPL_OF_LIST - SPL_OF_LIST is not always a subset of OF_LIST - While SPL_OF_LIST governs the list of dtbs relevant to SPL (i.e., may be built into an SPL-with-bunch-of-dtbs-to-choose-between-at-runtime), those dtbs are not actually _built_ during the SPL build phase, i.e. when $(SPL_) would expand to SPL_. fdtgrep runs on the artifacts produced during the ordinary U-Boot build. Tweak the logic so that we simply add the union of all dtbs mentioned in either DEFAULT_DEVICE_TREE, OF_LIST and SPL_OF_LIST to dtb-y. That should, for real, ensure that we always build all the dtbs that is relevant to the current board, and should in turn enable us to massively simplify arch/*/dts/Makefile. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Tested-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-05-15scripts: dtc-version: support git version strings tooMartin Hundebøll
Building dtc from git causes the version number to start with a 'v' (e.g. v1.7.0). printf then fails to parse 'v1' as a decimal value, and prints '000700' instead of '010700'. Subsequently, the build fails, because '000700' is less than the required '010400' version. Signed-off-by: Martin Hundebøll <martin@geanix.com>
2023-03-25efI: Allow packaging a kernel in the debugging scriptSimon Glass
Add an option to package a kernel into the debugging script used for EFI. The name of the kernel must be added to the script. By default it is assumed that the kernel is built in the /tmp/kernel directory. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-14Merge tag 'v2023.04-rc4' into nextTom Rini
Prepare v2023.04-rc4 Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-13efi: Adjust script to show pre-relocation output on terminalSimon Glass
When running with video enabled, the pre-relocation output of U-Boot is currently lost. Add a -serial flag to show it on the terminal. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-08script: Add a script to build a PyPi packageSimon Glass
Create a script which can package a tool for use with PyPi and the 'pip' tool. This involves quite a few steps so is best automated. Future work will enable use of this for some of the tools in U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-08patman: Move library functions into a library directorySimon Glass
The patman directory has a number of modules which are used by other tools in U-Boot. This makes it hard to package the tools using pypi since the common files must be copied along with the tool that uses them. To address this, move these files into a new u_boot_pylib library. This can be packaged separately and listed as a dependency of each tool. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-03-01RFC: tools: Add a camel-case conversion scriptSimon Glass
This is only for posterity, since once the conversion is done, the script is of no use. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-14checkpatch: Add a warning for pre-schema driver model tagsSimon Glass
Help ensure that these don't creep into development by adding a check in checkpatch for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-02-14dm: Add support for handling old u-boot,dm- tagsSimon Glass
Add a CONFIG option to deal with this automatically, printing a warning when U-Boot starts up. This can be useful if the device tree comes from another project. We will maintain this through the 2023.07 release, providing 6 months for people to notice. Signed-off-by: Simon Glass <sjg@chromium.org> Version 4: Acked-by: Michal Simek <michal.simek@amd.com>
2023-01-11Use `grep -E` or plain `grep` instead of `egrep`Ville Skyttä
`egrep` has been deprecated in GNU grep since 2007, and since 3.8 it emits obsolescence warnings: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1 Acked-by: Dhruva Gole <d-gole@ti.com>
2023-01-09Merge branch 'next'Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-07pylibfdt: Allow version normalization to failTom Rini
In some cases, we might not have the sic portion of setuputils available. Make our import and use of this be done in try/except blocks as this is done to suppress a run-time warning that is otherwise non-fatal. Reported-by: Pali Rohár <pali@kernel.org> Fixes: 141659187667 ("pylibfdt: Fix disable version normalization") Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-06pylibfdt: Fix disable version normalizationPhilippe Schenker
On Arch Linux based systems python setuptools does not contain "setuptools.extern" hence it is failing with the following error-message: " ModuleNotFoundError: No module named 'setuptools.extern' " According to a eschwartz `setuptools.extern` is not a public API and shall not be assumed to be present in the setuptools package. He mentions that the setuptools project anyway wants to drop this. [1] Use the correct solution introduced by python setuptools developers to disable normalization. [2] [1] https://bbs.archlinux.org/viewtopic.php?id=259608 [2] https://github.com/pypa/setuptools/pull/2026 Fixes: 440098c42e73 ("pylibfdt: Fix version normalization warning") Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-23kbuild: Remove checking for adhoc CONFIG symbolsTom Rini
At this point all listed adhoc CONFIG symbols have been migrated to Kconfig or removed from the tree or renamed to CFG (or similar). We also now have CI tests that will error on any new introductions, and checkpatch.pl also looks. We can now remove these hooks and related scripts. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23checkpatch.pl: Update CONFIG logic in U-Boot sectionTom Rini
Now that all CONFIG symbols are in Kconfig, checkpatch.pl should check for and error on any case of define/undef CONFIG_*. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23kbuild: Remove uncmd_spl logicTom Rini
At this point in the conversion there should be no need to have logic to disable some symbol during the SPL build as all symbols should have an SPL counterpart. The main real changes done here are that we now must make proper use of CONFIG_IS_ENABLED(DM_SERIAL) rather than many of the odd tricks we developed prior to CONFIG_IS_ENABLED() being available. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-23global: Migrate CONFIG_BOARDDIR to CFGTom Rini
Perform a simple rename of CONFIG_BOARDDIR to CFG_BOARDDIR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-22pylibfdt: Fix version normalization warningMarek Vasut
Fix the following version normalization warning: " /usr/lib/python3/dist-packages/setuptools/dist.py:530: UserWarning: Normalizing '2023.01' to '2023.1' " Using suggestion from Richard Jones: https://github.com/pypa/setuptools/issues/308#issuecomment-405817468 Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-21Merge tag 'v2023.01-rc4' into nextTom Rini
Prepare v2023.01-rc4 Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-14sunxi: remove unused CONFIG_MMC_SUNXI_SLOTAndre Przywara
There is a CONFIG_MMC_SUNXI_SLOT definition in our sunxi_common.h config header, which was used to note the first MMC controller to initialise. The definition in that header was always set to 0, with no easy way of overriding this, and certainly none of the existing boards made any use of that (non-)feature. Remove that definition and replace it with a constant 0 in the only user, in board.c. It turns out that this is safe, as this is only used in the SPL, and the BROM also unconditionally initialises MMC0. This also removes the last legacy config symbol with SUN*I in it from the whitelist. Reviewed-by: Samuel Holland <samuel@sholland.org> Tested-by: Samuel Holland <samuel@sholland.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2022-12-12board/km/secu: migrate to use environment text filesHolger Brunck
Instead of having these defines in a header file, move them to a simple text file. Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2022-12-12board/km/cent2: migrate to environment text fileHolger Brunck
Use like the other boards a text file for the environment. As this is the last user of keymile-common.h we can now remove this file completely. Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2022-12-12Makefile: link with --no-warn-rwx-segmentsTom Rini
We borrow from the Linux Kernel 0d362be5b142 ("Makefile: link with -z noexecstack --no-warn-rwx-segments") here to disable the RWX segment linking warnings. We do not also bring in -z noexecstack as that requires auditing and using ".note.GNU-stack" on assembly functions which do need this feature. Further, we now introduce KBUILD_EFILDFLAGS so that we can also pass --no-warn-rwx-segments when linking EFI applications, and those do explicitly pass -z execstack. Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2022-12-05scripts/config_whitelist.txt: Remove more referenced symbolsTom Rini
Perform some deeper investigation on the remaining symbols listed in this file and remove more. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-12-05powerpc: Rename CONFIG_NS16550_MIN_FUNCTIONSTom Rini
This symbol is specific to the PowerPC SPL implementation, so rename this to reflect that it's in SPL and used / tested there, so that we can then safely migrate it to Kconfig. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-11-22doc: Correct the path to the Makefile documentationSimon Glass
This is out-of-date now. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-11-10Merge branch '2022-11-10-symbol-migrations'Tom Rini
- Migrate a number of CONFIG symbols to Kconfig and start migrating some symbol families from CONFIG to the CFG namespace.
2022-11-02MIPS: convert CONFIG_SYS_MIPS_TIMER_FREQ to KconfigDaniel Schwierzeck
This converts the following to Kconfig: CONFIG_SYS_MIPS_TIMER_REQ Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-11-02MIPS: remove CONFIG_SYS_MHZDaniel Schwierzeck
Resolve all uses of CONFIG_SYS_MHZ with the currently defined value. Remove code which depends on CONFIG_SYS_MHZ but where no board configs actually use that code. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-10-30Merge tag 'video-20221030' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-video - fix [hv]sync active vs back porch in dw_mipi_dsi - simplefb rotation support - support splash as raw image from MMC - enhancements to Truetype console (multiple fonts and sizes) - drop old LCD support
2022-10-30video: Drop atmel LCD codeSimon Glass
This has not been migrated to DM_VIDEO since 2019. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop ld9040 driverSimon Glass
This is not used anymore. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCD_MENUSimon Glass
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCD_ALIGNMENTSimon Glass
This option is not needed now that the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30Convert CONFIG_VIDEO_LOGO_MAX_SIZE to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_VIDEO_LOGO_MAX_SIZE Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Rename CONFIG_SYS_VIDEO_LOGO_MAX_SIZESimon Glass
This option should not have the SYS_ in it. Drop it so it fits in with the other video options. Also simplify the alignment code in gunzip_bmp(), since malloc() always returns a 32-bit-aligned pointer. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30Convert CONFIG_HIDE_LOGO_VERSION to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_HIDE_LOGO_VERSION Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-29fdt: Move to setuptoolsSimon Glass
The distutils package is deprecated. The upstream libfdt repo uses setuptools for building the pylibfdt module, so bring in that code, suitably modified for U-Boot. Also bring in the README. The modifications include setting the version correctly, making use of the environment variables provided by the Makefile and various tweaks to the directories. Note that the version omits the minus character at the start of EXTRAVERSION, since this creates a warning. The build is really just used within U-Boot itself, so it doesn't matter too much if the version matches upstream, or exactly matches U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-29tests: Build correct sandbox configuration on 32bitMichal Suchanek
Currently sandbox configuration defautls to 64bit and there is no automation for building 32bit sandbox on 32bit hosts. Use _LP64 macro as heuristic for detecting 64bit targets. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-29libfdt: Fix build with python 3.10Michal Suchanek
Python 3.10 requires defining PY_SSIZE_T_CLEAN. This will be fixed in swig 4.10 but it is not clear when it will be released. There was a warning since python 3.8. Link: https://github.com/swig/swig/pull/2277 Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>