Commit Graph

36 Commits

Author SHA1 Message Date
Chris Dimich
86d87085ea board/freescale/common/imx: add support for i.MX 8ULP
Signed-off-by: Chris Dimich <cdimich2188@gmail.com>
[Arnout: remove newly introduced shellcheck errors]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-07-12 09:14:47 +02:00
Martin Whitaker
baaf7f738a board/freescale/common/imx/imx8-bootloader-prepare.sh: fix FIT external position
When using imx-mkimage 6.1.36_2.1.0 or later, an additional data structure
is inserted in the generated image. The FIT external data position passed
to the uboot mkimage program needs to be adjusted accordingly.

Fixes: https://bugs.busybox.net/show_bug.cgi?id=15973
Fixes: 72de789023 ("package/imx-mkimage: bump version to lf-6.1.36-2.1.0")
Tested-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
[Sébastien: Tested on i.MX8MM EVK and i.MX8MP EVK]
[Sébastien:
 - fix subject
 - add Tested-by tag
 - fix Fixes tags
]
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2024-06-04 15:25:21 +02:00
Wojciech Nizinski
4a1bcbe17e board/freescale/common/imx/imx8-bootloader-prepare.sh: enable error checking
Run script with 'errexit' bash option to detect any errors from
subcommands.

It will fix situation where 'ddr_fw.bin' was missing but successfull
build created broken boot image. Post image script report this by:

cat: /home/user/buildroot/output/images/ddr_fw.bin: No such file or directory

and build finish with success.

Signed-off-by: Wojciech Nizinski <wojciech.nizinski@grinn-global.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-04-03 23:07:33 +02:00
Julien Olivain
6c455505eb board/freescale: imx9-bootloader-prepare.sh: fix script
Commit c05f27c "configs/freescale_imx93evk: new defconfig", when
applied, added few ShellCheck fixups on top of the orginial
submission. During those changes, one extra backslash was added,
making the imx9-bootloader-prepare.sh fail.

This commit fixes the issue by removing this extra backslash.

Fixes:

    dd: failed to open '/buildroot/output/images/u-boot-atf-container.img': No such file or directory
    make: *** [Makefile:820: target-post-image] Error 1

Signed-off-by: Julien Olivain <ju.o@free.fr>
Reviewed-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Tested-By: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-02-14 10:03:55 +01:00
Sébastien Szymanski
c05f27c8ae configs/freescale_imx93evk: new defconfig
This patch adds support for the NXP i.MX 93 11x11 EVK board [1].

[1] https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/i-mx-93-evaluation-kit:i.MX93EVK

Reviewed-by: Julien Olivain <ju.o@free.fr>
Tested-by: Julien Olivain <ju.o@free.fr>
[Julien: tested on NXP board i.MX93EVK, cpu rev A1, board rev B]
Reviewed-by: Gary Bisson <bisson.gary@gmail.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
[Arnout:
 - Fix shellcheck errors.
 - Add hash files for ATF, linux, U-Boot.
]
Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-02-12 22:44:37 +01:00
Arnout Vandecappelle
202e35e4b6 board/freescale/common/imx/post-image.sh: fix shellcheck errors
This file has many shellcheck errors. Fix them as reported by
shellcheck.

Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
2024-02-12 22:11:50 +01:00
Stefan Nickl
beb74069ef package/freescale-imx: add BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL
This commit adds support for the i.MX8DXL SoC from NXP, by adding a
new BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL and propagate its
support in the affected packages.

Signed-off-by: Stefan Nickl <Stefan.Nickl@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-08-06 19:34:37 +02:00
Bram Vlerick
81aa9e7b8b board/freescale/common/imx: align u-boot-spl to 4 bytes
When enable DM for SPL binary, the DTB part of SPL may not 4 bytes aligned.
If u-boot-spl is not aligned, the offset of the DDR firmware is not 4
byte aligned when u-boot-spl-ddr.bin is created. This causes the ddr
firmware to not be loaded correctly at boot.

See imx-mkimage commit
https://source.codeaurora.org/external/imx/imx-mkimage/commit/?id=bba038d893046b44683182dba540f104dab80fe7
for the imx-mkimage details.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-23 23:29:19 +02:00
Thomas Perrot
7a9cf5d308 board/freescale/common/imx: add TEE support in imx8-bootloader-prepare
When BR2_TARGET_OPTEE_OS=y, mkimage_fit_atf.sh is executed with two additional
variables so that the ITS file contains an additional node for the TEE binary.

Then the TEE binary will be packaged into the ITB in addition to TF-A and
U-Boot.

Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-05-02 23:40:23 +02:00
Fabio Estevam
0351a60b95 board/freescale/common/imx: place rootfs at proper offset when BR2_LINUX_KERNEL_INSTALL_TARGET=y
Currently, when BR2_LINUX_KERNEL_INSTALL_TARGET=y is selected, issuing
a "saveenv" command in the U-Boot prompt may lead to rootfs corruption.

When BR2_LINUX_KERNEL_INSTALL_TARGET is not selected, then
board/freescale/common/imx/genimage.cfg.template is used as per the logic
inside board/freescale/common/imx/post-image.sh.

board/freescale/common/imx/genimage.cfg.template correctly puts the
rootfs at a safe offset.

With BR2_LINUX_KERNEL_INSTALL_TARGET=y, then
board/freescale/common/imx/genimage.cfg.template_no_boot_part or
board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
are used and no offset to the rootfs is given, which may cause U-Boot
environment area to write into the rootfs area, causing the rootfs
corruption.

Avoid this problem by placing the rootfs at an 8MB offset, just like
it is done in board/freescale/common/imx/genimage.cfg.

Tested on a imx6qp-wandboard and also on a custom imx6ull based board.

"saveenv" does not corrupt the rootfs anymore after this change.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-11-14 15:15:14 +01:00
Hanspeter Portner
b8591dd3e1 board/freescale: add support for Image.gz to post-image
For the i.MX8 often an Image.gz is built. With these changes, if
BR2_LINUX_KERNEL_IMAGEGZ=y, the correct Image.gz file is now put into
the generated image instead of falling back to the non-existent zImage.

Signed-off-by: Hanspeter Portner <dev@open-music-kontrollers.ch>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-09-18 08:54:58 +02:00
Fabio Estevam
63198aaa17 imx/post-image.sh: support BR2_LINUX_KERNEL_INSTALL_TARGET=y for non-SPL
Currently, only SPL is supported when BR2_LINUX_KERNEL_INSTALL_TARGET=y
is selected.

Support non-SPL case too.

This is needed for booting imx7d-sabresd, for example.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Pierre-Jean Texier <texier.pj2@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-07-19 23:32:32 +02:00
Stephane Viau
9a81868c54 board/freescale/common/imx: add support for i.MX 8M Plus
Almost identical as i.MX 8M Nano, with a couple of differences:
- different ATF load address [1]
- different entry point [2]

[1] e8e2703a30
[2] https://source.denx.de/u-boot/u-boot/-/blob/v2021.04-rc4/configs/imx8mp_evk_defconfig#L14

Signed-off-by: Stephane Viau <stephane.viau@oss.nxp.com>
Reviewed-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-03-27 14:16:12 +01:00
Thomas Petazzoni
a6569f2b3d Merge branch 'next'
A few conflicts had to be resolved:

 - Version number and hash for mesa3d-headers/mesa3d
 - Patches added in qemu, and the qemu version number
 - The gnuconfig README.buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-06-02 21:59:52 +02:00
Stephane Viau
96fc4e47ea board/freescale/common/imx: add support for i.MX8M Nano
Signed-off-by: Stephane Viau <stephane.viau@oss.nxp.com>
Reviewed-by: Maeva Manuel <maeva.manuel@oss.nxp.com>
Reviewed-by: Julien Olivain <julien.olivain@oss.nxp.com>
Reviewed-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-05-29 23:38:22 +02:00
Stephane Viau
798853245b board/freescale/common/imx: use generic ddr_fw.bin name
For some SoCs (i.e.: i.MX8M Nano for now), the DDR training firmware
in the boot image depends on the type of memory installed on a board
(LPDDR4, DDR4, etc...). The previous patch makes this firmware name
agnostic of the DDR type and uses ddr_fw.bin as a generic name. This
patch makes imx8-bootloader-prepare.sh use this generic name,
independently of the kind board DDR type.

Signed-off-by: Stephane Viau <stephane.viau@oss.nxp.com>
Reviewed-by: Maeva Manuel <maeva.manuel@oss.nxp.com>
Reviewed-by: Julien Olivain <julien.olivain@oss.nxp.com>
Reviewed-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-05-29 23:38:22 +02:00
Fabio Estevam
7d804aba66 board/freescale: increase the vfat size
The default iamge size is 32MiB, which is quite low by today's standards.
Besides, the AArch64 kernels are relatively big, which leaves not much
room, if at all, for users to experiment on the default image.

Increase the vfat size to a more reasonable 64MiB.

