diff mbox series

board: Add support for iMX8MN BSH SMM S2 PRO

Message ID 20220129130354.1094543-1-michael@amarulasolutions.com
State Superseded
Headers show
Series board: Add support for iMX8MN BSH SMM S2 PRO | expand

Commit Message

Michael Nazzareno Trimarchi Jan. 29, 2022, 1:03 p.m. UTC
Add initial support for iMX8MN BSH SMM S2 PRO board:

- Linux: v5.17-rc1
- Uboot 2022-01-rc1 (reference tree)
- Default packages from buildroot

Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 DEVELOPERS                         |  2 +
 board/bsh/bsh-imx8mn/extlinux.conf |  4 ++
 board/bsh/bsh-imx8mn/genimage.cfg  | 17 +++++++++
 board/bsh/bsh-imx8mn/post-build.sh |  7 ++++
 board/bsh/bsh-imx8mn/post-image.sh |  3 ++
 board/bsh/bsh-imx8mn/readme.txt    | 60 ++++++++++++++++++++++++++++++
 configs/bsh_smms2pro_defconfig     | 42 +++++++++++++++++++++
 7 files changed, 135 insertions(+)
 create mode 100644 board/bsh/bsh-imx8mn/extlinux.conf
 create mode 100644 board/bsh/bsh-imx8mn/genimage.cfg
 create mode 100755 board/bsh/bsh-imx8mn/post-build.sh
 create mode 100755 board/bsh/bsh-imx8mn/post-image.sh
 create mode 100644 board/bsh/bsh-imx8mn/readme.txt
 create mode 100644 configs/bsh_smms2pro_defconfig

Comments

Giulio Benetti Jan. 29, 2022, 1:32 p.m. UTC | #1
Hi Michael, Ariel,

happy to meet you here :-),

> Il giorno 29 gen 2022, alle ore 14:04, Michael Trimarchi <michael@amarulasolutions.com> ha scritto:
> 
> Add initial support for iMX8MN BSH SMM S2 PRO board:
> 
> - Linux: v5.17-rc1
> - Uboot 2022-01-rc1 (reference tree)

I’m not very sure it’s a good idea using an -rc1 version. I see 3 chances:
1) backport to previous versions(it would be a mess)
2) wait until v5.17 is released in 7 weeks :-/
3) keep as is while someone else gives his Tested-by:
For example Ariel, that will also be one of the two maintainers of this board as I read below.
And later bump uboot and Linux versions as soon as they are released.

> - Default packages from buildroot

Here please specify a https URL for the board like this:
https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/

> 
> Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
> DEVELOPERS                         |  2 +
> board/bsh/bsh-imx8mn/extlinux.conf |  4 ++
> board/bsh/bsh-imx8mn/genimage.cfg  | 17 +++++++++
> board/bsh/bsh-imx8mn/post-build.sh |  7 ++++
> board/bsh/bsh-imx8mn/post-image.sh |  3 ++
> board/bsh/bsh-imx8mn/readme.txt    | 60 ++++++++++++++++++++++++++++++
> configs/bsh_smms2pro_defconfig     | 42 +++++++++++++++++++++
> 7 files changed, 135 insertions(+)
> create mode 100644 board/bsh/bsh-imx8mn/extlinux.conf
> create mode 100644 board/bsh/bsh-imx8mn/genimage.cfg
> create mode 100755 board/bsh/bsh-imx8mn/post-build.sh
> create mode 100755 board/bsh/bsh-imx8mn/post-image.sh
> create mode 100644 board/bsh/bsh-imx8mn/readme.txt
> create mode 100644 configs/bsh_smms2pro_defconfig
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index fe8de1916e..fc66fb6b83 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -220,6 +220,7 @@ F:    configs/snps_archs38_hsdk_defconfig
> F:    configs/snps_archs38_vdk_defconfig
> 
> N:    Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
> +F:    board/bsh/
> F:    package/axfsutils/
> F:    package/mali-t76x/
> 
> @@ -2018,6 +2019,7 @@ F:    package/python-crc16/
> F:    package/python-pyzmq/
> 
> N:    Michael Trimarchi <michael@amarulasolutions.com>
> +F:    board/bsh/
> F:    package/python-spidev/
> 
> N:    Michael Vetter <jubalh@iodoru.org>
> diff --git a/board/bsh/bsh-imx8mn/extlinux.conf b/board/bsh/bsh-imx8mn/extlinux.conf
> new file mode 100644
> index 0000000000..9111354742
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/extlinux.conf
> @@ -0,0 +1,4 @@
> +label buildroot
> +  kernel /boot/Image
> +  devicetree /boot/freescale/imx8mn-bsh-smm-s2pro.dtb
> +  append root=PARTUUID=%PARTUUID% rootwait rw
> diff --git a/board/bsh/bsh-imx8mn/genimage.cfg b/board/bsh/bsh-imx8mn/genimage.cfg
> new file mode 100644
> index 0000000000..4a0aa117fb
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/genimage.cfg
> @@ -0,0 +1,17 @@
> +image sdcard.img {
> +    hdimage {
> +        partition-table-type = "gpt"
> +    }
> +
> +    partition imx-boot {
> +        in-partition-table = "no"
> +        image = "imx8-boot-sd.bin"
> +        offset = 33K
> +    }
> +
> +    partition rootfs {
> +        offset = 8M
> +        image = "rootfs.ext4"
> +        partition-uuid = %PARTUUID%
> +    }
> +}
> diff --git a/board/bsh/bsh-imx8mn/post-build.sh b/board/bsh/bsh-imx8mn/post-build.sh
> new file mode 100755
> index 0000000000..bf8861f6a9
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/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" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
> +sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
> diff --git a/board/bsh/bsh-imx8mn/post-image.sh b/board/bsh/bsh-imx8mn/post-image.sh
> new file mode 100755
> index 0000000000..3452fd4501
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/post-image.sh
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +support/scripts/genimage.sh -c ${BINARIES_DIR}/genimage.cfg
> diff --git a/board/bsh/bsh-imx8mn/readme.txt b/board/bsh/bsh-imx8mn/readme.txt
> new file mode 100644
> index 0000000000..b84f2ff4be
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/readme.txt
> @@ -0,0 +1,60 @@
> +How to build it
> +===============
> +
> +Configure buildroot:
> +
> +  $ make bsh_smms2pro_defconfig
> +
> +Change settings to fit your needs (optional):
> +
> +  $ make menuconfig
> +
> +Compile everything and buildr the rootfs image:
> +
> +  $ make
> +
> +
> +Result of the build
> +===================
> +
> +After building, the output/images directory contains:
> +
> +  output/images/
> +    ├── bl31.bin
> +    ├── boot.scr
> +    ├── ddr_fw.bin
> +    ├── Image
> +    ├── imx8-boot-sd.bin
> +    ├── imx8mn-bsh-smm-s2pro.dtb
> +    ├── ddr_fw.bin
> +    ├── rootfs.ext2
> +    ├── rootfs.ext4 -> rootfs.ext2
> +    ├── rootfs.tar
> +    ├── sdcard.img
> +    ├── u-boot.bin
> +    ├── u-boot.itb
> +    ├── u-boot-nodtb.bin
> +    ├── u-boot-spl.bin
> +    └── u-boot-spl-ddr.bin
> +
> +
> +Flashing the emmc card image
> +==========================
> +
> +To install the image on on eMMC
> +
> +  $ sudo uuu -b emmc_all output/images/flash.bin output/images/sdcard.img
> +
> +
> +Preparing the board
> +===================
> +
> + * Connect a serial line to the board
> + * Power-up the board
> +
> +
> +Booting the board
> +=================
> +
> +By default the bootloader will search for the first valid image, starting
> +with the internal eMMC.
> diff --git a/configs/bsh_smms2pro_defconfig b/configs/bsh_smms2pro_defconfig
> new file mode 100644
> index 0000000000..5f58d184b2
> --- /dev/null
> +++ b/configs/bsh_smms2pro_defconfig
> @@ -0,0 +1,42 @@
> +BR2_aarch64=y
> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/bsh/bsh-imx8mn/post-build.sh"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/bsh/bsh-imx8mn/post-image.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mn-bsh-smm-s2pro.dtb"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.17-rc1"
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mn-bsh-smm-s2pro"
> +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_DDR3=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_VERSION=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mn"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30a60000"
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_CUSTOM_GIT=y
> +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://gitlab.apertis.org/adalessandro/u-boot.git"
> +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="wip/adalessandro/bsh-smm2-pro"

This ^^^ wip name doesn’t sound that good to me. Ariel, is it possible to give a tag with a version like v0.1? So something shorter and more clear.

> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_bsh_smm_s2pro"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin"
> +BR2_TARGET_UBOOT_SPL=y

Have you given a go with latest Buildroot docker to check if uboot needs libfdtpy, python3 etc.?
It’s highly probable it needs them.

Kind regards
—-
Giulio Benetti
Benetti Engineering sas

> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_IMX_MKIMAGE=y
> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
> +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Michael Nazzareno Trimarchi Jan. 29, 2022, 1:38 p.m. UTC | #2
Hi Giulio

On Sat, Jan 29, 2022 at 2:32 PM Giulio Benetti
<giulio.benetti@benettiengineering.com> wrote:
>
> Hi Michael, Ariel,
>
> happy to meet you here :-),
>
> Il giorno 29 gen 2022, alle ore 14:04, Michael Trimarchi <michael@amarulasolutions.com> ha scritto:
>
> Add initial support for iMX8MN BSH SMM S2 PRO board:
>
> - Linux: v5.17-rc1
> - Uboot 2022-01-rc1 (reference tree)
>
>
> I’m not very sure it’s a good idea using an -rc1 version. I see 3 chances:
> 1) backport to previous versions(it would be a mess)
> 2) wait until v5.17 is released in 7 weeks :-/
> 3) keep as is while someone else gives his Tested-by:

Well, only a few people can test it. I will wait Ariel

> For example Ariel, that will also be one of the two maintainers of this board as I read below.
> And later bump uboot and Linux versions as soon as they are released.
>

uboot is there for a while. I have other board that get their uboot
source from gitlab or other download point.
I think that we need to ensure a valid commit point. I should maybe
force uboot to a specific one

> - Default packages from buildroot
>
>
> Here please specify a https URL for the board like this:
> https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/
>

Ok

>
> Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
> DEVELOPERS                         |  2 +
> board/bsh/bsh-imx8mn/extlinux.conf |  4 ++
> board/bsh/bsh-imx8mn/genimage.cfg  | 17 +++++++++
> board/bsh/bsh-imx8mn/post-build.sh |  7 ++++
> board/bsh/bsh-imx8mn/post-image.sh |  3 ++
> board/bsh/bsh-imx8mn/readme.txt    | 60 ++++++++++++++++++++++++++++++
> configs/bsh_smms2pro_defconfig     | 42 +++++++++++++++++++++
> 7 files changed, 135 insertions(+)
> create mode 100644 board/bsh/bsh-imx8mn/extlinux.conf
> create mode 100644 board/bsh/bsh-imx8mn/genimage.cfg
> create mode 100755 board/bsh/bsh-imx8mn/post-build.sh
> create mode 100755 board/bsh/bsh-imx8mn/post-image.sh
> create mode 100644 board/bsh/bsh-imx8mn/readme.txt
> create mode 100644 configs/bsh_smms2pro_defconfig
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index fe8de1916e..fc66fb6b83 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -220,6 +220,7 @@ F:    configs/snps_archs38_hsdk_defconfig
> F:    configs/snps_archs38_vdk_defconfig
>
> N:    Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
> +F:    board/bsh/
> F:    package/axfsutils/
> F:    package/mali-t76x/
>
> @@ -2018,6 +2019,7 @@ F:    package/python-crc16/
> F:    package/python-pyzmq/
>
> N:    Michael Trimarchi <michael@amarulasolutions.com>
> +F:    board/bsh/
> F:    package/python-spidev/
>
> N:    Michael Vetter <jubalh@iodoru.org>
> diff --git a/board/bsh/bsh-imx8mn/extlinux.conf b/board/bsh/bsh-imx8mn/extlinux.conf
> new file mode 100644
> index 0000000000..9111354742
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/extlinux.conf
> @@ -0,0 +1,4 @@
> +label buildroot
> +  kernel /boot/Image
> +  devicetree /boot/freescale/imx8mn-bsh-smm-s2pro.dtb
> +  append root=PARTUUID=%PARTUUID% rootwait rw
> diff --git a/board/bsh/bsh-imx8mn/genimage.cfg b/board/bsh/bsh-imx8mn/genimage.cfg
> new file mode 100644
> index 0000000000..4a0aa117fb
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/genimage.cfg
> @@ -0,0 +1,17 @@
> +image sdcard.img {
> +    hdimage {
> +        partition-table-type = "gpt"
> +    }
> +
> +    partition imx-boot {
> +        in-partition-table = "no"
> +        image = "imx8-boot-sd.bin"
> +        offset = 33K
> +    }
> +
> +    partition rootfs {
> +        offset = 8M
> +        image = "rootfs.ext4"
> +        partition-uuid = %PARTUUID%
> +    }
> +}
> diff --git a/board/bsh/bsh-imx8mn/post-build.sh b/board/bsh/bsh-imx8mn/post-build.sh
> new file mode 100755
> index 0000000000..bf8861f6a9
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/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" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
> +sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
> diff --git a/board/bsh/bsh-imx8mn/post-image.sh b/board/bsh/bsh-imx8mn/post-image.sh
> new file mode 100755
> index 0000000000..3452fd4501
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/post-image.sh
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +support/scripts/genimage.sh -c ${BINARIES_DIR}/genimage.cfg
> diff --git a/board/bsh/bsh-imx8mn/readme.txt b/board/bsh/bsh-imx8mn/readme.txt
> new file mode 100644
> index 0000000000..b84f2ff4be
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/readme.txt
> @@ -0,0 +1,60 @@
> +How to build it
> +===============
> +
> +Configure buildroot:
> +
> +  $ make bsh_smms2pro_defconfig
> +
> +Change settings to fit your needs (optional):
> +
> +  $ make menuconfig
> +
> +Compile everything and buildr the rootfs image:
> +
> +  $ make
> +
> +
> +Result of the build
> +===================
> +
> +After building, the output/images directory contains:
> +
> +  output/images/
> +    ├── bl31.bin
> +    ├── boot.scr
> +    ├── ddr_fw.bin
> +    ├── Image
> +    ├── imx8-boot-sd.bin
> +    ├── imx8mn-bsh-smm-s2pro.dtb
> +    ├── ddr_fw.bin
> +    ├── rootfs.ext2
> +    ├── rootfs.ext4 -> rootfs.ext2
> +    ├── rootfs.tar
> +    ├── sdcard.img
> +    ├── u-boot.bin
> +    ├── u-boot.itb
> +    ├── u-boot-nodtb.bin
> +    ├── u-boot-spl.bin
> +    └── u-boot-spl-ddr.bin
> +
> +
> +Flashing the emmc card image
> +==========================
> +
> +To install the image on on eMMC
> +
> +  $ sudo uuu -b emmc_all output/images/flash.bin output/images/sdcard.img
> +
> +
> +Preparing the board
> +===================
> +
> + * Connect a serial line to the board
> + * Power-up the board
> +
> +
> +Booting the board
> +=================
> +
> +By default the bootloader will search for the first valid image, starting
> +with the internal eMMC.
> diff --git a/configs/bsh_smms2pro_defconfig b/configs/bsh_smms2pro_defconfig
> new file mode 100644
> index 0000000000..5f58d184b2
> --- /dev/null
> +++ b/configs/bsh_smms2pro_defconfig
> @@ -0,0 +1,42 @@
> +BR2_aarch64=y
> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/bsh/bsh-imx8mn/post-build.sh"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/bsh/bsh-imx8mn/post-image.sh"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mn-bsh-smm-s2pro.dtb"
> +BR2_LINUX_KERNEL=y
> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
>
> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.17-rc1"
>
> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mn-bsh-smm-s2pro"
> +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_DDR3=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_VERSION=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mn"
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30a60000"
> +BR2_TARGET_UBOOT=y
> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
> +BR2_TARGET_UBOOT_CUSTOM_GIT=y
> +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://gitlab.apertis.org/adalessandro/u-boot.git"
> +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="wip/adalessandro/bsh-smm2-pro"
>
>
> This ^^^ wip name doesn’t sound that good to me. Ariel, is it possible to give a tag with a version like v0.1? So something shorter and more clear.
>
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_bsh_smm_s2pro"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin"
> +BR2_TARGET_UBOOT_SPL=y
>
>
> Have you given a go with latest Buildroot docker to check if uboot needs libfdtpy, python3 etc.?
> It’s highly probable it needs them.

Suggestion, should be given to the other newest board that was added.
I think that you are talking about
host-tools here. Please point me to this buildroot docker

Michael

>
> Kind regards
> —-
> Giulio Benetti
> Benetti Engineering sas
>
> +BR2_PACKAGE_HOST_GENIMAGE=y
> +BR2_PACKAGE_HOST_IMX_MKIMAGE=y
> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
> +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Giulio Benetti Jan. 29, 2022, 1:54 p.m. UTC | #3
Hi Michael,

> Il giorno 29 gen 2022, alle ore 14:38, Michael Nazzareno Trimarchi <michael@amarulasolutions.com> ha scritto:
> 
> Hi Giulio
> 
>> On Sat, Jan 29, 2022 at 2:32 PM Giulio Benetti
>> <giulio.benetti@benettiengineering.com> wrote:
>> 
>> Hi Michael, Ariel,
>> 
>> happy to meet you here :-),
>> 
>> Il giorno 29 gen 2022, alle ore 14:04, Michael Trimarchi <michael@amarulasolutions.com> ha scritto:
>> 
>> Add initial support for iMX8MN BSH SMM S2 PRO board:
>> 
>> - Linux: v5.17-rc1
>> - Uboot 2022-01-rc1 (reference tree)
>> 
>> 
>> I’m not very sure it’s a good idea using an -rc1 version. I see 3 chances:
>> 1) backport to previous versions(it would be a mess)
>> 2) wait until v5.17 is released in 7 weeks :-/
>> 3) keep as is while someone else gives his Tested-by:
> 
> Well, only a few people can test it. I will wait Ariel

