summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2022-02-14scripts: setlocalversion: remove quotes around localversion from configNikita Maslov1-2/+3
After replacing of include/config/auto.conf sourcing with extraction of CONFIG_LOCALVERSION, resulting version string contains quotes around localversion part which are always present in auto.conf (even if localversion is empty). This patch fixes this script to remove quotes. Signed-off-by: Nikita Maslov <wkernelteam@gmail.com> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-11Merge tag 'efi-2022-04-rc2-4' of ↵Tom Rini1-4/+5
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-04-rc2-4 Documentation: * mkeficapsule man-page UEFI changes: * add support for signing images to mkeficapsule * add support for user define capsule GUID * adjust unit tests for capsules * fix UEFI image signature validation in case of multiple signatures
2022-02-11test/py: Add test case for mkimage -o argumentJan Kiszka1-1/+1
Stress the '-o algo_name' argument of mkimage by expanding the vboot test. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Update scripts/pylint.base]
2022-02-11common: drop CONFIG_SYS_RESET_ADDROvidiu Panait1-1/+0
There are no boards that define CONFIG_SYS_RESET_ADDR, so drop the remaining comments referencing it and also the config_whitelist.txt entry. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: thomas@wytron.com.tw
2022-02-11powerpc: mpc8xx: drop CONFIG_SYS_RESET_ADDRESSOvidiu Panait1-1/+0
There are no boards that define CONFIG_SYS_RESET_ADDRESS, so drop the associated mpc8xx code that checks for it. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2022-02-10Merge tag 'dm-pull-8feb22-take3' of ↵Tom Rini2-18/+20
https://gitlab.denx.de/u-boot/custodians/u-boot-dm patman snake-case conversion binman fit improvements ACPI fixes and making MCFG available to ARM [trini: Update scripts/pylint.base] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-09patman: Update with new pylint scoresSimon Glass1-17/+17
Update the new baseline since various scores have improved. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-09dts: automatically build necessary .dtb filesRasmus Villemoes1-0/+3
When building for a custom board, it is quite common to maintain a private branch which include some defconfig and .dts files. But to hook up those .dts files requires modifying a file "belonging" to upstream U-Boot, the arch/*/dts/Makefile. Forward-porting that branch to a newer upstream then often results in a conflict which, while it is trivial to resolve by hand, makes it harder to have a CI do "try to build our board against latest upstream". The .config usually includes information on precisely what .dtb(s) are needed, so to avoid having to modify the Makefile, simply add the files in (SPL_)OF_LIST to dtb-y. A technicality is that (SPL_)OF_LIST is not always defined, so rework the Kconfig symbols so that (SPL_)OF_LIST is always defined (when (SPL_)OF_CONTROL), but only prompted for in the cases which used to be their "depends on". nios2 and microblaze already have something like this in their dts/Makefile, and the rationale in commit 41f59f68539 is similar to the above. So this simply generalizes existing practice. Followup patches could remove the logic in those two makefiles, just as there's potential for moving some common boilerplate from all the arch/*/dts/Makefile files to the new scripts/Makefile.dts. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-02-09configs: Resync with savedefconfigTom Rini1-87/+89
Rsync all defconfig files using moveconfig.py and update scripts/pylint.base Signed-off-by: Tom Rini <trini@konsulko.com>
2022-02-09Convert CONFIG_SCSI_AHCI_PLAT et al to KconfigSimon Glass1-4/+0
This converts the following to Kconfig: CONFIG_SCSI_AHCI_PLAT CONFIG_SYS_SCSI_MAX_SCSI_ID CONFIG_SYS_SCSI_MAX_LUN CONFIG_SYS_SATA_MAX_DEVICE Drop CONFIG_SCSI for everything except the sandbox build. We only need one build for tests. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-09scsi: Drop CONFIG_SYS_SCSI_MAX_DEVICESimon Glass1-1/+0
This is defined based on two other CONFIGs for all boards except sandbox and durian. For sandbox the value does not matter. For durian the value seems excessive. Drop the option completely, to simplify configuration and reduce the number of things we need to convert to Kconfig. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-09Convert CONFIG_REMAKE_ELF to KconfigAlper Nebi Yasak1-1/+0
This converts the following to Kconfig: CONFIG_REMAKE_ELF Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2022-02-09Drop CONFIG_SYS_PIO_MODESimon Glass1-1/+0
This option is not used in U-Boot. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-09Convert CONFIG_SYS_IDE_MAXBUS et al to KconfigSimon Glass1-11/+0
This converts the following to Kconfig: CONFIG_SYS_IDE_MAXBUS CONFIG_SYS_IDE_MAXDEVICE CONFIG_SYS_ATA_BASE_ADDR CONFIG_SYS_ATA_STRIDE CONFIG_SYS_ATA_DATA_OFFSET CONFIG_SYS_ATA_REG_OFFSET CONFIG_SYS_ATA_ALT_OFFSET CONFIG_SYS_ATA_IDE0_OFFSET CONFIG_SYS_ATA_IDE1_OFFSET CONFIG_ATAPI CONFIG_IDE_RESET Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-02-09kconfig: Add support for conditional valuesSimon Glass1-1/+1
At present if an optional Kconfig value needs to be used it must be bracketed by #ifdef. For example, with this Kconfig setup: config WIBBLE bool "Support wibbles, the world needs more wibbles" config WIBBLE_ADDR hex "Address of the wibble" depends on WIBBLE then the following code must be used: #ifdef CONFIG_WIBBLE static void handle_wibble(void) { int val = CONFIG_WIBBLE_ADDR; ... } #endif static void init_machine() { ... #ifdef CONFIG_WIBBLE handle_wibble(); #endif } Add a new IF_ENABLED_INT() to help with this. So now it is possible to write, without #ifdefs: static void handle_wibble(void) { int val = IF_ENABLED_INT(CONFIG_WIBBLE, CONFIG_WIBBLE_ADDR); ... } static void init_machine() { ... if (IS_ENABLED(CONFIG_WIBBLE)) handle_wibble(); } The value will be CONFIG_WIBBLE_ADDR if CONFIG_WIBBLE is defined and will produce a build error if not.. This allows us to reduce the use of #ifdef in the code, ensuring that the compiler still checks the code even if it is not ultimately used for a particular build. Add a CONFIG_IF_ENABLED_INT() version as well. If an attempt is made to use a value that does not exist (i.e. when the conditional is not enabled), an error about a non-existing function is generated, e.g.: common/bloblist.c:447: undefined reference to `invalid_use_of_IF_ENABLED_INT' Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-03scripts/checkpatch.pl: Resync with v5.16Simon Glass2-48/+99
This resyncs us with the version found in v5.16 of the Linux kernel with the following exceptions: - Keep our u-boot specific tests / code area. - Change the location of checkpatch.rst - Drop the "use strscpy" test as we don't have that, but do have strlcpy and want that used now. - Keep debug/printf in the list for $logFunctions This also syncs the spdxcheck.py tool and all the associated documentation. S Signed-off-by: Simon Glass <sjg@chromium.org>
2022-02-03scripts: Makefile: also clean subdir dtcPhilippe Reynes1-1/+1
Since commit 93b196532254 ("Makefile: Only build dtc if needed"), the sub directory scripts/dtc is never cleaned. Adds the directory dtc to subdir to always clean it. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-01-31pylint: Adjust how the output is producedSimon Glass1-215/+226
The current Makefile rule requires there to be a 'Module' line in the pylint output, like this: ************* Module binman.fip_util This line only appears if pylint has some comments about the module. We cannot rely on it for naming. Update the code to instead use the filename as the identifier for each score, so rather than: multiplexed_log 7.49 we output: test_multiplexed_log.py 7.20 It is still easy to see which file the score relates to. In fact the new naming is nicer since the full subdirectories are shown. The avoids the problem where a module name is not produced, and the output gets out of sync. Regenerate pylint.base so we can start from the current baseline. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25introduce CONFIG_DEVICE_TREE_INCLUDESRasmus Villemoes1-0/+3
The build system already automatically looks for and includes an in-tree *-u-boot.dtsi when building the control .dtb. However, there are some things that are awkward to maintain in such an in-tree file, most notably the metadata associated to public keys used for verified boot. The only "official" API to get that metadata into the .dtb is via mkimage, as a side effect of building an actual signed image. But there are multiple problems with that. First of all, the final U-Boot (be it U-Boot proper or an SPL) image is built based on a binary image, the .dtb, and possibly some other binary artifacts. So modifying the .dtb after the build requires the meta-buildsystem (Yocto, buildroot, whatnot) to know about and repeat some of the steps that are already known to and handled by U-Boot's build system, resulting in needless duplication of code. It's also somewhat annoying and inconsistent to have a .dtb file in the build folder which is not generated by the command listed in the corresponding .cmd file (that of course applies to any generated file). So the contents of the /signature node really needs to be baked into the .dtb file when it is first created, which means providing the relevant data in the form of a .dtsi file. One could in theory put that data into the *-u-boot.dtsi file, but it's more convenient to be able to provide it externally: For example, when developing for a customer, it's common to use a set of dummy keys for development, while the consultants do not (and should not) have access to the actual keys used in production. For such a setup, it's easier if the keys used are chosen via the meta-buildsystem and the path(s) patched in during the configure step. And of course, nothing prevents anybody from having DEVICE_TREE_INCLUDES point at files maintained in git, or for that matter from including the public key metadata in the *-u-boot.dtsi directly and ignore this feature. There are other uses for this, e.g. in combination with ENV_IMPORT_FDT it can be used for providing the contents of the /config/environment node, so I don't want to tie this exclusively to use for verified boot. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Fix doc formatting error (make htmldocs) Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25acpi: Allow include files within the board directorySimon Glass1-1/+2
Some .asl files include others using the iasl 'include' directive. This needs to be able to find the files referenced. For an out-of-tree build the source directory is not the current directory. Moreover, U-Boot preprocesses the input file and puts the result in the output directory. So iasl does not know where the real source file came from. Add a -I option to produce the correct behaviour. We could add an option to not preprocess the .asl source, but for now that seems unnecessary. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-25configs: Resync with savedefconfigTom Rini1-2/+0
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-25Makefile: Add a pylint checker to the buildSimon Glass1-0/+215
At present the Python code in U-Boot is somewhat inconsistent, with some files passing pylint quite cleanly and others not. Add a way to track progress on this clean-up, by checking that no module has got any worse as a result of changes. This can be used with 'make pylint'. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Re-generate pylint.base]
2022-01-21Convert CONFIG_AT91_EFLASH to KconfigPatrick Delaunay1-1/+0
This converts the following to Kconfig: CONFIG_AT91_EFLASH Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-01-21configs: Migrate CONFIG_SYS_MAX_FLASH_BANKS to KconfigPatrick Delaunay1-2/+0
Use moveconfig.py script to convert define CONFIG_SYS_MAX_FLASH_BANKS and CONFIG_SYS_MAX_FLASH_BANKS_DETECT to Kconfig and move these entries to defconfigs. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de> [trini: Re-switch to IS_ENABLED check in spi-nor-core.c, re-run migration] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-21spl: Convert SYS_MMCSD_RAW_MODE_KERNEL_SECTOR to KconfigAlexandru Gagniuc1-1/+0
Falcon mode is very useful in improving boot speed. A question that Falcon mode asks is "Where do I look for the kernel". With MMC boot media, the correct answer is CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR. The scope of this patch is to move this to Kconfig. It is possible for a system to support Falcon mode from NOR but not MMC. In that case, mmc_load_image_raw_os() would not be used. To address this, conditionally compile mmc_load_image_raw_os() when SPL_FALCON_BOOT_MMCSD, instead of SPL_OS_BOOT. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Move spl_start_uboot to its own guard in spl_mmc.c, rerun migration] Signed-off-by: Tom Rini <trini@konsulko.com>
2022-01-21Convert CONFIG_TIMESTAMP to KconfigSimon Glass1-1/+0
This converts the following to Kconfig: CONFIG_TIMESTAMP Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-21Convert CONFIG_UDP_CHECKSUM to KconfigSimon Glass1-1/+0
This converts the following to Kconfig: CONFIG_UDP_CHECKSUM Signed-off-by: Simon Glass <sjg@chromium.org>
2022-01-20Merge tag 'doc-2022-04-rc1' of ↵Tom Rini5-12/+12
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request doc-2022-04-rc1 Replace @return by Return: in code comments.
2022-01-19doc: replace @return by Return:Heinrich Schuchardt5-12/+12
Sphinx expects Return: and not @return to indicate a return value. find . -name '*.c' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; find . -name '*.h' -exec \ sed -i 's/^\(\s\)\*\(\s*\)@return\(\s\)/\1*\2Return:\3/' {} \; Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-01-19Merge tag 'xilinx-for-v2022.04-rc1' of ↵Tom Rini1-1/+0
https://source.denx.de/u-boot/custodians/u-boot-microblaze Xilinx changes for v2022.04-rc1 gpio: - Add modepin driver net: - Save random mac addresses to eth variable zynqmp gem: - Add support for mdio bus DT description - Add support for reset and SGMII phy configuration - Reduce timeout for MDIO accesses zynqmp clk: - Fix clock handling for gem and usb phy: - Add zynqmp phy/serdes driver serial: - Add one missing compatible string microblaze: - Symbol alignement - SPL fixups - Code cleanups zynqmp: - Various dt changes, DP pre-reloc, gem resets, gem clocks - Switch SOM to shared psu configuration - Move dcache handling to firmware driver - Workaround gmii2rgmii DT description issue - Enable broadcasts again - Change firmware enablement logic - Small adjustement in firmware driver versal: - Support new mmc@ DT nodes - Fix run time variable handling - Add missing I2C_PMC ID for power domain
2022-01-14checkpatch: report ERROR only on disabling of fdt and initrd relocationHou Zhiqiang1-1/+1
Let the check pass when patches have these patterns in their context. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
2022-01-05microblaze: migrate CONFIG_SYS_USR_EXCEP to KconfigOvidiu Panait1-1/+0
Migrate CONFIG_SYS_USR_EXCEP to Kconfig. Also, rename it to XILINX_MICROBLAZE0_USR_EXCEP in order to match the naming convention of microblaze-generic Kconfig options. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> Link: https://lore.kernel.org/r/20211130163358.2531677-7-ovidiu.panait@windriver.com Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2021-12-28Merge tag 'video-next-20211228' of ↵Tom Rini3-1/+40
https://source.denx.de/u-boot/custodians/u-boot-video into next - various fixes to the sandbox display support - support for showing a logo without splash screen config - support for BMP drawing to depths other than 16bpp - tests for the different types of supported BMP images - support showing a logo when running coreboot via qemu
2021-12-28configs: Resync with savedefconfigTom Rini1-11/+0
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Convert CONFIG_JFFS2_DEV et al to KconfigTom Rini1-4/+0
This converts the following to Kconfig: CONFIG_JFFS2_DEV CONFIG_JFFS2_LZO CONFIG_JFFS2_NAND CONFIG_JFFS2_PART_OFFSET CONFIG_JFFS2_PART_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Convert CONFIG_KIRKWOOD_GPIO to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_KIRKWOOD_GPIO Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Convert CONFIG_SYS_KWD_CONFIG to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_SYS_KWD_CONFIG Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Convert CONFIG_88F5182 et al to KconfigTom Rini1-17/+0
This converts the following to Kconfig: CONFIG_88F5182 CONFIG_BOARD_IS_OPENRD_BASE CONFIG_BOARD_IS_OPENRD_CLIENT CONFIG_BOARD_IS_OPENRD_ULTIMATE CONFIG_D2NET_V2 CONFIG_FEROCEON CONFIG_FEROCEON_88FR131 CONFIG_INETSPACE_V2 CONFIG_KW88F6192 CONFIG_KW88F6281 CONFIG_KW88F6702 CONFIG_NET2BIG_V2 CONFIG_NETSPACE_LITE_V2 CONFIG_NETSPACE_MAX_V2 CONFIG_NETSPACE_MINI_V2 CONFIG_NETSPACE_V2 CONFIG_SHEEVA_88SV131 At this point mv-plug-common.h is now only an include of mv-common.h so remove that indirection. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Kconfig: Remove some symbols from the whitelistTom Rini1-897/+0
There are a number of symbols that are never defined, only referenced in code imported from the Linux kernel or similar. Drop them from the list. Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Convert CONFIG_CPU_SH7751 to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_CPU_SH7751 Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Convert CONFIG_CPU_PXA27X to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_CPU_PXA27X Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Convert CONFIG_83XX_PCICLK to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_83XX_PCICLK Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-28Convert CONFIG_TEGRA_NAND to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_TEGRA_NAND Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-27Convert CONFIG_SD_BOOT et al to KconfigTom Rini1-1/+0
This converts the following to Kconfig: CONFIG_SD_BOOT CONFIG_SD_BOOT_QSPI Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-27x86: coreboot: Add a sample script to build a qemu imageSimon Glass1-0/+19
It is useful to boot coreboot (with U-Boot as a payload) from qemu. Add a sample script to show how to do this. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-27video: Support showing the U-Boot logoSimon Glass1-0/+21
Show the U-Boot logo by default. This is only 7KB in size so seems like a useful default for boards that enable a display. If SPLASH_SCREEN is enabled, it is not enabled by default, so as not to conflict with that feature. Also disable it for tests, since we don't want to complicate the output. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-27video: Convert CONFIG_VIDEO_LOGO to KconfigSimon Glass1-1/+0
This converts the following to Kconfig: CONFIG_VIDEO_LOGO Note that this option depends on CONFIG_DM_VIDEO now, since cfb_console is deprecated. The only relevant code is now in splash.c Drop the check for DM_VIDEO in that file. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-23fdt: Makefile: Ensure that OF_BOARD is used when neededSimon Glass2-0/+43
Boards which define OF_HAS_PRIOR_STAGE must define OF_BOARD at present, since a custom function is the only way to obtain the devicetree at runtime. Add a build error when this requirement is not met, to avoid accepting any patches which break this requirement. Add an allowlist for boards which use it, currently none. This allowlist can be updated for local development, if needed. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: change of_whitelist to of_allowlist] Signed-off-by: Tom Rini <trini@konsulko.com>
2021-12-23fdt: Make it easier to debug u-boot.dtsi filesSimon Glass1-1/+3
At present one must hack the Makefile to see what is going on with these files. Also it doesn't quite work correctly. Fix this by using an environment variable for debugging. Update the docs also. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-12-17Convert CONFIG_PHYSMEM to KconfigSimon Glass1-1/+0
This converts the following to Kconfig: CONFIG_PHYSMEM Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Sean Anderson <seanga2@gmail.com>