* [Buildroot] [PATCH v2] configs/imx8mmevk: new defconfig
@ 2022-01-14 2:45 Fabio Estevam
2022-01-15 6:56 ` Heiko Thiery
2022-07-24 13:40 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2022-01-14 2:45 UTC (permalink / raw)
To: buildroot; +Cc: heiko.thiery, Fabio Estevam, frieder.schrempf
Add support for imx8mmevk_defconfig that allows booting kernel, U-Boot and
TFA from the upstream repositories.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
Changes since v1:
- Also use TF-A and U-Boot upstream versions.
DEVELOPERS | 1 +
board/freescale/imx8mmevk/genimage.cfg | 16 ++++++++
board/freescale/imx8mmevk/readme.txt | 6 +++
.../boot/extlinux/extlinux.conf | 4 ++
configs/imx8mmevk_defconfig | 39 +++++++++++++++++++
5 files changed, 66 insertions(+)
create mode 100644 board/freescale/imx8mmevk/genimage.cfg
create mode 100644 board/freescale/imx8mmevk/rootfs_overlay/boot/extlinux/extlinux.conf
create mode 100644 configs/imx8mmevk_defconfig
diff --git a/DEVELOPERS b/DEVELOPERS
index 12777e8d61..e19072a14e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -839,6 +839,7 @@ F: configs/imx6ullevk_defconfig
F: configs/imx6ulpico_defconfig
F: configs/imx7d-sdb_defconfig
F: configs/imx7dpico_defconfig
+F: configs/imx8mmevk_defconfig
F: configs/imx8mqevk_defconfig
F: configs/mx25pdk_defconfig
F: configs/mx51evk_defconfig
diff --git a/board/freescale/imx8mmevk/genimage.cfg b/board/freescale/imx8mmevk/genimage.cfg
new file mode 100644
index 0000000000..3a83aa1f03
--- /dev/null
+++ b/board/freescale/imx8mmevk/genimage.cfg
@@ -0,0 +1,16 @@
+image sdcard.img {
+ hdimage {
+ }
+
+ partition imx-boot {
+ in-partition-table = "no"
+ image = "flash.bin"
+ offset = 33k
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext4"
+ offset = 8M
+ }
+}
diff --git a/board/freescale/imx8mmevk/readme.txt b/board/freescale/imx8mmevk/readme.txt
index 7b69405d30..a8e80a48f9 100644
--- a/board/freescale/imx8mmevk/readme.txt
+++ b/board/freescale/imx8mmevk/readme.txt
@@ -10,8 +10,14 @@ Build
First, configure Buildroot for the i.MX8MM EVK board:
+If you want to use the NXP kernel:
+
make freescale_imx8mmevk_defconfig
+Or if you want to use a mainline kernel:
+
+ make imx8mmevk_defconfig
+
Build all components:
make
diff --git a/board/freescale/imx8mmevk/rootfs_overlay/boot/extlinux/extlinux.conf b/board/freescale/imx8mmevk/rootfs_overlay/boot/extlinux/extlinux.conf
new file mode 100644
index 0000000000..0ba2e4cbfc
--- /dev/null
+++ b/board/freescale/imx8mmevk/rootfs_overlay/boot/extlinux/extlinux.conf
@@ -0,0 +1,4 @@
+Label imx8mm-evk-buildroot
+ kernel /boot/Image
+ devicetree /boot/imx8mm-evk.dtb
+ append root=/dev/mmcblk1p1 rootwait rw
diff --git a/configs/imx8mmevk_defconfig b/configs/imx8mmevk_defconfig
new file mode 100644
index 0000000000..170b8d273b
--- /dev/null
+++ b/configs/imx8mmevk_defconfig
@@ -0,0 +1,39 @@
+BR2_aarch64=y
+BR2_ARM_FPU_VFPV3=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
+BR2_ROOTFS_OVERLAY="board/freescale/imx8mmevk/rootfs_overlay"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/freescale/imx8mmevk/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.14"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mm-evk"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_PACKAGE_FREESCALE_IMX=y
+BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y
+BR2_PACKAGE_FIRMWARE_IMX=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="240M"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30890000"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mm_evk"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=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
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v2] configs/imx8mmevk: new defconfig
2022-01-14 2:45 [Buildroot] [PATCH v2] configs/imx8mmevk: new defconfig Fabio Estevam
@ 2022-01-15 6:56 ` Heiko Thiery
2022-01-15 12:10 ` Fabio Estevam
2022-07-24 13:40 ` Thomas Petazzoni via buildroot
1 sibling, 1 reply; 4+ messages in thread
From: Heiko Thiery @ 2022-01-15 6:56 UTC (permalink / raw)
To: Fabio Estevam; +Cc: frieder.schrempf, buildroot
Hi Fabio,
Am Fr., 14. Jan. 2022 um 03:46 Uhr schrieb Fabio Estevam <festevam@gmail.com>:
>
> Add support for imx8mmevk_defconfig that allows booting kernel, U-Boot and
> TFA from the upstream repositories.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Also use TF-A and U-Boot upstream versions.
>
> DEVELOPERS | 1 +
> board/freescale/imx8mmevk/genimage.cfg | 16 ++++++++
> board/freescale/imx8mmevk/readme.txt | 6 +++
> .../boot/extlinux/extlinux.conf | 4 ++
> configs/imx8mmevk_defconfig | 39 +++++++++++++++++++
> 5 files changed, 66 insertions(+)
> create mode 100644 board/freescale/imx8mmevk/genimage.cfg
> create mode 100644 board/freescale/imx8mmevk/rootfs_overlay/boot/extlinux/extlinux.conf
> create mode 100644 configs/imx8mmevk_defconfig
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 12777e8d61..e19072a14e 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -839,6 +839,7 @@ F: configs/imx6ullevk_defconfig
> F: configs/imx6ulpico_defconfig
> F: configs/imx7d-sdb_defconfig
> F: configs/imx7dpico_defconfig
> +F: configs/imx8mmevk_defconfig
> F: configs/imx8mqevk_defconfig
> F: configs/mx25pdk_defconfig
> F: configs/mx51evk_defconfig
> diff --git a/board/freescale/imx8mmevk/genimage.cfg b/board/freescale/imx8mmevk/genimage.cfg
> new file mode 100644
> index 0000000000..3a83aa1f03
> --- /dev/null
> +++ b/board/freescale/imx8mmevk/genimage.cfg
> @@ -0,0 +1,16 @@
> +image sdcard.img {
> + hdimage {
> + }
> +
> + partition imx-boot {
> + in-partition-table = "no"
> + image = "flash.bin"
> + offset = 33k
Giulio pointed out to me that the units should be described with
capital letters.
> + }
> +
> + partition rootfs {
> + partition-type = 0x83
> + image = "rootfs.ext4"
> + offset = 8M
> + }
> +}
> diff --git a/board/freescale/imx8mmevk/readme.txt b/board/freescale/imx8mmevk/readme.txt
> index 7b69405d30..a8e80a48f9 100644
> --- a/board/freescale/imx8mmevk/readme.txt
> +++ b/board/freescale/imx8mmevk/readme.txt
> @@ -10,8 +10,14 @@ Build
>
> First, configure Buildroot for the i.MX8MM EVK board:
>
> +If you want to use the NXP kernel:
> +
> make freescale_imx8mmevk_defconfig
>
> +Or if you want to use a mainline kernel:
> +
> + make imx8mmevk_defconfig
> +
> Build all components:
>
> make
> diff --git a/board/freescale/imx8mmevk/rootfs_overlay/boot/extlinux/extlinux.conf b/board/freescale/imx8mmevk/rootfs_overlay/boot/extlinux/extlinux.conf
> new file mode 100644
> index 0000000000..0ba2e4cbfc
> --- /dev/null
> +++ b/board/freescale/imx8mmevk/rootfs_overlay/boot/extlinux/extlinux.conf
> @@ -0,0 +1,4 @@
> +Label imx8mm-evk-buildroot
> + kernel /boot/Image
> + devicetree /boot/imx8mm-evk.dtb
> + append root=/dev/mmcblk1p1 rootwait rw
I my respin I used:
append root=PARTUUID=%PARTUUID% rootwait rw
The UUID is created in a post-build.sh script and set it in
extlinux.conf and genimage.cfg
With that the image would not limited to be located on the SD card.
> diff --git a/configs/imx8mmevk_defconfig b/configs/imx8mmevk_defconfig
> new file mode 100644
> index 0000000000..170b8d273b
> --- /dev/null
> +++ b/configs/imx8mmevk_defconfig
> @@ -0,0 +1,39 @@
> +BR2_aarch64=y
> +BR2_ARM_FPU_VFPV3=y
> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
> +BR2_ROOTFS_OVERLAY="board/freescale/imx8mmevk/rootfs_overlay"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/freescale/imx8mmevk/genimage.cfg"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.14"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mm-evk"
> +BR2_LINUX_KERNEL_INSTALL_TARGET=y
> +BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> +BR2_PACKAGE_FREESCALE_IMX=y
> +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM=y
> +BR2_PACKAGE_FIRMWARE_IMX=y
> +BR2_TARGET_ROOTFS_EXT2=y
> +BR2_TARGET_ROOTFS_EXT2_4=y
> +BR2_TARGET_ROOTFS_EXT2_SIZE="240M"
Do you need 240MB here?
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mm"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30890000"
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION=y
> +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2022.01"
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mm_evk"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
> +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=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
> --
> 2.25.1
>
--
Heiko
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v2] configs/imx8mmevk: new defconfig
2022-01-15 6:56 ` Heiko Thiery
@ 2022-01-15 12:10 ` Fabio Estevam
0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2022-01-15 12:10 UTC (permalink / raw)
To: Heiko Thiery; +Cc: Schrempf Frieder, buildroot
Hi Heiko,
On Sat, Jan 15, 2022 at 3:56 AM Heiko Thiery <heiko.thiery@gmail.com> wrote:
> > + partition imx-boot {
> > + in-partition-table = "no"
> > + image = "flash.bin"
> > + offset = 33k
>
> Giulio pointed out to me that the units should be described with
> capital letters.
Thanks for pointing this out. I will change it.
In the long term, we could probably use a common genimage.cfg too.
> I my respin I used:
>
> append root=PARTUUID=%PARTUUID% rootwait rw
>
> The UUID is created in a post-build.sh script and set it in
> extlinux.conf and genimage.cfg
>
> With that the image would not limited to be located on the SD card.
Good idea. Will change it.
> > +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y
> > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION=y
> > +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.6"
On my tests, I noticed that if I build U-Boot 2022.01 + TF-A mainline,
then the kernel 5.16 does not boot.
Using TF-A from the NXP BSP allows me to boot 5.16 without issues.
I will try to investigate why this happens with imx8mm-evk, as your
board does not show issues.
Thanks
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v2] configs/imx8mmevk: new defconfig
2022-01-14 2:45 [Buildroot] [PATCH v2] configs/imx8mmevk: new defconfig Fabio Estevam
2022-01-15 6:56 ` Heiko Thiery
@ 2022-07-24 13:40 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-24 13:40 UTC (permalink / raw)
To: Fabio Estevam; +Cc: heiko.thiery, frieder.schrempf, buildroot
Hello Fabio,
On Thu, 13 Jan 2022 23:45:55 -0300
Fabio Estevam <festevam@gmail.com> wrote:
> Add support for imx8mmevk_defconfig that allows booting kernel, U-Boot and
> TFA from the upstream repositories.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>
> ---
> Changes since v1:
> - Also use TF-A and U-Boot upstream versions.
You had some comments from Heiko on this patch, and you said you would
come back with a newer version, but unless I missed it, I couldn't find
a v3.
I'll now mark this v2 as Changes Requested in patchwork, so if you
don't submit a v3, we will most likely forget about this topic. But it
would be good to have a defconfig for the i.MX8MM EVK.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-24 13:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-14 2:45 [Buildroot] [PATCH v2] configs/imx8mmevk: new defconfig Fabio Estevam
2022-01-15 6:56 ` Heiko Thiery
2022-01-15 12:10 ` Fabio Estevam
2022-07-24 13:40 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox