All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
@ 2022-01-31 14:55 Michael Trimarchi
  2022-01-31 16:19 ` Ariel D'Alessandro
  2022-02-12 12:10 ` Arnout Vandecappelle
  0 siblings, 2 replies; 10+ messages in thread
From: Michael Trimarchi @ 2022-01-31 14:55 UTC (permalink / raw)
  To: Yann E. MORIN, buildroot
  Cc: Giulio Benetti, Heiko Thiery, Ariel D'Alessandro, Jagan Teki

Add initial support for iMX8MN BSH SMM S2 PRO board:

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

https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/

Add Ariel D'Alessandro as co-maintainer, we work together on
platform mainline

Build and tested using:
docker pull registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314

Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Cc: Jagan Teki <jagan@amarulasolutions.com>
Cc: Heiko Thiery <heiko.thiery@gmail.com>
Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
Changes V2->V3:
	- Update the uboot download point
	- Add feedback from Heiko Thiery <heiko.thiery@gmail.com>
	- Add feddback from Giulio Benetti
Changes V1->V2:
	- add the board reference page
	- test with docker
	- adjust the buildroot config in order to use buildman
---
 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    | 55 ++++++++++++++++++++++++++++++
 configs/bsh_smms2pro_defconfig     | 43 +++++++++++++++++++++++
 7 files changed, 131 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..bc100b171d
--- /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 = "flash.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..ae30666cd0
--- /dev/null
+++ b/board/bsh/bsh-imx8mn/readme.txt
@@ -0,0 +1,55 @@
+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
+    ├── Image
+    ├── flash.bin
+    ├── ddr3*
+    ├── rootfs.ext2
+    ├── rootfs.ext4 -> rootfs.ext2
+    ├── rootfs.tar
+    ├── sdcard.img
+    ├── u-boot.bin
+    ├── u-boot-nodtb.bin
+    └── u-boot-spl.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..9fd7fb8e7c
--- /dev/null
+++ b/configs/bsh_smms2pro_defconfig
@@ -0,0 +1,43 @@
+BR2_aarch64=y
+BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
+BR2_ROOTFS_POST_BUILD_SCRIPT="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_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="v2022.01-bsh-smm2"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_bsh_smm_s2pro"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
+BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=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] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-01-31 14:55 [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO Michael Trimarchi
@ 2022-01-31 16:19 ` Ariel D'Alessandro
  2022-02-12 10:12   ` Michael Nazzareno Trimarchi
  2022-02-12 12:10 ` Arnout Vandecappelle
  1 sibling, 1 reply; 10+ messages in thread
From: Ariel D'Alessandro @ 2022-01-31 16:19 UTC (permalink / raw)
  To: Michael Trimarchi, Yann E. MORIN, buildroot
  Cc: Giulio Benetti, Heiko Thiery, Jagan Teki

Hi Michael, all,

On 1/31/22 11:55, Michael Trimarchi wrote:
> Add initial support for iMX8MN BSH SMM S2 PRO board:
> 
> - Linux: v5.17-rc1
> - Uboot 2022-01-rc1 (reference tree)
> - Default packages from buildroot
> 
> https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/
> 
> Add Ariel D'Alessandro as co-maintainer, we work together on
> platform mainline
> 
> Build and tested using:
> docker pull registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314
> 
> Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Heiko Thiery <heiko.thiery@gmail.com>
> Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>

Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-01-31 16:19 ` Ariel D'Alessandro
@ 2022-02-12 10:12   ` Michael Nazzareno Trimarchi
  2022-02-12 11:41     ` Giulio Benetti
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-02-12 10:12 UTC (permalink / raw)
  To: Ariel D'Alessandro
  Cc: Jagan Teki, Heiko Thiery, Giulio Benetti, Yann E. MORIN, buildroot

Hi all

Should I need to resend? anything is missing now?

Michael

On Mon, Jan 31, 2022 at 5:20 PM Ariel D'Alessandro
<ariel.dalessandro@collabora.com> wrote:
>
> Hi Michael, all,
>
> On 1/31/22 11:55, Michael Trimarchi wrote:
> > Add initial support for iMX8MN BSH SMM S2 PRO board:
> >
> > - Linux: v5.17-rc1
> > - Uboot 2022-01-rc1 (reference tree)
> > - Default packages from buildroot
> >
> > https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/
> >
> > Add Ariel D'Alessandro as co-maintainer, we work together on
> > platform mainline
> >
> > Build and tested using:
> > docker pull registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314
> >
> > Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> > Cc: Jagan Teki <jagan@amarulasolutions.com>
> > Cc: Heiko Thiery <heiko.thiery@gmail.com>
> > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>
> Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>



-- 
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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-02-12 10:12   ` Michael Nazzareno Trimarchi
@ 2022-02-12 11:41     ` Giulio Benetti
  0 siblings, 0 replies; 10+ messages in thread
From: Giulio Benetti @ 2022-02-12 11:41 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi
  Cc: Jagan Teki, Heiko Thiery, Ariel D'Alessandro, Yann E. MORIN,
	buildroot

Hi Michael,

> Il giorno 12 feb 2022, alle ore 11:12, Michael Nazzareno Trimarchi <michael@amarulasolutions.com> ha scritto:
> 
> Hi all
> 
> Should I need to resend? anything is missing now?

No, only need to wait until maintainers submit it or find something I haven’t found(hope not).

Best regards
Giulio

> 
> Michael
> 
>> On Mon, Jan 31, 2022 at 5:20 PM Ariel D'Alessandro
>> <ariel.dalessandro@collabora.com> wrote:
>> 
>> Hi Michael, all,
>> 
>>> On 1/31/22 11:55, Michael Trimarchi wrote:
>>> Add initial support for iMX8MN BSH SMM S2 PRO board:
>>> 
>>> - Linux: v5.17-rc1
>>> - Uboot 2022-01-rc1 (reference tree)
>>> - Default packages from buildroot
>>> 
>>> https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/
>>> 
>>> Add Ariel D'Alessandro as co-maintainer, we work together on
>>> platform mainline
>>> 
>>> Build and tested using:
>>> docker pull registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314
>>> 
>>> Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
>>> Cc: Jagan Teki <jagan@amarulasolutions.com>
>>> Cc: Heiko Thiery <heiko.thiery@gmail.com>
>>> Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>>> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>> 
>> Tested-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> 
> 
> 
> -- 
> 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

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-01-31 14:55 [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO Michael Trimarchi
  2022-01-31 16:19 ` Ariel D'Alessandro
@ 2022-02-12 12:10 ` Arnout Vandecappelle
  2022-02-12 12:36   ` Michael Nazzareno Trimarchi
  2022-02-12 13:27   ` Heiko Thiery
  1 sibling, 2 replies; 10+ messages in thread
From: Arnout Vandecappelle @ 2022-02-12 12:10 UTC (permalink / raw)
  To: Michael Trimarchi, Yann E. MORIN, buildroot
  Cc: Giulio Benetti, Ariel D'Alessandro, Heiko Thiery, Jagan Teki



On 31/01/2022 15:55, Michael Trimarchi wrote:
> Add initial support for iMX8MN BSH SMM S2 PRO board:
> 
> - Linux: v5.17-rc1

  I'm a bit uncomfortable to add an -rc version. But I guess it can be updated 
as soon as 5.17 is released.

> - Uboot 2022-01-rc1 (reference tree)
> - Default packages from buildroot
> 
> https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/
> 
> Add Ariel D'Alessandro as co-maintainer, we work together on
> platform mainline
> 
> Build and tested using:
> docker pull registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314
> 
> Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> Cc: Jagan Teki <jagan@amarulasolutions.com>
> Cc: Heiko Thiery <heiko.thiery@gmail.com>
> Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
[snip]
> 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/

  You should also add configs/bsh_smms2pro_defconfig here.

>   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..bc100b171d
> --- /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 = "flash.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"

  This is really a great way of doing it!

> 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..ae30666cd0
> --- /dev/null
> +++ b/board/bsh/bsh-imx8mn/readme.txt
> @@ -0,0 +1,55 @@
> +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
> +    ├── Image
> +    ├── flash.bin
> +    ├── ddr3*
> +    ├── rootfs.ext2
> +    ├── rootfs.ext4 -> rootfs.ext2
> +    ├── rootfs.tar
> +    ├── sdcard.img
> +    ├── u-boot.bin
> +    ├── u-boot-nodtb.bin
> +    └── u-boot-spl.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

  Please also explain where you get uuu. Can we build it as part of buildroot? 
Then refer to it as output/host/bin/uuu.

> +
> +
> +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..9fd7fb8e7c
> --- /dev/null
> +++ b/configs/bsh_smms2pro_defconfig
> @@ -0,0 +1,43 @@
> +BR2_aarch64=y

  Even if the default happens to be correct, I prefer the subarch to be 
specified explicitly. That way we can change the default later without affecting 
this defconfig.

> +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
> +BR2_ROOTFS_POST_BUILD_SCRIPT="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"

  I may be missing something, but this doesn't seem to be used by any of the 
post- scripts?

> +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"

  Please use the tarball instead. Simply setting CUSTOM_VERSION should be 
sufficient - if not, linux.mk has tobe fixed.

> +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_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"

  Gitlab is able to generate tarballs as well. There are plenty of examples in 
the tree.


  I would normally fix these things up while applying, but since I'm not 
entirely sure about merging a -rc kernel anyway, I'll wait for a v4 instead.

  Oh, one more thing: the subject for a new defconfig is typically 
"configs/bsh_smms2pro_defconfig: new defconfig"

  Regards,
  Arnout

> +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2022.01-bsh-smm2"
> +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_bsh_smm_s2pro"
> +BR2_TARGET_UBOOT_NEEDS_DTC=y
> +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
> +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
> +BR2_TARGET_UBOOT_NEEDS_OPENSSL=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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-02-12 12:10 ` Arnout Vandecappelle
@ 2022-02-12 12:36   ` Michael Nazzareno Trimarchi
  2022-02-12 12:42     ` Arnout Vandecappelle
  2022-02-12 13:27   ` Heiko Thiery
  1 sibling, 1 reply; 10+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-02-12 12:36 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: Ariel D'Alessandro, Jagan Teki, buildroot, Giulio Benetti,
	Yann E. MORIN, Heiko Thiery

Hi

On Sat, Feb 12, 2022 at 1:10 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 31/01/2022 15:55, Michael Trimarchi wrote:
> > Add initial support for iMX8MN BSH SMM S2 PRO board:
> >
> > - Linux: v5.17-rc1
>
>   I'm a bit uncomfortable to add an -rc version. But I guess it can be updated
> as soon as 5.17 is released.

Ok, I will then wait

>
> > - Uboot 2022-01-rc1 (reference tree)
> > - Default packages from buildroot
> >
> > https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/
> >
> > Add Ariel D'Alessandro as co-maintainer, we work together on
> > platform mainline
> >
> > Build and tested using:
> > docker pull registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314
> >
> > Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> > Cc: Jagan Teki <jagan@amarulasolutions.com>
> > Cc: Heiko Thiery <heiko.thiery@gmail.com>
> > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> [snip]
> > 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/
>
>   You should also add configs/bsh_smms2pro_defconfig here.
>
> >   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..bc100b171d
> > --- /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 = "flash.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"
>
>   This is really a great way of doing it!
>

Well, I have taken from another submitted board

> > 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..ae30666cd0
> > --- /dev/null
> > +++ b/board/bsh/bsh-imx8mn/readme.txt
> > @@ -0,0 +1,55 @@
> > +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
> > +    ├── Image
> > +    ├── flash.bin
> > +    ├── ddr3*
> > +    ├── rootfs.ext2
> > +    ├── rootfs.ext4 -> rootfs.ext2
> > +    ├── rootfs.tar
> > +    ├── sdcard.img
> > +    ├── u-boot.bin
> > +    ├── u-boot-nodtb.bin
> > +    └── u-boot-spl.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
>
>   Please also explain where you get uuu. Can we build it as part of buildroot?
> Then refer to it as output/host/bin/uuu.

Ok I will update it

>
> > +
> > +
> > +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..9fd7fb8e7c
> > --- /dev/null
> > +++ b/configs/bsh_smms2pro_defconfig
> > @@ -0,0 +1,43 @@
> > +BR2_aarch64=y
>
>   Even if the default happens to be correct, I prefer the subarch to be
> specified explicitly. That way we can change the default later without affecting
> this defconfig.
>
> > +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
> > +BR2_ROOTFS_POST_BUILD_SCRIPT="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"
>
>   I may be missing something, but this doesn't seem to be used by any of the
> post- scripts?

Ok

>
> > +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"
>
>   Please use the tarball instead. Simply setting CUSTOM_VERSION should be
> sufficient - if not, linux.mk has tobe fixed.

Ok

>
> > +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_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"
>
>   Gitlab is able to generate tarballs as well. There are plenty of examples in
> the tree.
>
>
>   I would normally fix these things up while applying, but since I'm not
> entirely sure about merging a -rc kernel anyway, I'll wait for a v4 instead.
>

I will prepare v4

Michael

>   Oh, one more thing: the subject for a new defconfig is typically
> "configs/bsh_smms2pro_defconfig: new defconfig"
>
>   Regards,
>   Arnout
>
> > +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2022.01-bsh-smm2"
> > +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_bsh_smm_s2pro"
> > +BR2_TARGET_UBOOT_NEEDS_DTC=y
> > +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
> > +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
> > +BR2_TARGET_UBOOT_NEEDS_OPENSSL=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



-- 
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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-02-12 12:36   ` Michael Nazzareno Trimarchi
@ 2022-02-12 12:42     ` Arnout Vandecappelle
  2022-04-22 19:22       ` Ariel D'Alessandro
  0 siblings, 1 reply; 10+ messages in thread
From: Arnout Vandecappelle @ 2022-02-12 12:42 UTC (permalink / raw)
  To: Michael Nazzareno Trimarchi
  Cc: Ariel D'Alessandro, Jagan Teki, buildroot, Giulio Benetti,
	Yann E. MORIN, Heiko Thiery



On 12/02/2022 13:36, Michael Nazzareno Trimarchi wrote:
> Hi
> 
> On Sat, Feb 12, 2022 at 1:10 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>>
>>
>>
>> On 31/01/2022 15:55, Michael Trimarchi wrote:
>>> Add initial support for iMX8MN BSH SMM S2 PRO board:
>>>
>>> - Linux: v5.17-rc1
>>
>>    I'm a bit uncomfortable to add an -rc version. But I guess it can be updated
>> as soon as 5.17 is released.
> 
> Ok, I will then wait

  No, what I meant to say is: it's OK to do it with the -rc, just make sure that 
you update it to the release version when it comes around (which will still be 
another 8-ish weeks).

  If we still manage to merge this board before 2022.02, we'll just backport the 
bump to the LTS branch.

  Regards,
  Arnout

[snip]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-02-12 12:10 ` Arnout Vandecappelle
  2022-02-12 12:36   ` Michael Nazzareno Trimarchi
@ 2022-02-12 13:27   ` Heiko Thiery
  1 sibling, 0 replies; 10+ messages in thread
From: Heiko Thiery @ 2022-02-12 13:27 UTC (permalink / raw)
  To: Arnout Vandecappelle
  Cc: Ariel D'Alessandro, Jagan Teki, buildroot, Giulio Benetti,
	Michael Trimarchi, Yann E. MORIN

Hi,

Am Sa., 12. Feb. 2022 um 13:10 Uhr schrieb Arnout Vandecappelle
<arnout@mind.be>:
>
>
>
> On 31/01/2022 15:55, Michael Trimarchi wrote:
> > Add initial support for iMX8MN BSH SMM S2 PRO board:
> >
> > - Linux: v5.17-rc1
>
>   I'm a bit uncomfortable to add an -rc version. But I guess it can be updated
> as soon as 5.17 is released.
>
> > - Uboot 2022-01-rc1 (reference tree)
> > - Default packages from buildroot
> >
> > https://www.apertis.org/reference_hardware/imx8mn_bsh_smm_s2pro_setup/
> >
> > Add Ariel D'Alessandro as co-maintainer, we work together on
> > platform mainline
> >
> > Build and tested using:
> > docker pull registry.gitlab.com/buildroot.org/buildroot/base:20220105.2314
> >
> > Cc: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
> > Cc: Jagan Teki <jagan@amarulasolutions.com>
> > Cc: Heiko Thiery <heiko.thiery@gmail.com>
> > Cc: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> [snip]
> > 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/
>
>   You should also add configs/bsh_smms2pro_defconfig here.
>
> >   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..bc100b171d
> > --- /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 = "flash.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"
>
>   This is really a great way of doing it!

There was already a comment about that topic from Thomas:
https://lists.buildroot.org/pipermail/buildroot/2022-January/634308.html

>
> > 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..ae30666cd0
> > --- /dev/null
> > +++ b/board/bsh/bsh-imx8mn/readme.txt
> > @@ -0,0 +1,55 @@
> > +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
> > +    ├── Image
> > +    ├── flash.bin
> > +    ├── ddr3*
> > +    ├── rootfs.ext2
> > +    ├── rootfs.ext4 -> rootfs.ext2
> > +    ├── rootfs.tar
> > +    ├── sdcard.img
> > +    ├── u-boot.bin
> > +    ├── u-boot-nodtb.bin
> > +    └── u-boot-spl.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
>
>   Please also explain where you get uuu. Can we build it as part of buildroot?
> Then refer to it as output/host/bin/uuu.
>
> > +
> > +
> > +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..9fd7fb8e7c
> > --- /dev/null
> > +++ b/configs/bsh_smms2pro_defconfig
> > @@ -0,0 +1,43 @@
> > +BR2_aarch64=y
>
>   Even if the default happens to be correct, I prefer the subarch to be
> specified explicitly. That way we can change the default later without affecting
> this defconfig.
>
> > +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc3"
> > +BR2_ROOTFS_POST_BUILD_SCRIPT="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"
>
>   I may be missing something, but this doesn't seem to be used by any of the
> post- scripts?

This seems to be a leftover from the state where
"board/freescale/common/imx/imx8-bootloader-prepare.sh" was used to
generate the imx flash image. Now this is done by u-boot using binman
Therefore this argument is no longer needed.

>
> > +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"
>
>   Please use the tarball instead. Simply setting CUSTOM_VERSION should be
> sufficient - if not, linux.mk has tobe fixed.
>
> > +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_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"
>
>   Gitlab is able to generate tarballs as well. There are plenty of examples in
> the tree.
>
>
>   I would normally fix these things up while applying, but since I'm not
> entirely sure about merging a -rc kernel anyway, I'll wait for a v4 instead.
>
>   Oh, one more thing: the subject for a new defconfig is typically
> "configs/bsh_smms2pro_defconfig: new defconfig"
>
>   Regards,
>   Arnout
>
> > +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2022.01-bsh-smm2"
> > +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="imx8mn_bsh_smm_s2pro"
> > +BR2_TARGET_UBOOT_NEEDS_DTC=y
> > +BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
> > +BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
> > +BR2_TARGET_UBOOT_NEEDS_OPENSSL=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

-- 
Heiko
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-02-12 12:42     ` Arnout Vandecappelle
@ 2022-04-22 19:22       ` Ariel D'Alessandro
  2022-04-22 21:17         ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 10+ messages in thread
From: Ariel D'Alessandro @ 2022-04-22 19:22 UTC (permalink / raw)
  To: Arnout Vandecappelle, Michael Nazzareno Trimarchi
  Cc: Jagan Teki, Giulio Benetti, Yann E. MORIN, Heiko Thiery, buildroot



On 2/12/22 09:42, Arnout Vandecappelle wrote:
> 
> 
> On 12/02/2022 13:36, Michael Nazzareno Trimarchi wrote:
>> Hi
>>
>> On Sat, Feb 12, 2022 at 1:10 PM Arnout Vandecappelle <arnout@mind.be>
>> wrote:
>>>
>>>
>>>
>>> On 31/01/2022 15:55, Michael Trimarchi wrote:
>>>> Add initial support for iMX8MN BSH SMM S2 PRO board:
>>>>
>>>> - Linux: v5.17-rc1
>>>
>>>    I'm a bit uncomfortable to add an -rc version. But I guess it can
>>> be updated
>>> as soon as 5.17 is released.
>>
>> Ok, I will then wait
> 
>  No, what I meant to say is: it's OK to do it with the -rc, just make
> sure that you update it to the release version when it comes around
> (which will still be another 8-ish weeks).

Support is now almost completely merged upstream for kernel and u-boot.
We could update the patch to pull from:

* linux: v5.17 (audio for this board is enabled in v5.18-rc3)
* u-boot: v2022.07-rc1 (released on Mon 25 April 2022, 2 days remaining)

We can update later on the linux release to include to whole support and
at least we can get rid of the custom u-boot repo/branch.

Regards,
Ariel
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO
  2022-04-22 19:22       ` Ariel D'Alessandro
@ 2022-04-22 21:17         ` Michael Nazzareno Trimarchi
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Nazzareno Trimarchi @ 2022-04-22 21:17 UTC (permalink / raw)
  To: Ariel D'Alessandro
  Cc: Jagan Teki, buildroot, Giulio Benetti, Yann E. MORIN, Heiko Thiery

Hi Ariel

On Fri, Apr 22, 2022 at 9:22 PM Ariel D'Alessandro
<ariel.dalessandro@collabora.com> wrote:
>
>
>
> On 2/12/22 09:42, Arnout Vandecappelle wrote:
> >
> >
> > On 12/02/2022 13:36, Michael Nazzareno Trimarchi wrote:
> >> Hi
> >>
> >> On Sat, Feb 12, 2022 at 1:10 PM Arnout Vandecappelle <arnout@mind.be>
> >> wrote:
> >>>
> >>>
> >>>
> >>> On 31/01/2022 15:55, Michael Trimarchi wrote:
> >>>> Add initial support for iMX8MN BSH SMM S2 PRO board:
> >>>>
> >>>> - Linux: v5.17-rc1
> >>>
> >>>    I'm a bit uncomfortable to add an -rc version. But I guess it can
> >>> be updated
> >>> as soon as 5.17 is released.
> >>
> >> Ok, I will then wait
> >
> >  No, what I meant to say is: it's OK to do it with the -rc, just make
> > sure that you update it to the release version when it comes around
> > (which will still be another 8-ish weeks).
>
> Support is now almost completely merged upstream for kernel and u-boot.
> We could update the patch to pull from:
>
> * linux: v5.17 (audio for this board is enabled in v5.18-rc3)
> * u-boot: v2022.07-rc1 (released on Mon 25 April 2022, 2 days remaining)
>
> We can update later on the linux release to include to whole support and
> at least we can get rid of the custom u-boot repo/branch.
>

Ok, sorry I was busy. I will resend them with your suggestion

Michael

> Regards,
> Ariel



-- 
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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-22 21:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-31 14:55 [Buildroot] [PATCH V3] board: Add support for iMX8MN BSH SMM S2 PRO Michael Trimarchi
2022-01-31 16:19 ` Ariel D'Alessandro
2022-02-12 10:12   ` Michael Nazzareno Trimarchi
2022-02-12 11:41     ` Giulio Benetti
2022-02-12 12:10 ` Arnout Vandecappelle
2022-02-12 12:36   ` Michael Nazzareno Trimarchi
2022-02-12 12:42     ` Arnout Vandecappelle
2022-04-22 19:22       ` Ariel D'Alessandro
2022-04-22 21:17         ` Michael Nazzareno Trimarchi
2022-02-12 13:27   ` Heiko Thiery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.