summaryrefslogtreecommitdiff
path: root/scripts/Makefile.lib
AgeCommit message (Collapse)Author
2026-03-03kbuild: Drop phandle from diff between base DT and U-Boot augmented DT if ↵Marek Vasut
DEVICE_TREE_DEBUG=1 Remove the "phandle = <0x..>;" properties from the DT diff between unpatched base DT and U-Boot augmented DT if DEVICE_TREE_DEBUG=1. The phandle numbers are only generated by DTC, but not referenced anywhere in the DT, because the original references are specifically not replaced by phandle numbers when recent DTC is invoked with the -I dts -O dts flags . The phandle number are therefore only a noise in the diff, filter them out. Signed-off-by: Marek Vasut <[email protected]> Tested-by: Quentin Schulz <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2026-01-05kbuild: Produce diff between base DT and U-Boot augmented DT if ↵Marek Vasut
DEVICE_TREE_DEBUG=1 In case DEVICE_TREE_DEBUG is set, produce a diff between the base DT and DT with U-Boot extras, to show how much does the U-Boot DT differ from the base DT. This is particularly useful together with OF_UPSTREAM, to minimize the diff between upstream DTs and U-Boot DTs. This requires DTC 1.7.2 which does not resolve phandles when used in the 'dtc -I dts -O dts ...' mode. With older DTC, the diff is full of churn due to the resolved phandles. Example usage: $ make r8a779g3_sparrowhawk_defconfig && make DEVICE_TREE_DEBUG=1 $ cat ./dts/upstream/src/arm64/renesas/r8a779g3-sparrow-hawk.dtb.diff Signed-off-by: Marek Vasut <[email protected]>
2026-01-05scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47cMarek Vasut
Synchronize local copy of DTC with Linux 6.17 . This includes the following picked and squashed commits from Linux kernel. The squash was necessary, since the DTC here contains changes which were also part of DTC in Linux alraedy, and the squash helped resolve those without going back and forth with the changes. The following commits from Linux are picked: 8f324cd712df7 # scripts/dtc: consolidate include path options in Makefile b5b3d9b63b0ee # scripts/dtc: Add yamltree.c to dtc sources 7d97a76f226d6 # scripts/dtc: Update to upstream version v1.4.7-14-gc86da84d30e4 ea6f243be74e5 # scripts/dtc: Update to upstream version v1.4.7-57-gf267e674d145 02d435d4eccd8 # scripts/dtc: Update to upstream version v1.5.0-23-g87963ee20693 6e321b7637396 # scripts/dtc: Update to upstream version v1.5.0-30-g702c1b6c0e73 9f19ec91a7a35 # scripts/dtc: dtx_diff - add color output support 8287d642f38d1 # scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a 4c52deef9225d # scripts/dtc: Revert "yamltree: Ensure consistent bracketing of properties with phandles" 5d3827e1452ed # scripts/dtc: Remove unused makefile fragments 40dd266887654 # scripts/dtc: Update to upstream version v1.6.0-2-g87a656ae5ff9 8d4cf6b6acb59 # scripts/dtc: use pkg-config to include <yaml.h> in non-standard path b9bf9ace5ae90 # scripts/dtc: Update to upstream version v1.6.0-11-g9d7888cbf19c 69a883b6f5ac0 # scripts/dtc: dtx_diff - make help text formatting consistent 8f829108b8aed # scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting b39b4342ac495 # scripts/dtc: Update to upstream version v1.6.0-31-gcbca977ea121 93c6424c486b3 # scripts: dtc: Fetch fdtoverlay.c from external DTC project 0dd574a1d75c3 # scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9 ec38b5df8a231 # scripts: dtc: Build fdtoverlay tool a0c8c431411f5 # scripts: dtc: Remove the unused fdtdump.c file e7dc653d4e890 # scripts/dtc: Add missing fdtoverlay to gitignore d2bf5d2e3f09c # scripts/dtc: Update to upstream version v1.6.1-19-g0a3a9d3449c8 a60878f5532d0 # scripts/dtc: dtx_diff: remove broken example from help text 8b739d8658a9b # scripts/dtc: Call pkg-config POSIXly correct b6eeafa67df00 # scripts/dtc: Update to upstream version v1.6.1-63-g55778a03df61 f96cc4c787588 # scripts/dtc: Update to upstream version v1.6.1-66-gabbd523bae6e 09ab9c092ef2b # scripts/dtc: Update to upstream version v1.7.0-93-g1df7b047fe43 ded8a5a498f2d # scripts/dtc: Update to upstream version v1.7.0-95-gbcd02b523429 ee6ff6fca7e71 # scripts/dtc: Update to upstream version v1.7.2-35-g52f07dcca47c This also includes forward port of U-Boot commit e8c2d25845c7 ("libfdt: Revert 6dcb8ba4 from upstream libfdt") to avoid binary size growth. Signed-off-by: Marek Vasut <[email protected]>
2026-01-02kbuild: Bump the build system to 6.1Sughosh Ganu
Our last sync with the kernel was 5.1. We are so out of sync now, that tracking the patches and backporting them one by one makes little sense and it's going to take ages. This is an attempt to sync up Makefiles to 6.1. Unfortunately due to sheer amount of patches this is not easy to review, but that's what we decided during a community call for the bump to 5.1, so we are following the same guidelines here. Signed-off-by: Sughosh Ganu <[email protected]> Signed-off-by: Ilias Apalodimas <[email protected]>a #rebased on -next
2025-11-10dm: Remove pre-schema tag supportTom Rini
Support for using "u-boot,dm-..." rather than "bootph-..." has been deprecated since February 2023. Any platforms using this have had a console message saying to migrate by 2023.07. Go and remove all support here now, for the v2026.01 release. The results of this change that aren't clear from the above are that we still have a checkpatch.pl error message, and document in doc/develop/spl.rst that they have been migrated since 2023. We also change the key2dtsi.py tool to use the correct bootph phase rather than the legacy phase. Signed-off-by: Tom Rini <[email protected]>
2025-07-08kbuild: Bump the build system to 5.1Ilias Apalodimas
Our last sync with the kernel was 5.1. Even that was a partial one as some patches from 4.x kernels were already missing making the transition to a modern kbuild infeasible. We are so out of sync now, that tracking the patches and backporting them one by one makes little sense and it's going to take ages. This is an attempt to sync up Makefile[.lib/.kbuild]. Unfortunately due to sheer amount of patches this is not easy to review, but that's what we decided during a community call. One of the biggest changes is get rid of partial linking entirely and build .a archives isntead of .o. We diaviate from the kernel on that. Instead of calling a custom script to create the archive symbol table, we call ar with rcTP (isntead of rcSTP) since we want a resulting archive that's sauble with the linker. The only affected platforms are PPC ones. Unfortunately I don't have any of them around to test, but the objdump of the resulting files -- arch/powerpc/lib/built-in.[oa] looks identical. Signed-off-by: Ilias Apalodimas <[email protected]>
2025-06-06Merge patch series "Remove as much arch/arm/dts/*.h as possible"Tom Rini
Tom Rini <[email protected]> says: Taking inspiration from Heiko's patch[1] this series goes and cleans up all of the arch/arm/dts/*.h files that can be easily removed. The big challenge I ran in to here was that for some platforms that aren't using OF_UPSTREAM were didn't have a sufficiently deep search path to find files there rather than arch/arm/dts. This also showed that only ARM had local header files to deal with. [1]: https://lore.kernel.org/u-boot/[email protected]/ Link: https://lore.kernel.org/r/[email protected]
2025-06-06scripts/Makefile.lib: Rework upstream_dtsi_include to get subdirectoriesTom Rini
A problem with the logic in upstream_dtsi_include currently is that it does not list directories such as dts/upstream/src/arm/nxp/imx and so will not findi "imx6ul-pinfunc.h" for example as it is normally and correctly included without vendor sub-paths. Expand the current wildcard glob to catch these directories too. Reviewed-by: Peter Robinson <[email protected]> Signed-off-by: Tom Rini <[email protected]>
2025-05-29Merge patch series "Update kbuild"Tom Rini
Ilias Apalodimas <[email protected]> says: Last time the kbuild scripts were synced with the Linux kernel was on the 4.20 release. Updating directly to 6.x makes the diff difficult to read, so let's do the changes incrementally and bump to 5.1 first. Since the number of commits is big, I am splitting this in multiple series. This one includes most of the commits for Makefile.build, Makefile.lib and some from Makefile. commit eeb5687a7139649e ("kbuild: add -Werror=strict-prototypes flag unconditionally") commit 3812b8c5c5d5 ("kbuild: make -r/-R effective in top Makefile for old Make versions") commit b421b8a6cb87 ("kbuild: remove unused archmrproper") commit 1a49b2fd8f58 ("kbuild: strip whitespace in cmd_record_mcount findstring") commit 88110713ca9dfb ("kbuild: hardcode genksyms path and remove GENKSYMS variable") commit 1d8001ef358 ("kbuild: generate modules.order only when CONFIG_MODULES=y") commit 45c4372d00 ("kbuild: refactor quiet_modtag") commit b39a691617e4 commit ("kbuild: remove redundant quiet_modtag for $(obj-m)") commit 5439f09f488f ("kbuild: remove redundant 'set -e' from cmd_* defines") commit e5d289100d3a ("kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule") commit 3a2429e1faf4 ("kbuild: change if_changed_rule for multi-line recipe") commit ee3e46b7efd2 ("kbuild: refactor modversions build rules") commit 4317ee3b6a5e ("kbuild: remove redundant 'set -e' from sub_cmd_record_mcount") commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files") commit 898f5a009f22 ("kbuild: move archive command to scripts/Makefile.lib") commit b79c6aa6a1f1 ("kbuild: remove unnecessary in-subshell execution") commit afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)") commit ecbd10d90e94 ("kbuild: simplify rules of data compression with size appending") commit 58156ba4468f ("kbuild: skip 'addtree' and 'flags' magic for external module build") commit 172caf1993b7 ("kbuild: remove redundant target cleaning on failure") commit f3fd4a3f3a38 ("kbuild: remove redundant 'set -e' from filechk_offsets") commit a2237fec1e06 ("kbuild: Enable dtc graph_port warning by default") commit 70523a3ce5ff ("kbuild: disable dtc simple_bus_reg warnings by default") commit e4aca4595005 ("kbuild: de-duplicate fixdep usage") Link: https://lore.kernel.org/r/[email protected]
2025-05-29kbuild: move archive command to scripts/Makefile.libIlias Apalodimas
Backport from kernel commit 898f5a009f22 ("kbuild: move archive command to scripts/Makefile.lib") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-29kbuild: remove unnecessary in-subshell executionIlias Apalodimas
Backport kernel changes commit b79c6aa6a1f1 ("kbuild: remove unnecessary in-subshell execution") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-29kbuild: add real-prereqs shorthand for $(filter-out FORCE, $^)Ilias Apalodimas
Backport from kernel commit afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-29kbuild: simplify rules of data compression with size appendingIlias Apalodimas
Backport kernel changes commit ecbd10d90e94 ("kbuild: simplify rules of data compression with size appending") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-29kbuild: skip 'addtree' and 'flags' magic for external module buildIlias Apalodimas
Backport from kernel commit 58156ba4468f ("kbuild: skip 'addtree' and 'flags' magic for external module build") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-29kbuild: remove redundant target cleaning on failureIlias Apalodimas
Bacport from the kernel commit 172caf1993b7 ("kbuild: remove redundant target cleaning on failure") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-29kbuild: remove redundant 'set -e' from filechk_offsetsIlias Apalodimas
Backport changes from the kernel commit f3fd4a3f3a38 ("kbuild: remove redundant 'set -e' from filechk_offsets") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-29kbuild: Enable dtc graph_port warning by defaultIlias Apalodimas
Backport changes from the kernel commit a2237fec1e06 ("kbuild: Enable dtc graph_port warning by default") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-29kbuild: disable dtc simple_bus_reg warnings by defaultIlias Apalodimas
Backport changes from the kernel commit 70523a3ce5ff ("kbuild: disable dtc simple_bus_reg warnings by default") Signed-off-by: Ilias Apalodimas <[email protected]>
2025-05-11scripts/Makefile.lib: add PLATFORM_LIBGCC to efi linkingAdriano Cordova
Link .efi applications using libgcc Signed-off-by: Adriano Cordova <[email protected]>
2025-04-11efi_loader: Move public cert for capsules to .rodataIlias Apalodimas
commit ddf67daac39d ("efi_capsule: Move signature from DTB to .rodata") was reverted in commit 47a25e81d35c ("Revert "efi_capsule: Move signature from DTB to .rodata"") because that's what U-Boot was usually doing -- using the DT to store configuration and data. Some of the discussions can be found here [0]. (Ab)using the device tree to store random data isn't ideal though. On top of that with new features introduced over the years, keeping the certificates in the DT has proven to be problematic. One of the reasons is that platforms might send U-Boot a DTB from the previous stage loader using a transfer list which won't contain the signatures since other loaders are not aware of internal U-Boot ABIs. On top of that QEMU creates the DTB on the fly, so adding the capsule certificate there does not work and requires users to dump it and re-create it injecting the public keys. Now that we have proper memory permissions for arm64, move the certificate to .rodata and read it from there. [0] https://lore.kernel.org/u-boot/CAPnjgZ2uM=n8Qo-a=DUkx5VW5Bzp5Xy8=Wgmrw8ESqUBK00YJQ@mail.gmail.com/ Signed-off-by: Ilias Apalodimas <[email protected]> Tested-by: Jonathan Humphreys <[email protected]> # on TI sk-am62p-lp Tested-by: Neil Armstrong <[email protected]> # on AML-A311D-CC Tested-by: Raymond Mao <[email protected]>
2025-03-17scripts/Makefile.lib: efi: Preserve the .dynstr section as wellSam Edwards
This section is required by .dynamic and llvm-objcopy will exit with a fatal error if it is not also preserved in the output. Signed-off-by: Sam Edwards <[email protected]>
2025-01-17scripts/Makefile.lib: add -L option to LD command for EFI binariesHeinrich Schuchardt
The linker uses the path specified with -L to search for linker scripts and for linker script includes. For out-of-tree builds specify the build directory with -L instead of the absolute path of the linker script. This allows using an INCLUDE statement. Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Heinrich Schuchardt <[email protected]>
2024-09-20kbuild: cherry-pick kbuild fdtoverlay changes from linuxPrasad Kummari
Linux commits: 15d16d6dadf6 kbuild: Add generic rule to apply fdtoverlay 44f87191d105 kbuild: parameterize the .o part of suffix-search The Linux commit 15d16d6dadf6 adds a generic rule in Makefile.lib to automatically apply fdtoverlay, so that each platform doesn't need to include a complex rule. This also automatically appends DTC_FLAGS_foo_base += -@ to all base files The platform's Makefile only needs to have this now: foo-dtbs := foo_base.dtb foo_overlay1.dtbo foo_overlay2.dtbo dtb-y := foo.dtb Signed-off-by: Prasad Kummari <[email protected]> Reviewed-by: Tom Rini <[email protected]> Signed-off-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2024-09-10scripts/Makefile.lib: do not include CONFIG_DEVICE_TREE_INCLUDES in ↵Rasmus Villemoes
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 <[email protected]> Tested-by: Emil Kronborg <[email protected]>
2024-07-18Merge patch series "finish using .dtso for overlay source files"Tom Rini
Rasmus Villemoes <[email protected]> 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 Villemoes
[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 <[email protected]>
2024-07-18kbuild: Allow DTB overlays to built into .dtbo.S filesRasmus Villemoes
[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 <[email protected]>
2024-07-14scripts/Makefile.lib: EFI: Use capsule CRT instead of ESL fileJonathan Humphreys
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 <[email protected]>
2024-07-14scripts/Makefile.lib: fixes: Embed capsule public key in platform's dtbJonathan Humphreys
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 <[email protected]>
2024-06-26scripts/Makefile.lib: remove bootph-some-ram property from VPL/TPL/SPLQuentin Schulz
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-04-17Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAMJonathan Humphreys
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 <[email protected]>
2024-02-29Makefile: Allow upstream DT subtree to provide DT includesSumit Garg
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 <[email protected]> Signed-off-by: Sumit Garg <[email protected]>
2024-02-29scripts/Makefile.lib: Statically define *-u-boot.dtsi files locationSumit Garg
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Signed-off-by: Sumit Garg <[email protected]>
2024-02-29Makefile: Add support for DT bindings schema checksSumit Garg
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 <[email protected]> Tested-by: Simon Glass <[email protected]> Signed-off-by: Sumit Garg <[email protected]>
2023-12-31Makefile: Use the fdtgrep -u flagSimon Glass
Use this flag so that the bootph binding is obeyed correctly. Add a comment about what is going on. Signed-off-by: Simon Glass <[email protected]> Fixes: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/12 Reviewed-by: Tom Rini <[email protected]>
2023-12-05scripts/Makefile.lib: print error when no public key is specifiedMasahisa Kojima
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 <[email protected]> Reviewed-by: Weizhao Ouyang <[email protected]>
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 <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
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 <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Reviewed-by: Tom Rini <[email protected]>
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 <[email protected]> Reviewed-by: Tom Rini <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
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/[email protected]/ Signed-off-by: Rasmus Villemoes <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
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 <[email protected]> Version 4: Acked-by: Michal Simek <[email protected]>
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 <[email protected]> Cc: Ilias Apalodimas <[email protected]> Signed-off-by: Tom Rini <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]>
2022-07-13efi_loader: suppress executable stack warningHeinrich Schuchardt
When linking EFI binaries the linker emits: ld.bfd: warning: lib/efi_loader/efi_crt0.o: missing .note.GNU-stack section implies executable stack Suppress the warning. Signed-off-by: Heinrich Schuchardt <[email protected]>
2022-06-06scripts: Introduce {quiet_,}cmd_bin2cPierre-Clément Tosi
Add a make command to compile binary files as C data through bin2c with $(call,bin2c,<data_name_prefix>) Note that this requires BUILD_BIN2C=y. Cc: Simon Glass <[email protected]> Signed-off-by: Pierre-Clément Tosi <[email protected]>
2022-05-02Introduce Verifying Program Loader (VPL)Simon Glass
Add support for VPL, a new phase of U-Boot. This runs after TPL. It is responsible for selecting which SPL binary to run, based on a verified-boot process. Signed-off-by: Simon Glass <[email protected]>
2022-04-12Makefile.lib: Re-use $(UBOOTINCLUDE) in dtc_cpp_flagsAndy Shevchenko
As in ASL case use same basic set of the inclusions. Signed-off-by: Andy Shevchenko <[email protected]>
2022-02-25scripts: Makefile.lib: generate dsdt_generated.c instead of dsdt.cPhilippe Reynes
There is a conflict between the static file lib/acpi/dsdt.c and the file dsdt.c generated dynamicaly by scripts/Makefile.lib. When a mrproper is done, the static file dsdt.c is removed. If a build with acpi enabled is launched after, the following error is raised: CC lib/acpi/acpi_table.o make[2]: *** No rule to make target 'lib/acpi/dsdt.asl', needed by 'lib/acpi/dsdt.c'. Stop. scripts/Makefile.build:394: recipe for target 'lib/acpi' failed To avoid such error, the generated file is named dsdt_generated.c instead of dstdt.c. Signed-off-by: Philippe Reynes <[email protected]> Tested-by: Heiko Thiery <[email protected]>
2022-01-25introduce CONFIG_DEVICE_TREE_INCLUDESRasmus Villemoes
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 <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]> Fix doc formatting error (make htmldocs) Signed-off-by: Simon Glass <[email protected]>