* [Buildroot] [PATCH] configs/imx8mn-ddr4-evk_defconfig: new defconfig
@ 2025-02-24 16:09 Fabio Estevam
2025-02-24 19:51 ` Julien Olivain
0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2025-02-24 16:09 UTC (permalink / raw)
To: buildroot; +Cc: Fabio Estevam
Add a new defconfig for the imx8mn-ddr4-evk board that uses upstream
components, such as:
- Linux Kernel: Upstream version 6.12.16
- U-boot: Upstream version 2025.01
- ATF: Upstream version 2.12
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
board/freescale/imx8mn-evk/extlinux.conf.in | 4 ++
board/freescale/imx8mn-evk/genimage.cfg.in | 17 +++++++
.../arm-trusted-firmware.hash | 2 +
| 1 +
.../imx8mn-evk/patches/linux/linux.hash | 2 +
.../imx8mn-evk/patches/uboot/uboot.hash | 2 +
board/freescale/imx8mn-evk/post-build.sh | 7 +++
board/freescale/imx8mn-evk/readme.txt | 31 ++++++++++++
configs/imx8mn-ddr4-evk_defconfig | 48 +++++++++++++++++++
9 files changed, 114 insertions(+)
create mode 100644 board/freescale/imx8mn-evk/extlinux.conf.in
create mode 100644 board/freescale/imx8mn-evk/genimage.cfg.in
create mode 100644 board/freescale/imx8mn-evk/patches/arm-trusted-firmware/arm-trusted-firmware.hash
create mode 120000 board/freescale/imx8mn-evk/patches/linux-headers/linux-headers.hash
create mode 100644 board/freescale/imx8mn-evk/patches/linux/linux.hash
create mode 100644 board/freescale/imx8mn-evk/patches/uboot/uboot.hash
create mode 100755 board/freescale/imx8mn-evk/post-build.sh
create mode 100644 board/freescale/imx8mn-evk/readme.txt
create mode 100644 configs/imx8mn-ddr4-evk_defconfig
diff --git a/board/freescale/imx8mn-evk/extlinux.conf.in b/board/freescale/imx8mn-evk/extlinux.conf.in
new file mode 100644
index 000000000000..e408dd6a15ff
--- /dev/null
+++ b/board/freescale/imx8mn-evk/extlinux.conf.in
@@ -0,0 +1,4 @@
+label buildroot
+ kernel /boot/Image
+ devicetree /boot/freescale/imx8mn-ddr4-evk.dtb
+ append root=PARTUUID=%PARTUUID% rootwait rw
diff --git a/board/freescale/imx8mn-evk/genimage.cfg.in b/board/freescale/imx8mn-evk/genimage.cfg.in
new file mode 100644
index 000000000000..10c52548cdfa
--- /dev/null
+++ b/board/freescale/imx8mn-evk/genimage.cfg.in
@@ -0,0 +1,17 @@
+image sdcard.img {
+ hdimage {
+ partition-table-type = "gpt"
+ }
+
+ partition imx-boot {
+ in-partition-table = "no"
+ image = "flash.bin"
+ offset = 32K
+ }
+
+ partition rootfs {
+ offset = 8M
+ image = "rootfs.ext4"
+ partition-uuid = %PARTUUID%
+ }
+}
diff --git a/board/freescale/imx8mn-evk/patches/arm-trusted-firmware/arm-trusted-firmware.hash b/board/freescale/imx8mn-evk/patches/arm-trusted-firmware/arm-trusted-firmware.hash
new file mode 100644
index 000000000000..b5898cba3f96
--- /dev/null
+++ b/board/freescale/imx8mn-evk/patches/arm-trusted-firmware/arm-trusted-firmware.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 06b35a3596b8417bf66f7bfdd7acd181bcb53fc36dc13216227b5cae154e0219 arm-trusted-firmware-v2.12-git4.tar.gz
--git a/board/freescale/imx8mn-evk/patches/linux-headers/linux-headers.hash b/board/freescale/imx8mn-evk/patches/linux-headers/linux-headers.hash
new file mode 120000
index 000000000000..5808d92afe89
--- /dev/null
+++ b/board/freescale/imx8mn-evk/patches/linux-headers/linux-headers.hash
@@ -0,0 +1 @@
+../linux/linux.hash
\ No newline at end of file
diff --git a/board/freescale/imx8mn-evk/patches/linux/linux.hash b/board/freescale/imx8mn-evk/patches/linux/linux.hash
new file mode 100644
index 000000000000..5e0df51126d5
--- /dev/null
+++ b/board/freescale/imx8mn-evk/patches/linux/linux.hash
@@ -0,0 +1,2 @@
+# From https://www.kernel.org/pub/linux/kernel/v6.x/sha256sums.asc
+sha256 5f81362a694f51520bff9faecb73f1cc9bc7bece6fdd10d5c27e348df39d7dc4 linux-6.12.16.tar.xz
diff --git a/board/freescale/imx8mn-evk/patches/uboot/uboot.hash b/board/freescale/imx8mn-evk/patches/uboot/uboot.hash
new file mode 100644
index 000000000000..50674352d71d
--- /dev/null
+++ b/board/freescale/imx8mn-evk/patches/uboot/uboot.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256 cdef7d507c93f1bbd9f015ea9bc21fa074268481405501945abc6f854d5b686f u-boot-2025.01.tar.bz2
diff --git a/board/freescale/imx8mn-evk/post-build.sh b/board/freescale/imx8mn-evk/post-build.sh
new file mode 100755
index 000000000000..604f387768d8
--- /dev/null
+++ b/board/freescale/imx8mn-evk/post-build.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+BOARD_DIR="$(dirname "$0")"
+PARTUUID="$("$HOST_DIR"/bin/uuidgen)"
+
+install -d "$TARGET_DIR/boot/extlinux/"
+sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/extlinux.conf.in" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
+sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg.in" > "$BINARIES_DIR/genimage.cfg"
diff --git a/board/freescale/imx8mn-evk/readme.txt b/board/freescale/imx8mn-evk/readme.txt
new file mode 100644
index 000000000000..c5b4c05c48cd
--- /dev/null
+++ b/board/freescale/imx8mn-evk/readme.txt
@@ -0,0 +1,31 @@
+NXP i.MX8MN DDR4 EVK
+====================
+
+This is a Buildroot target for building an image for the imx8mn-ddr4-evk
+board using upstream components: TF-A, U-Boot and kernel.
+
+How to build it
+===============
+
+Configure Buildroot and build it:
+
+ $ make imx8mn-ddr4-evk_defconfig
+ $ make
+
+Flashing the SD card image
+==========================
+
+Copy the sdcard.img file into the SD card:
+
+ $ sudo dd if=output/images/sdcard.img of=<your-sd-device>; sync
+
+
+Booting the board
+=================
+
+To boot your newly created system:
+
+- Insert the SD card in the MicroSD slot of the board.
+- Connect a serial to USB cable to the DEBUG port.
+- Open a terminal on ttyUSB2 port. For example: sudo picocom -b 115200 /dev/ttyUSB1
+- Power on the board.
diff --git a/configs/imx8mn-ddr4-evk_defconfig b/configs/imx8mn-ddr4-evk_defconfig
new file mode 100644
index 000000000000..fa38a62f0e97
--- /dev/null
+++ b/configs/imx8mn-ddr4-evk_defconfig
@@ -0,0 +1,48 @@
+BR2_aarch64=y
+BR2_ARM_FPU_VFPV3=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
+BR2_GLOBAL_PATCH_DIR="board/freescale/imx8mn-evk/patches"
+BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/imx8mn-evk/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BINARIES_DIR)/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.16"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mn-ddr4-evk"
+BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME=y
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_PACKAGE_FREESCALE_IMX=y
+BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN=y
+BR2_PACKAGE_FIRMWARE_IMX=y
+BR2_PACKAGE_FIRMWARE_IMX_DDR4=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="256M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.12"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mn"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2025.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_ddr4_evk"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_TARGET_UBOOT_NEEDS_GNUTLS=y
+BR2_TARGET_UBOOT_NEEDS_UTIL_LINUX=y
+BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_IMX_FIRMWARE=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="flash.bin"
+BR2_TARGET_UBOOT_SPL=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] configs/imx8mn-ddr4-evk_defconfig: new defconfig
2025-02-24 16:09 [Buildroot] [PATCH] configs/imx8mn-ddr4-evk_defconfig: new defconfig Fabio Estevam
@ 2025-02-24 19:51 ` Julien Olivain
0 siblings, 0 replies; 2+ messages in thread
From: Julien Olivain @ 2025-02-24 19:51 UTC (permalink / raw)
To: Fabio Estevam; +Cc: buildroot
On 24/02/2025 17:09, Fabio Estevam wrote:
> Add a new defconfig for the imx8mn-ddr4-evk board that uses upstream
> components, such as:
>
> - Linux Kernel: Upstream version 6.12.16
> - U-boot: Upstream version 2025.01
> - ATF: Upstream version 2.12
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
Applied to masted, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-24 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 16:09 [Buildroot] [PATCH] configs/imx8mn-ddr4-evk_defconfig: new defconfig Fabio Estevam
2025-02-24 19:51 ` Julien Olivain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox