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:
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"
|
echo "genimage.cfg.template_imx8"
|
||||||
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL=y$" "${BR2_CONFIG}"; then
|
elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8DXL=y$" "${BR2_CONFIG}"; then
|
||||||
echo "genimage.cfg.template_imx8"
|
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
|
elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" "${BR2_CONFIG}"; then
|
||||||
if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" "${BR2_CONFIG}"; then
|
if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" "${BR2_CONFIG}"; then
|
||||||
echo "genimage.cfg.template_no_boot_part_spl"
|
echo "genimage.cfg.template_no_boot_part_spl"
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
# Locally calculated
|
||||||
|
sha256 cfb927722272897f850681c78d5f129b0883a8efaba9c52d30e029086524f7ff imx-atf-lf-6.1.55-2.2.0.tar.gz
|
@ -0,0 +1 @@
|
|||||||
|
../linux/linux.hash
|
3
board/freescale/imx93evk/patches/linux/linux.hash
Normal file
3
board/freescale/imx93evk/patches/linux/linux.hash
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Locally calculated
|
||||||
|
sha256 eb94414f952444289c0af8ad82afa0dc2d07e08f9000ccd2cc39f11da5b494ea linux-imx-lf-6.1.55-2.2.0.tar.gz
|
||||||
|
|
2
board/freescale/imx93evk/patches/uboot/uboot.hash
Normal file
2
board/freescale/imx93evk/patches/uboot/uboot.hash
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Locally calculated
|
||||||
|
sha256 64441ee5bf3d5011e7853c028d06211b6f0439d21e147a8f36972c95a07ae9ac uboot-imx-lf-6.1.55-2.2.0.tar.gz
|
77
board/freescale/imx93evk/readme.txt
Normal file
77
board/freescale/imx93evk/readme.txt
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
*********************
|
||||||
|
NXP i.MX93 EVK board
|
||||||
|
*********************
|
||||||
|
|
||||||
|
This file documents the Buildroot support for the i.MX 93 EVK board.
|
||||||
|
|
||||||
|
Build
|
||||||
|
=====
|
||||||
|
|
||||||
|
First, configure Buildroot for the i.MX 93 EVK board:
|
||||||
|
|
||||||
|
make freescale_imx93evk_defconfig
|
||||||
|
|
||||||
|
Build all components:
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
You will find in output/images/ the following files:
|
||||||
|
- ahab-container.img
|
||||||
|
- bl31.bin
|
||||||
|
- boot.vfat
|
||||||
|
- ddr_fw.bin
|
||||||
|
- Image
|
||||||
|
- imx93-11x11-evk.dtb
|
||||||
|
- imx9-boot-sd.bin
|
||||||
|
- lpddr4_pmu_train_fw.bin
|
||||||
|
- rootfs.ext2
|
||||||
|
- rootfs.ext4
|
||||||
|
- rootfs.tar
|
||||||
|
- sdcard.img
|
||||||
|
- u-boot-atf-container.img
|
||||||
|
- u-boot.bin
|
||||||
|
- u-boot-hash.bin
|
||||||
|
- u-boot-spl.bin
|
||||||
|
- u-boot-spl-ddr.bin
|
||||||
|
- u-boot-spl-padded.bin
|
||||||
|
|
||||||
|
Create a bootable SD card
|
||||||
|
=========================
|
||||||
|
|
||||||
|
To determine the device associated to the SD card have a look in the
|
||||||
|
/proc/partitions file:
|
||||||
|
|
||||||
|
cat /proc/partitions
|
||||||
|
|
||||||
|
Buildroot prepares a bootable "sdcard.img" image in the output/images/
|
||||||
|
directory, ready to be dumped on a SD card. Launch the following
|
||||||
|
command as root:
|
||||||
|
|
||||||
|
dd if=output/images/sdcard.img of=/dev/<your-sd-device>
|
||||||
|
|
||||||
|
*** WARNING! This will destroy all the card content. Use with care! ***
|
||||||
|
|
||||||
|
For details about the medium image layout, see the definition in
|
||||||
|
board/freescale/common/imx/genimage.cfg.template_imx9.
|
||||||
|
|
||||||
|
Boot the i.MX 93 EVK board
|
||||||
|
===============================
|
||||||
|
|
||||||
|
To boot your newly created system (refer to the i.MX 93 EVK Documentation
|
||||||
|
[1] for guidance):
|
||||||
|
- insert the SD card in the SD slot of the board;
|
||||||
|
- Configure the switches as follows:
|
||||||
|
SW1301: 0100 SW1301[1-4]
|
||||||
|
- put a micro USB cable into the Debug USB Port and connect using a terminal
|
||||||
|
emulator at 115200 bps, 8n1;
|
||||||
|
- power on the board.
|
||||||
|
|
||||||
|
Note: the debug USB connector presents 4 UARTs (for example /dev/ttyUSB[0-3]),
|
||||||
|
the Cortex-A55 UART should be the 3rd one (in the previous example, /dev/ttyUSB2).
|
||||||
|
Refer to the documentation [1] for more details.
|
||||||
|
|
||||||
|
Enjoy!
|
||||||
|
|
||||||
|
References
|
||||||
|
==========
|
||||||
|
[1] https://www.nxp.com/document/guide/getting-started-with-the-i-mx93-evk:GS-IMX93EVK
|
40
configs/freescale_imx93evk_defconfig
Normal file
40
configs/freescale_imx93evk_defconfig
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
BR2_aarch64=y
|
||||||
|
BR2_cortex_a55=y
|
||||||
|
BR2_ARM_FPU_VFPV4D16=y
|
||||||
|
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_1=y
|
||||||
|
BR2_GLOBAL_PATCH_DIR="board/freescale/imx93evk/patches"
|
||||||
|
BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0"
|
||||||
|
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/imx9-bootloader-prepare.sh board/freescale/common/imx/post-image.sh"
|
||||||
|
BR2_LINUX_KERNEL=y
|
||||||
|
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
|
||||||
|
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,linux-imx,lf-6.1.55-2.2.0)/linux-imx-lf-6.1.55-2.2.0.tar.gz"
|
||||||
|
BR2_LINUX_KERNEL_DEFCONFIG="imx_v8"
|
||||||
|
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||||
|
BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx93-11x11-evk"
|
||||||
|
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
|
||||||
|
BR2_PACKAGE_FREESCALE_IMX=y
|
||||||
|
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX93=y
|
||||||
|
BR2_PACKAGE_FIRMWARE_ELE_IMX=y
|
||||||
|
BR2_PACKAGE_FIRMWARE_IMX=y
|
||||||
|
BR2_TARGET_ROOTFS_EXT2=y
|
||||||
|
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||||
|
BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
|
||||||
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
|
||||||
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y
|
||||||
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,imx-atf,lf-6.1.55-2.2.0)/imx-atf-lf-6.1.55-2.2.0.tar.gz"
|
||||||
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx93"
|
||||||
|
BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
|
||||||
|
BR2_TARGET_UBOOT=y
|
||||||
|
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
|
||||||
|
BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
|
||||||
|
BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,uboot-imx,lf-6.1.55-2.2.0)/uboot-imx-lf-6.1.55-2.2.0.tar.gz"
|
||||||
|
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx93_11x11_evk"
|
||||||
|
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||||
|
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
|
||||||
|
BR2_TARGET_UBOOT_NEEDS_GNUTLS=y
|
||||||
|
BR2_TARGET_UBOOT_SPL=y
|
||||||
|
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||||
|
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||||
|
BR2_PACKAGE_HOST_IMX_MKIMAGE=y
|
||||||
|
BR2_PACKAGE_HOST_MTOOLS=y
|
||||||
|
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
Loading…
Reference in New Issue
Block a user