Ok

> 
>> For example Ariel, that will also be one of the two maintainers of this board as I read below.
>> And later bump uboot and Linux versions as soon as they are released.
>> 
> 
> uboot is there for a while. I have other board that get their uboot
> source from gitlab or other download point.
> I think that we need to ensure a valid commit point. I should maybe
> force uboot to a specific one

+1

> 
>> - Default packages from buildroot
>> 
>> 
>> Here please specify a https URL for the board like this:
>> https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/
>> 
> 
> Ok
> 
>> 
>> Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
>> Cc: Jagan Teki <jagan@amarulasolutions.com>
>> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>> ---
>> DEVELOPERS                         |  2 +
>> board/bsh/bsh-imx8mn/extlinux.conf |  4 ++
>> board/bsh/bsh-imx8mn/genimage.cfg  | 17 +++++++++
>> board/bsh/bsh-imx8mn/post-build.sh |  7 ++++
>> board/bsh/bsh-imx8mn/post-image.sh |  3 ++
>> board/bsh/bsh-imx8mn/readme.txt    | 60 ++++++++++++++++++++++++++++++
>> configs/bsh_smms2pro_defconfig     | 42 +++++++++++++++++++++
>> 7 files changed, 135 insertions(+)
>> create mode 100644 board/bsh/bsh-imx8mn/extlinux.conf
>> create mode 100644 board/bsh/bsh-imx8mn/genimage.cfg
>> create mode 100755 board/bsh/bsh-imx8mn/post-build.sh
>> create mode 100755 board/bsh/bsh-imx8mn/post-image.sh
>> create mode 100644 board/bsh/bsh-imx8mn/readme.txt
>> create mode 100644 configs/bsh_smms2pro_defconfig
>> 
>> diff --git a/DEVELOPERS b/DEVELOPERS
>> index fe8de1916e..fc66fb6b83 100644
>> --- a/DEVELOPERS
>> +++ b/DEVELOPERS
>> @@ -220,6 +220,7 @@ F:    configs/snps_archs38_hsdk_defconfig
>> F:    configs/snps_archs38_vdk_defconfig
>> 
>> N:    Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
>> +F:    board/bsh/
>> F:    package/axfsutils/
>> F:    package/mali-t76x/
>> 
>> @@ -2018,6 +2019,7 @@ F:    package/python-crc16/
>> F:    package/python-pyzmq/
>> 
>> N:    Michael Trimarchi <michael@amarulasolutions.com>
>> +F:    board/bsh/
>> F:    package/python-spidev/
>> 
>> N:    Michael Vetter <jubalh@iodoru.org>
>> diff --git a/board/bsh/bsh-imx8mn/extlinux.conf b/board/bsh/bsh-imx8mn/extlinux.conf
>> new file mode 100644
>> index 0000000000..9111354742
>> --- /dev/null
>> +++ b/board/bsh/bsh-imx8mn/extlinux.conf
>> @@ -0,0 +1,4 @@
>> +label buildroot
>> +  kernel /boot/Image
>> +  devicetree /boot/freescale/imx8mn-bsh-smm-s2pro.dtb
>> +  append root=PARTUUID=%PARTUUID% rootwait rw
>> diff --git a/board/bsh/bsh-imx8mn/genimage.cfg b/board/bsh/bsh-imx8mn/genimage.cfg
>> new file mode 100644
>> index 0000000000..4a0aa117fb
>> --- /dev/null
>> +++ b/board/bsh/bsh-imx8mn/genimage.cfg
>> @@ -0,0 +1,17 @@
>> +image sdcard.img {
>> +    hdimage {
>> +        partition-table-type = "gpt"
>> +    }
>> +
>> +    partition imx-boot {
>> +        in-partition-table = "no"
>> +        image = "imx8-boot-sd.bin"
>> +        offset = 33K
>> +    }
>> +
>> +    partition rootfs {
>> +        offset = 8M
>> +        image = "rootfs.ext4"
>> +        partition-uuid = %PARTUUID%
>> +    }
>> +}
>> diff --git a/board/bsh/bsh-imx8mn/post-build.sh b/board/bsh/bsh-imx8mn/post-build.sh
>> new file mode 100755
>> index 0000000000..bf8861f6a9
>> --- /dev/null
>> +++ b/board/bsh/bsh-imx8mn/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" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
>> +sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
>> diff --git a/board/bsh/bsh-imx8mn/post-image.sh b/board/bsh/bsh-imx8mn/post-image.sh
>> new file mode 100755
>> index 0000000000..3452fd4501
>> --- /dev/null
>> +++ b/board/bsh/bsh-imx8mn/post-image.sh
>> @@ -0,0 +1,3 @@
>> +#!/bin/sh
>> +
>> +support/scripts/genimage.sh -c ${BINARIES_DIR}/genimage.cfg
>> diff --git a/board/bsh/bsh-imx8mn/readme.txt b/board/bsh/bsh-imx8mn/readme.txt
>> new file mode 100644
>> index 0000000000..b84f2ff4be
>> --- /dev/null
>> +++ b/board/bsh/bsh-imx8mn/readme.txt
>> @@ -0,0 +1,60 @@
>> +How to build it
>> +===============
>> +
>> +Configure buildroot:
>> +
>> +  $ make bsh_smms2pro_defconfig
>> +
>> +Change settings to fit your needs (optional):
>> +
>> +  $ make menuconfig
>> +
>> +Compile everything and buildr the rootfs image:
>> +
>> +  $ make
>> +
>> +
>> +Result of the build
>> +===================
>> +
>> +After building, the output/images directory contains:
>> +
>> +  output/images/
>> +    ├── bl31.bin
>> +    ├── boot.scr
>> +    ├── ddr_fw.bin
>> +    ├── Image
>> +    ├── imx8-boot-sd.bin
>> +    ├── imx8mn-bsh-smm-s2pro.dtb
>> +    ├── ddr_fw.bin
>> +    ├── rootfs.ext2
>> +    ├── rootfs.ext4 -> rootfs.ext2
>> +    ├── rootfs.tar
>> +    ├── sdcard.img
>> +    ├── u-boot.bin
>> +    ├── u-boot.itb
>> +    ├── u-boot-nodtb.bin
>> +    ├── u-boot-spl.bin
>> +    └── u-boot-spl-ddr.bin
>> +
>> +
>> +Flashing the emmc card image
>> +==========================
>> +
>> +To install the image on on eMMC
>> +
>> +  $ sudo uuu -b emmc_all output/images/flash.bin output/images/sdcard.img
>> +
>> +
>> +Preparing the board
>> +===================
>> +
>> + * Connect a serial line to the board
>> + * Power-up the board
>> +
>> +
>> +Booting the board
>> +=================
>> +
>> +By default the bootloader will search for the first valid image, starting
>> +with the internal eMMC.
>> diff --git a/configs/bsh_smms2pro_defconfig b/configs/bsh_smms2pro_defconfig
>> new file mode 100644
>> index 0000000000..5f58d184b2
>> --- /dev/null
>> +++ b/configs/bsh_smms2pro_defconfig
>> @@ -0,0 +1,42 @@
>> +BR2_aarch64=y
>> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
>> +BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/bsh/bsh-imx8mn/post-build.sh"
>> +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/bsh/bsh-imx8mn/post-image.sh"
>> +BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mn-bsh-smm-s2pro.dtb"
>> +BR2_LINUX_KERNEL=y
>> +BR2_LINUX_KERNEL_CUSTOM_GIT=y
>> +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
>> 
>> +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.17-rc1"
>> 
>> +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
>> +BR2_LINUX_KERNEL_DTS_SUPPORT=y
>> +BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mn-bsh-smm-s2pro"
>> +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_DDR3=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_VERSION=y
>> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
>> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mn"
>> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
>> +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30a60000"
>> +BR2_TARGET_UBOOT=y
>> +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
>> +BR2_TARGET_UBOOT_CUSTOM_GIT=y
>> +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://gitlab.apertis.org/adalessandro/u-boot.git"
>> +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="wip/adalessandro/bsh-smm2-pro"
>> 
>> 
>> This ^^^ wip name doesn’t sound that good to me. Ariel, is it possible to give a tag with a version like v0.1? So something shorter and more clear.
>> 
>> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_bsh_smm_s2pro"
>> +BR2_TARGET_UBOOT_NEEDS_DTC=y
>> +BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
>> +BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin"
>> +BR2_TARGET_UBOOT_SPL=y
>> 
>> 
>> Have you given a go with latest Buildroot docker to check if uboot needs libfdtpy, python3 etc.?
>> It’s highly probable it needs them.
> 
> Suggestion, should be given to the other newest board that was added.

Correct, I’m going to check my latest board reviews about this

> I think that you are talking about
> host-tools here.

Yes

> Please point me to this buildroot docker

https://hub.docker.com/r/buildroot/base/tags
# docker pull buildroot/base:20211120.1925

Best regards
—-
Giulio Benetti
Benetti Engineering sas

> 
> Michael
> 
>> 
>> Kind regards
>> —-
>> Giulio Benetti
>> Benetti Engineering sas
>> 
>> +BR2_PACKAGE_HOST_GENIMAGE=y
>> +BR2_PACKAGE_HOST_IMX_MKIMAGE=y
>> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
>> +BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
>> --
>> 2.25.1
>> 
>> _______________________________________________
>> buildroot mailing list
>> buildroot@buildroot.org
>> https://lists.buildroot.org/mailman/listinfo/buildroot
> 
> 
> 
> -- 
> Michael Nazzareno Trimarchi
> Co-Founder & Chief Executive Officer
> M. +39 347 913 2170
> michael@amarulasolutions.com
> __________________________________
> 
> Amarula Solutions BV
> Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
> T. +31 (0)85 111 9172
> info@amarulasolutions.com
> www.amarulasolutions.com
Giulio Benetti Jan. 29, 2022, 7:46 p.m. UTC | #4
Hi Michael,

