summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot
AgeCommit message (Collapse)Author
2024-04-18u-boot-distro-boot: set kernel cmdline using APPEND variableFrancesco Dolcini
Do not depend on U-Boot environment for setting the Linux kernel command line from the boot script. Use standard APPEND variable to specify the kernel command line, stop using ${defargs}, ${setup} and ${vidargs} from U-Boot environment. APPEND is the standard OE variable to set the kernel command line, it is for example used in OE-core rootfs-postcommands.bbclass to add "ro" to the command line and part of the official documentation. U-Boot ${tdxargs} is still supported and its content is added to the command line. Remove consoleblank=0 since this is already the kernel default. Link: https://docs.yoctoproject.org/dev/kernel-dev/faq.html#how-do-i-change-the-linux-kernel-command-line Related-to: ELB-5619 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2024-04-08u-boot-toradex: remove stale patchEmanuele Ghidoli
The removed patch is relevant to the downstream colibri-imx7 kernel which is no longer supported. Related-to: ELB-5611 Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> (cherry picked from commit 8f7abc1ea1a1dff9192894acb3b874013802f4eb) Conflicts: recipes-bsp/u-boot/u-boot-toradex_2022.07.bb
2024-04-08u-boot-toradex-imx: cope with of_upstreamMax Krummenacher
CONFIG_OF_UPSTREAM=y uses device sources directly out of the linux source tree. The location of the dtb artefacts change depending on OF_UPSTREAM used or not. Check for OF_UPSTREAM and pick the dtb file from the used location. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2024-03-28u-boot-toradex: mainline: Remove HUSH_OLD_PARSER cfg fragmentFrancesco Dolcini
The problematic change was reverted in mainline, commit 3c3a73424e6d ("Revert "cmd: Set modern hush as default shell""), remove the workaround so we know in case it break again. Related-to: ELB-5543 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2024-03-04u-boot-toradex-common: explicitely add u-boot to providesMax Krummenacher
At least imx-boot requires u-boot. Bitbake would thus not consider our upstream U-Boot recipe as a valid provider and the build will fail for machines not using binman within U-Boot to build the boot container. So the change is required once we start building the upstream U-Boot for Apalis iMX8 and Colibri iMX8X. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2024-01-29u-boot-toradex: add binman dependencies for tiboot3Max Krummenacher
To build tiboot3 binman uses additional python modules. Add them to the dependencies. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2024-01-11u-boot-toradex: mainline: workaround hush parser changesMax Krummenacher
U-Boot mainline after v2024.01 has a new hush parser added with by default is used, however we have the option to still use the old one. Our boot script fails with the new parser, thus change the u-boot config to keep our master builds working. Related-to: ELB-5543 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-11-29u-boot-toradex: Backport patch to fix Colibri iMX7S U-Boot errorHiago De Franco
The following error was spotted during the boot of Colibri iMX7S on Tezi 6: ``` U-Boot 2022.07-6.4.0-devel+git.e092e3250270 (Jul 11 2022 - 13:42:58 +0000) CPU: Freescale i.MX7S rev1.2 800 MHz (running at 792 MHz) CPU: Extended Commercial temperature grade (-20C to 105C) at 29C Reset cause: POR DRAM: initcall sequence 8786b820 failed at call 87818e09 (err=-3) \### ERROR ### Please RESET the board ### ``` This patch solves this issue by calling fdt_increase_size() on colibri_imx7.c file. Related-to: TEI-1138 Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> (cherry picked from commit 30484414981f3652caf43a0a71b3922e269a643b)
2023-11-29u-boot-toradex: Add patches for fastboot supportHiago De Franco
This commit introduces patches to the defconfig of Apalis/Colibri iMX6, Colibri iMX7 and Colibri iMX6ULL to enable fastboot support and adds a logic to the bootcmd to select SDP or Fastboot based on the configs enabled. Related-to: TEI-1136 Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> (cherry picked from commit 266bdf4d7b1ce31bcbc35dd92f52ca45c60eadba)
2023-11-29u-boot-toradex: Add patch to fix build errorsHiago De Franco
Add a patch to fix device tree build errors from other boards that are not related to Colibri. Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> (cherry picked from commit b49784d54dbdc8532fc87c163f951ebff3073701)
2023-11-29u-boot-toradex: Remove nand_padding functionHiago De Franco
The last commit [0cdb7f9e] removed the need of the 'nand_padding' function within our recipes, so remove it. Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> (cherry picked from commit 97ac673d8e85079e6803246aace7165752ffacd2)
2023-11-29u-boot-toradex: Backport mainline patches for nand paddingHiago De Franco
This commit backports two patches submitted to the U-Boot mainline, both of which relocate the 'nand_padding' function to the Makefile of 'mach-imx.' The first patch introduces the 'u-boot-nand.imx' target to the Makefile, producing a binary file with 1024 leading zeros. The second patch adds a 'dd' command to the Makefile, appending 10k zeros to the end of the binary. These changes will eliminate the need of the 'nand_padding' function. Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> (cherry picked from commit 678579d8783e2d24666ca1b6af58544f67579aa0)
2023-11-29u-boot-toradex: Fix missing upstream-statusHiago De Franco
Fix missing Upstream-Status tag on recently merged patch. Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> (cherry picked from commit af82ccce6b01f2f282cc2149f1bbbaf43e14de7a)
2023-11-29u-boot-toradex: Add patch for imx7 variant detectionHiago De Franco
Add patch to enable variant detection durint boot time. Depending on the board configuration, the variant will be set to "-emmc" or cleared in case it is a NAND device. This patch improves variant detection during system initialization through USB recovery mode. Related-to: TEI-1112 Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> (cherry picked from commit 16e5f73b2b294855fe579e8252b149154bdb7322)
2023-10-16u-boot-toradex: upstream: ti: fix dependenciesMax Krummenacher
Follow meta-ti downstream dependency change on ti-sci-fw and change to do the atf, dm, optee dependency through packageconfig. See also commits: 22b8a0a3 ("recipes-bsp:ti-sci-fw: Add k3r5 as COMPATIBLE_MACHINE") 69056610 ("recipes-bsp: u-boot-ti.inc: Remove ti-sci-fw from DEPENDS for k3 machine") ti-sci-fw is only needed for the k3r5 build, removing it from k3 fixes: | ERROR: Nothing PROVIDES 'ti-sci-fw' (but .../meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-toradex_mainline.bb DEPENDS on or otherwise requires it) | ti-sci-fw was skipped: incompatible with machine verdin-am62 (not in COMPATIBLE_MACHINE) ti-dm-fw is only needed for the k3 build, removing it fixes errors during recipe parse, e.g.: | ERROR: Nothing RPROVIDES 'ldconfig' (but mc:k3r5:.../openembedded-core/meta/recipes-devtools/dpkg/dpkg_1.22.0.bb RDEPENDS on or otherwise requires it) Related-to: ELB-5428 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-09-25u-boot-toradex: fix override for imx based socMax Krummenacher
The correct override matching all i.MX based machines is now imx-generic-bsp, not imx. Fix that. Fixes 7a2d6ff ("u-boot-toradex: split into a release/pinned and latest head recipe") Related-to: ELB-5357 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-09-21u-boot-toradex: split into a release/pinned and latest head recipeMax Krummenacher
This reduces confusion about the current solution on what version gets built with use-head-next. This drops using the `use-head-next` override in favour of having two recipes. Which recipe is to be built will then be set in the various <machine.conf> files. To reduce code duplication split out common code into a inc file and further split out i.MX and TI specific stuff into two specific inc files. Related-to: ELB-5357 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-09-21u-boot-toradex: do not deploy u-boot-with-spl.imx binaryHiago De Franco
Stop deploying u-boot-with-spl.imx, this is not required to properly flash the board nor for debugging. Separated SPL and U-Boot proper binaries available, used by Tezi and can be easily flashed using update_uboot and update_spl helper scripts. This enables some simplification on Tezi. Signed-off-by: Hiago De Franco <hiago.franco@toradex.com> (cherry picked from commit 81a446adde4296c7e68f916bc536414a1caa1397)
2023-09-05u-boot-toradex: colibri-imx7: drop support booting a downstream kernelMax Krummenacher
We no longer provide a kernel based on the NXP downstream BSP. Drop patching U-Boot to support booting such a kernel on a Colibri iMX7. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-09-05u-boot-toradex: verdin-am62: integrate binman firmware and deploy artifactsMax Krummenacher
This enables building upstream U-Boot for Verdin AM62 including building and deploying tiboot3 and tispl with binman. Related-to: ELB-5331 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-09-05u-boot-toradex: simplify use with imx-boot-container.bbclassMax Krummenacher
The class now handles to provide an imx-boot symlink to flash.bin. Also drop redundant entries in DEPENDS which are now part of the generic u-boot include file. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-08-07u-boot-toradex_2022.07: force master branchMax Krummenacher
U-Boot release 2023.07 branched away from the master branch which is reflected in OE u-boot recipe. Switch this back to the master branch, so that for use-head-next we take latest on master rather than latest on branch u-boot-2023.07.y. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-07-10u-boot-distro-boot: make use of the machine.conf provided varMax Krummenacher
With the kernel moving 32 bit device trees in subdirectories starting with kernel 6.5 the toradex machine configuration files provide the variable KERNEL_DTB_PREFIX. The fit image configuration name is constructed from KERNEL_DTB_PREFIX plus the dtb file name. Make use of the KERNEL_DTB_PREFIX variable to construct the configuration used for booting. As we now also set KERNEL_DTB_PREFIX for the 64 bit machines the inline python works for all machines, thus drop the DTB_PREFIX overrides. Related-to: ELB-5262 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2023-06-28u-boot-toradex_2022.07: fix colibri-imx6 ddr ram settingsStefan Eichenberger
Add a patch to fix a DDR RAM issue that can cause bit flips at temperatures above 60°C. Related-to: ELB-5211 Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com> (cherry picked from commit 63e4e72c5c71d510106c6504074697c30d396e47)
2023-04-04u-boot-distro-boot: boot.cmd.in: fix fitimage boot failureMing Liu
Since commit 4f16c57dda5f49cef1648ba829d9bf10cb4010dc: [ u-boot: distro-boot-script: support booti automatic decompression ] For the boards that support "booti automatic decompression", the kernel_addr_load had been set to ${loadaddr} rather than ${ramdisk_addr_r} for fitImage, this is breaking fitImage boot due to overlapping DTB/DTBO addresses. Change it back to boot from ${ramdisk_addr_r} for fitImage. Signed-off-by: Ming Liu <ming.liu@toradex.com> (cherry picked from commit 4d6e71f6b40415841d402afdbd54c9c89adf10f5)
2023-04-04u-boot-distro-boot: introduce KERNEL_DTB_PREFIX for i.MX8 machinesMing Liu
Not like ARM machines, which the devicetrees locate at arch/arm/boot/dts in kernel source and the devicetree names directly built into fitImage by bitbake. For i.MX8 machines instead, the devicetrees locate at a vendor specific subdirectory, take NXP as a example, they are under arch/arm64/boot/dts/freescale, so bitbake builds them into fitImage also with a "freescale_" prefix to the real devicetree name. We should distinguish these two situations in boot.scr, let's introduce a variable KERNEL_DTB_PREFIX to achieve that, and set it to "freescale_" for i.MX8 machines. Signed-off-by: Ming Liu <ming.liu@toradex.com> (cherry picked from commit f22922827754e40a0cbdbd929826b13e68e0a6c7)
2023-02-27boot.cmd.in: fix setupargs fallbackMax Krummenacher
When setupargs is not already set we set it using a fallback. Remove escaping of the value set as we do want variables evaluated here. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> (cherry picked from commit 66b323f88297c78eadf3e014d26aca2edf484204)
2023-02-27u-boot-toradex_2022.07: Fix colibri-imx7 bad block table in flashStefan Eichenberger
Add patch to use the in band bad block table on Colibri iMX7. Related-to: ELB-4989 Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com> (cherry picked from commit 86e64d70123b2ff55924ec6581c6154e628f661b)
2022-12-09u-boot-toradex_2022.07: improve deploy of u-boot-with-spl.imxStefano Viola
The u-boot-with-spl.imx binary, now is deployed for each u-boot configuration type and the condition that suppressed the error in case u-boot-with-spl.imx was not generated has been removed. Signed-off-by: Stefano Viola <stefano.viola@toradex.com> (cherry picked from commit 15ec9fe118984cc977016269c069571c4530ef8f)
2022-10-02u-boot-toradex_2022.07: update env memory layoutMarcel Ziswiler
Update the distro config env memory layout for the Apalis iMX6, Colibri iMX6, Colibri iMX6ULL and Colibri iMX7. This fixes a potential issue caused by the compressed kernel being relocated on top of the ramdisk causing its corruption. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> (cherry picked from commit 84c7638a7261561e30bfd574b69e1fddcac546cc)
2022-09-24u-boot-toradex_2022.07: Fix verdin-imx8mp memory sizeFrancesco Dolcini
Add patch to properly size the memory on Verdin iMX8M Plus. Related-to: ELB-4711 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> (cherry picked from commit 6931dff87db18d38a14414fe35ef49805bcf5238)
2022-08-30u-boot-toradex: use a unified environment file nameMax Krummenacher
Keep the file name with the inital U-Boot environment variables constant, independent of the recipe name U-Boot is built with. Our image creation and libubootenv expect a fixed name. Related-to: ELB-4680 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-08-29u-boot-toradex: move patches in the correct directoryFrancesco Dolcini
Fix build issue with patches not found Relates-to: ELB-4680 Fixes: 7ad862bbbaaf ("u-boot: convert bbappend into our own recipe") Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-08-29u-boot: convert bbappend into our own recipeMax Krummenacher
The version mismatch between what we want to build and what the recipe in openembedded-core builds can get big so that CVE backports and other changes makes our build fail. Rather create our own recipe reusing the include file from openembedded-core to reduce the risk of build failures. Relates-to: ELB-4680 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-08-22u-boot: distro-boot-script: support booti automatic decompressionMarcel Ziswiler
Support booti automatic decompression with the following memory layout: - loadaddr=0x48200000 allows for 128MB area for uncompressing (ie FIT images, kernel_comp_addr_r, kernel_comp_size) - fdt_addr_r = loadaddr + 128MB - allows for 128MB kernel - scriptaddr = fdt_addr_r + 512KB - allows for 512KB fdt - ramdisk_addr_r = scriptaddr + 512KB - allows for 512KB script Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-08-08meta: drop tk1/tegra/vf machine referencesMing Liu
We've decided not maintain these machines in BSP6, let's drop the machine references. There is a special varialbe UBOOT_KERNEL_TYPE, it's only being used by apalis-tk1 machine, so also drop it. Related-to: ELB-4471 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2022-08-08u-boot: Add patch to enable `boot` on colibri-imx7Francesco Dolcini
Add patch to enable `boot` command on colibri-imx7, submitted in https://lore.kernel.org/all/20220803112009.271563-1-francesco.dolcini@toradex.com/ Related-to: ELB-4642 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-08-03u-boot: Update patches adding config block refactoringFrancesco Dolcini
Update U-Boot v2022.07 patches, backport `board/toradex` patches from current denx/master git. This updates the config block interactive creation procedure. Related-to: ELB-4626 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-08-03u-boot: drop lzop-native from DEPENDSMing Liu
lzop-native is not needed during u-boot compilation since LZO compression is not enabled in u-boot. Related-to: ELB-4534 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2022-07-27u-boot: remove already present patchFrancesco Dolcini
Remove patch 0005-toradex-tdx-cfg-block-add-0068-i.mx-8m-mini-sku.patch from the patches applied when building master, since it is now merged with commit a2da29a4e2a0 ("toradex: tdx-cfg-block: add 0068 i.mx 8m mini sku"). Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2022-07-26libubootenv: move in fw_env.configMing Liu
Currently we have downstream/upstream Toradex uboot recipes and we dont want to add fw_env.config for both of them to avoid code redundant. Let's add fw_env.config to libubootenv, which will be installed for both donwstream/upstream distros. Change libubootenv to a machine arch recipe since now it has machine specific fw_env.config files. Related-to: ELB-4536 Signed-off-by: Ming Liu <ming.liu@toradex.com>
2022-07-20u-boot: keep inheriting toradex versioningMax Krummenacher
The class makes sure that we see the git hash the U-Boot is built from in the U-Boot banner. Related-to: ELB-4090 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-07-18u-boot: remove already present patchMax Krummenacher
oe-core now applies 0001-i2c-fix-stack-buffer-overflow-vulnerability-in-i2c-m.patch fixing a CVE in 2022.01. As we bumped to 2022.07 the commit is already applied and applying it a second time makes do_patch fail. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-07-14u-boot: apply patches not currently in v2022.07Max Krummenacher
Apply patches needed for Toradex SoM which were applied after v2022.07 or are still in flight. xxxxxxxxxxx toradex: tdx-cfg-block: add 0068 i.mx 8m mini sku 1cf4e79f577 toradex: tdx-cfg-block: add new toradex oui range 7e27ce16c5d toradex: tdx-cfg-block: extend assembly version 494ef10c3bf toradex: tdx-cfg-block: use defines for string length 39ff0624bc5 toradex: tdx-cfg-block: use only snprintf Related-to: ELB-4601 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-07-14u-boot: base on v2022.07Max Krummenacher
Note that once in openembedded-core u-boot is bumped to v2022.07 the LIC_FILES_CHKSUM and PV change can be dropped. Related-to: ELB-4600 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-07-12u-boot: colibri-imx7: forward port patchMax Krummenacher
With master @ Jul 11, 36b661dc colibri-imx7.h got changed, so that the patch no longer applies. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-07-05u-boot-toradex: deploy u-boot-with-spl.imx for imx6Stefano Viola
The u-boot-with-spl.imx binary (if available), will be copied in the DEPLOYDIR for MACHINE colibri-imx6 and apalis-imx6. This binary is needed to implement bootloader software update where having only one binary instead of SPL + u-boot.bin simplifies things especially in the cloud platform side. Signed-off-by: Stefano Viola <stefano.viola@toradex.com> (cherry picked from commit meta-toradex-nxp e3461a0b4d163ab5dff0d8368028586a260ddbed)
2022-06-08u-boot: distro-boot-script: fix ordering of console argumentsPhilippe Schenker
systemd only prints to the last console= statement that it finds in the kernel arguments. Make sure that it prints to UART instead of display on tty1. Related-to: ELB-4435 Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com> (cherry picked from commit 7bf3a4432c4d329c2b291440d51c03d89e6116ff)
2022-04-26u-boot: bbappend: allow to build boot container from u-bootMax Krummenacher
U-Boot mainline can build the boot container (imx-boot) from within the U-Boot tree. In OE this can be enabled with the following override: imx-boot-container. (imx-base.inc then sets: UBOOT_PROVIDES_BOOT_CONTAINER) However currently this provides the binary as flash.bin, so we add here to deploy it additionally under the old name imx-boot Amend the recipe to allow to enable this. Related-to: ELB-4243 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2022-04-26u-boot: forward port patchMax Krummenacher
Forward port the patch, currently for use-head-next only. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>