mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
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>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
202e35e4b6
commit
c05f27c8ae
42
board/freescale/common/imx/genimage.cfg.template_imx9
Normal file
42
board/freescale/common/imx/genimage.cfg.template_imx9
Normal file
@@ -0,0 +1,42 @@
|
||||
# Minimal SD card image for the NXP i.MX9 boards
|
||||
#
|
||||
# We mimic the .sdcard NXP's image format:
|
||||
# * the SD card must have 32 kB free space at the beginning,
|
||||
# * U-Boot is integrated into imx9-boot-sd.bin and is dumped as is,
|
||||
# * a FAT partition at offset 8MB is containing Image and DTB files
|
||||
# * a single root filesystem partition is required (ext2, ext3 or ext4)
|
||||
#
|
||||
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
label = "boot"
|
||||
files = {
|
||||
%FILES%
|
||||
}
|
||||
}
|
||||
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition imx-boot {
|
||||
in-partition-table = "no"
|
||||
image = "imx9-boot-sd.bin"
|
||||
offset = %IMXOFFSET%
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 8M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext2"
|
||||
}
|
||||
}
|
||||
43
board/freescale/common/imx/imx9-bootloader-prepare.sh
Executable file
43
board/freescale/common/imx/imx9-bootloader-prepare.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
main ()
|
||||
{
|
||||
SPL_LOAD_ADDR=0x2049A000
|
||||
ATF_LOAD_ADDR=0x204E0000
|
||||
if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$" "${BR2_CONFIG}"; then
|
||||
SPL_LOAD_ADDR=0x204A0000
|
||||
ATF_LOAD_ADDR=0x204C0000
|
||||
fi
|
||||
|
||||
dd if="${BINARIES_DIR}/u-boot-spl.bin" of="${BINARIES_DIR}/u-boot-spl-padded.bin" bs=4 conv=sync
|
||||
cat "${BINARIES_DIR}/u-boot-spl-padded.bin" "${BINARIES_DIR}/ddr_fw.bin" > "${BINARIES_DIR}/u-boot-spl-ddr.bin"
|
||||
|
||||
"${HOST_DIR}/bin/mkimage_imx8" -commit > "${BINARIES_DIR}/mkimg.commit"
|
||||
cat "${BINARIES_DIR}/u-boot.bin" "${BINARIES_DIR}/mkimg.commit" > "${BINARIES_DIR}/u-boot-hash.bin"
|
||||
rm -f "${BINARIES_DIR}/mkimg.commit"
|
||||
|
||||
if grep -Eq "^BR2_TARGET_OPTEE_OS=y$" "${BR2_CONFIG}"; then
|
||||
"${HOST_DIR}/bin/mkimage_imx8" -soc IMX9 -c \
|
||||
-ap "${BINARIES_DIR}/bl31.bin" a35 ${ATF_LOAD_ADDR} \
|
||||
-ap "${BINARIES_DIR}/u-boot-hash.bin" a35 0x80200000 \
|
||||
-ap "${BINARIES_DIR}/tee.bin" a35 0x96000000 \
|
||||
-out "${BINARIES_DIR}/u-boot-atf-container.img" \
|
||||
else
|
||||
"${HOST_DIR}/bin/mkimage_imx8" -soc IMX9 -c \
|
||||
-ap "${BINARIES_DIR}/bl31.bin" a35 ${ATF_LOAD_ADDR} \
|
||||
-ap "${BINARIES_DIR}/u-boot-hash.bin" a35 0x80200000 \
|
||||
-out "${BINARIES_DIR}/u-boot-atf-container.img"
|
||||
fi
|
||||
|
||||
"${HOST_DIR}/bin/mkimage_imx8" -soc IMX9 -append "${BINARIES_DIR}/ahab-container.img" -c \
|
||||
-ap "${BINARIES_DIR}/u-boot-spl-ddr.bin" a35 ${SPL_LOAD_ADDR} \
|
||||
-out "${BINARIES_DIR}/imx9-boot-sd.bin"
|
||||
|
||||
flashbin_size="$(wc -c "${BINARIES_DIR}/imx9-boot-sd.bin" | awk '{print $1}')"
|
||||
pad_cnt=$(($((flashbin_size + 0x400 - 1)) / 0x400))
|
||||
dd if="${BINARIES_DIR}/u-boot-atf-container.img" of="${BINARIES_DIR}/imx9-boot-sd.bin" bs=1K seek=${pad_cnt}
|
||||
|
||||
exit $?
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -50,6 +50,10 @@ genimage_type()
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx8"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX91=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx9"
|
||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_imx9"
|
||||
elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" "${BR2_CONFIG}"; then
|
||||
if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" "${BR2_CONFIG}"; then
|
||||
echo "genimage.cfg.template_no_boot_part_spl"
|
||||
|
||||
Reference in New Issue
Block a user