On 29/01/22 14:54, Giulio Benetti wrote:
[SNIP]

>>> Have you given a go with latest Buildroot docker to check if uboot 
>>> needs libfdtpy, python3 etc.?
>>> It’s highly probable it needs them.
>>
>> Suggestion, should be given to the other newest board that was added.
> 
> Correct, I’m going to check my latest board reviews about this

I've pointed them tbh

>> I think that you are talking about
>> host-tools here. 
> 
> Yes
> 
>> Please point me to this buildroot docker
> 
> https://hub.docker.com/r/buildroot/base/tags 
> <https://hub.docker.com/r/buildroot/base/tags>
> # docker pull buildroot/base:20211120.1925

This is not correct, sorry, I've just given a try and it builds 
correctly even if it fails with gitlab CI.
You have to use this docker:
docker pull buildroot/base:20210922.2200

Best regards!
Michael Nazzareno Trimarchi Jan. 30, 2022, 11:27 p.m. UTC | #5
Hi Giulio

On Sat, Jan 29, 2022 at 8:46 PM Giulio Benetti
<giulio.benetti@benettiengineering.com> wrote:
>
> Hi Michael,
>
> On 29/01/22 14:54, Giulio Benetti wrote:
> [SNIP]
>
> >>> Have you given a go with latest Buildroot docker to check if uboot
> >>> needs libfdtpy, python3 etc.?
> >>> It’s highly probable it needs them.
> >>
> >> Suggestion, should be given to the other newest board that was added.
> >
> > Correct, I’m going to check my latest board reviews about this
>
> I've pointed them tbh
>
> >> I think that you are talking about
> >> host-tools here.
> >
> > Yes
> >
> >> Please point me to this buildroot docker
> >
> > https://hub.docker.com/r/buildroot/base/tags
> > <https://hub.docker.com/r/buildroot/base/tags>
> > # docker pull buildroot/base:20211120.1925
>
> This is not correct, sorry, I've just given a try and it builds
> correctly even if it fails with gitlab CI.
> You have to use this docker:
> docker pull buildroot/base:20210922.2200
>

I will resend. I found some wrong artifacts and I need to test it again

Michael

> Best regards!
> --
> Giulio Benetti
> Benetti Engineering sas
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index fe8de1916e..fc66fb6b83 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -220,6 +220,7 @@  F:	configs/snps_archs38_hsdk_defconfig
 F:	configs/snps_archs38_vdk_defconfig
 
 N:	Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
+F:	board/bsh/
 F:	package/axfsutils/
 F:	package/mali-t76x/
 
@@ -2018,6 +2019,7 @@  F:	package/python-crc16/
 F:	package/python-pyzmq/
 
 N:	Michael Trimarchi <michael@amarulasolutions.com>
+F:	board/bsh/
 F:	package/python-spidev/
 
 N:	Michael Vetter <jubalh@iodoru.org>