Note that users who derive an in-tree defconfig for their own case will
allways hit any arbitarary size we put here, so they will anyway have to
also derive this template for their own use-cases.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-05-26 23:15:17 +02:00
Gary Bisson
eb8b6ee456 board/freescale/common/imx: add support for i.MX8M Nano
Almost identical as i.MX8M Mini, here are the differences:
- different ATF load address [1]
- different entry point [2]
- different ROM version (v2) [3]

[1] https://gitlab.denx.de/u-boot/u-boot/-/blob/v2020.04/board/freescale/imx8mn_evk/README
[2] https://gitlab.denx.de/u-boot/u-boot/-/blob/v2020.04/configs/imx8mn_ddr4_evk_defconfig#L22
[3] https://gitlab.denx.de/u-boot/u-boot/-/commit/b8f16834

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-18 15:31:42 +02:00
Fabio Estevam
a52ab35dce board/freescale: specify the volume-label for FAT partition
Currently the volume-label for the vfat partition is a string with
the following pattern: 5934-861D.

Specify the volume-label as "boot" to make it easier to identify it.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-04-15 22:49:00 +02:00
Thomas Petazzoni
538940be38 board/freescale: use correct ahab-container.img file name
Commit 3f8ace0028
("board/freescale/common/imx: add support for i.MX8") had its
conflicts incorrectly tweaked when applied to Buildroot. The
ahab-container.img is installed with this name (ahab-container.img) by
the imx-firmware package, and not mx8qm-ahab-container.img or
mx8qx-ahab-container.img.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Julien Olivain <juju@cotds.org>
Tested-by: Julien Olivain <juju@cotds.org>
Reported-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-02-26 22:27:59 +01:00
Maeva Manuel
3f8ace0028 board/freescale/common/imx: add support for i.MX8
Signed-off-by: Maeva Manuel <maeva.manuel@nxp.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2020-02-05 12:25:29 +01:00
Julien Olivain
d130f0a837 board/freescale/common/imx: use nodtb variant in uboot images for 8M
In board/freescale/common/imx/imx8-bootloader-prepare.sh, when
invoking mkimage_fit_atf.sh, the U-Boot DTB is passed as parameter, to
be included in the FIT image. This parameter usually comes from
BR2_ROOTFS_POST_SCRIPT_ARGS config option. The variable
BL33=u-boot.bin set in the invocation uses the u-boot image which is
including its embedded DTB. This means the U-Boot DTB is included
twice.

The upstream script mkimage_fit_atf.sh plus its Buildroot patch are
meant to use by default the nodtb variant and use the DTB in a
separate image. See [1] and [2].

The U-Boot default DTB which will be included in u-boot.bin image is
selected with U-Boot CONFIG_DEFAULT_DEVICE_TREE, or DEVICE_TREE
variable when invoking "make". If one of those option is not aligned
to the BR2_ROOTFS_POST_SCRIPT_ARGS config option, it's possible the
two included U-Boot DTBs are different. If such case happens, the
built-in DTB is always used, regardless of the other one, selected
with BR2_ROOTFS_POST_SCRIPT_ARGS.

For example, this case happens for TechNexion Pico Pi i.MX8M and
i.MX8MMini. Since the U-Boot defconfig assumes the nodtb version will
be used, it does not set the default DTB. The u-boot.bin will include
the fsl-imx8mm-evk instead. Including the wrong board DTB breaks the
USB and UMS commands (and possibly others). Since those boards does
not have SD card slots, a recovery serial download is needed at every
update.

This patch make sure that only the separate U-Boot DTB will be
included in the FIT image by using the nodtb variant.

[1] https://source.codeaurora.org/external/imx/imx-mkimage/tree/iMX8M/mkimage_fit_atf.sh?h=rel_imx_4.14.98_2.0.0_ga#n35
[2] https://git.busybox.net/buildroot/tree/package/imx-mkimage/0001-add-support-for-overriding-bl32-and-bl33-not-only-bl.patch?h=2019.11#n42

Signed-off-by: Julien Olivain <juju@cotds.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-12-24 14:24:43 +01:00
Joris Offouga
f97d69b2ac board/freescale: Fix wrong config for u-boot.img
Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-07-10 22:18:46 +02:00
Joris Offouga
4f9f3a0e96 board/freescale: Introduce UBOOTBIN in spl genimage templates
For boards like imx7d-pico, u-boot.img changes to u-boot-dtb.img in
U-Boot v2019.07. Therefore, we need to pick u-boot.img or u-boot-dtb.img
depending on the board configuration.

Just like was done in commit 52344e556f for the generic genimage
template, replace the U-Boot file name with UBOOTBIN, which is set
according to the BR2_TARGET_UBOOT_FORMAT_* option. We also need to set
the correct value for this variable for the u-boot.img and
u-boot-dtb.img cases.

While we're at it, rename the partition from 'u-boot-img' to 'u-boot',
to stay consistent with the generic genimage template.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
[Arnout: correct u-boot.img condition, rework commit log]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-07-09 20:04:52 +02:00
Joris Offouga
cc1761790f boards/freescale/common: Introduce genimage.cfg.template_no_boot_part_spl
Modern U-Boot assumes a layout where the first partition is an ext2 and
the kernel and dtb can be found in /boot. In other words, a layout
without boot partition.

Add a genimage.cfg template for the freescale defconfigs with such a
layout.

For now, only the layout with SPL+u-boot.img is added. It's unlikely that
the u-boot.imx approach will be used.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Tested-by: Pierre-Jean Texier <pjtexier@koncepto.io>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-10 23:36:37 +02:00
Julien Olivain
92ac758c40 board/freescale/common/imx: add support for i.MX8MM
For the boot image creation for the i.MX8MM, the main differences with
i.MX8M are that there is no HDMI firmware image passed, and the ATF
load address is different.

Signed-off-by: Julien Olivain <juju@cotds.org>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-06-10 20:22:38 +02:00
Julien Olivain
332421c683 board/freescale/common/imx: fix imx8-bootloader-prepare for i.MX8M
The update of imx-mkimage in commit
c14d92d439

broke the imx8-bootloader-prepare.sh script for i.MX8M, used in
freescale_imx8mqevk_defconfig

The updated mkimage_fit_atf.sh script in imx-mkimage now needs
a ATF_LOAD_ADDR variable, which was set to 0x00910000 for i.MX8M.

Signed-off-by: Julien Olivain <juju@cotds.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-03-07 23:17:28 +01:00
André Hentschel
7aaf176aea board/freescale/common/imx: add support for i.MX8X
Signed-off-by: André Hentschel <andre.hentschel@zf.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-02-23 16:23:08 +01:00
André Hentschel
f2c1e2e885 board/freescale/common/imx: fix typo
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-12-27 17:09:59 +01:00
Gary Bisson
a534676dc3 board/freescale/common/imx: make imx8-bootloader-prepare more generic
Allow user to override the hardcoded dtb name by using
BR2_ROOTFS_POST_SCRIPT_ARGS.

The only user of this script, configs/freescale_imx8mqevk, is updated
accordingly.

Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-19 15:41:24 +02:00
Fabio Estevam
52344e556f imx/post-image: Allow flashing u-boot-dtb.imx in the SD card
Add support for flashing the u-boot-dtb.imx binary in the SD card
when a target selects BR2_TARGET_UBOOT_FORMAT_DTB_IMX.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-07-18 11:47:06 +02:00
Erik Larsson
7f50b000e7 board/freescale/common/imx: add i.MX8 genimage template
This commit adds a genimage template file that is used for i.MX8
platforms in the common i.MX post-image script.

Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com>
Signed-off-by: Christopher Dahlberg <crille.dahlberg@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-12 22:39:43 +02:00
Erik Larsson
4a1ad1d135 board/freescale/common/imx: add imx8-bootloader-prepare script
This commit adds an imx8-bootloader-prepare.sh script that will be
used by i.MX8 platforms to prepare their bootloader image.

Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com>
Signed-off-by: Christopher Dahlberg <crille.dahlberg@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-12 22:38:50 +02:00
Erik Larsson
4755bf2bd4 board/freescale/common/imx: make post-image.sh arm64 compatible
This commit makes the common post-image.sh script used by Freescale
platforms compatible with arm64:

 - Support having DTBs in sub-folders

 - Support a kernel image in the 'Image' format

Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com>
Signed-off-by: Christopher Dahlberg <crille.dahlberg@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-12 22:28:25 +02:00
Fabio Estevam
8e2b8e1b42 imx: Introduce an SPL genimage template
Introduce a genimage template for booting SPL + u-boot.img U-Boot
binaries.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2017-09-24 17:04:24 +02:00
Fabio Estevam
e3f6475801 freescale: Create the board/freescale/common/imx/ directory
In order to have a better hierarchy for the genimage scripts used by
NXP mx25, mx51, mx53, mx6, mx7 SoCs, let's place them inside the
board/freescale/common/imx/ directory.

This helps in creating a more natural separation between the mxs scripts
that are placed inside the board/freescale/common/mxs/ directory.

Suggested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-07 23:05:34 +01:00