diff --git a/board/bsh/bsh-imx8mn/extlinux.conf b/board/bsh/bsh-imx8mn/extlinux.conf
new file mode 100644
index 0000000000..9111354742
--- /dev/null
+++ b/board/bsh/bsh-imx8mn/extlinux.conf
@@ -0,0 +1,4 @@ 
+label buildroot
+  kernel /boot/Image
+  devicetree /boot/freescale/imx8mn-bsh-smm-s2pro.dtb
+  append root=PARTUUID=%PARTUUID% rootwait rw
diff --git a/board/bsh/bsh-imx8mn/genimage.cfg b/board/bsh/bsh-imx8mn/genimage.cfg
new file mode 100644
index 0000000000..4a0aa117fb
--- /dev/null
+++ b/board/bsh/bsh-imx8mn/genimage.cfg
@@ -0,0 +1,17 @@ 
+image sdcard.img {
+	hdimage {
+		partition-table-type = "gpt"
+	}
+
+	partition imx-boot {
+		in-partition-table = "no"
+		image = "imx8-boot-sd.bin"
+		offset = 33K
+	}
+
+	partition rootfs {
+		offset = 8M
+		image = "rootfs.ext4"
+		partition-uuid = %PARTUUID%
+	}
+}
diff --git a/board/bsh/bsh-imx8mn/post-build.sh b/board/bsh/bsh-imx8mn/post-build.sh
new file mode 100755
index 0000000000..bf8861f6a9
--- /dev/null
+++ b/board/bsh/bsh-imx8mn/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" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
+sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
diff --git a/board/bsh/bsh-imx8mn/post-image.sh b/board/bsh/bsh-imx8mn/post-image.sh
new file mode 100755
index 0000000000..3452fd4501
--- /dev/null
+++ b/board/bsh/bsh-imx8mn/post-image.sh
@@ -0,0 +1,3 @@ 
+#!/bin/sh
+
+support/scripts/genimage.sh -c ${BINARIES_DIR}/genimage.cfg
diff --git a/board/bsh/bsh-imx8mn/readme.txt b/board/bsh/bsh-imx8mn/readme.txt
new file mode 100644
index 0000000000..b84f2ff4be
--- /dev/null
+++ b/board/bsh/bsh-imx8mn/readme.txt
@@ -0,0 +1,60 @@ 
+How to build it
+===============
+
+Configure buildroot:
+
+  $ make bsh_smms2pro_defconfig
+
+Change settings to fit your needs (optional):
+
+  $ make menuconfig
+
+Compile everything and buildr the rootfs image:
+
+  $ make
+
+
+Result of the build
+===================
+
+After building, the output/images directory contains:
+
+  output/images/
+    ├── bl31.bin
+    ├── boot.scr
+    ├── ddr_fw.bin
+    ├── Image
+    ├── imx8-boot-sd.bin
+    ├── imx8mn-bsh-smm-s2pro.dtb
+    ├── ddr_fw.bin
+    ├── rootfs.ext2
+    ├── rootfs.ext4 -> rootfs.ext2
+    ├── rootfs.tar
+    ├── sdcard.img
+    ├── u-boot.bin
+    ├── u-boot.itb
+    ├── u-boot-nodtb.bin
+    ├── u-boot-spl.bin
+    └── u-boot-spl-ddr.bin
+
+
+Flashing the emmc card image
+==========================
+
+To install the image on on eMMC
+
+  $ sudo uuu -b emmc_all output/images/flash.bin output/images/sdcard.img
+
+
+Preparing the board
+===================
+
+ * Connect a serial line to the board
+ * Power-up the board
+
+
+Booting the board
+=================
+
+By default the bootloader will search for the first valid image, starting
+with the internal eMMC.
diff --git a/configs/bsh_smms2pro_defconfig b/configs/bsh_smms2pro_defconfig
new file mode 100644
index 0000000000..5f58d184b2
--- /dev/null
+++ b/configs/bsh_smms2pro_defconfig
@@ -0,0 +1,42 @@ 
+BR2_aarch64=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/freescale/common/imx/imx8-bootloader-prepare.sh board/bsh/bsh-imx8mn/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/bsh/bsh-imx8mn/post-image.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="${UBOOT_DIR}/arch/arm/dts/imx8mn-bsh-smm-s2pro.dtb"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="v5.17-rc1"
+BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="freescale/imx8mn-bsh-smm-s2pro"
+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_DDR3=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_VERSION=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE="v2.5"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx8mn"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="IMX_BOOT_UART_BASE=0x30a60000"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://gitlab.apertis.org/adalessandro/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="wip/adalessandro/bsh-smm2-pro"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_bsh_smm_s2pro"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
+BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-nodtb.bin"
+BR2_TARGET_UBOOT_SPL=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_IMX_MKIMAGE=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y