All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/1] board/zynqmp: merge post scripts
@ 2023-07-24 10:35 Neal Frager via buildroot
  2023-08-01  7:03 ` Luca Ceresoli via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Neal Frager via buildroot @ 2023-07-24 10:35 UTC (permalink / raw)
  To: buildroot; +Cc: michal.simek, luca.ceresoli, thomas.petazzoni, Neal Frager

This patch merges the zynqmp post scripts as only one script is needed.

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 board/zynqmp/post-build.sh          | 15 ---------------
 board/zynqmp/post-image.sh          | 13 +++++++++++++
 configs/zynqmp_kria_kv260_defconfig |  2 +-
 configs/zynqmp_zcu102_defconfig     |  1 -
 configs/zynqmp_zcu106_defconfig     |  1 -
 5 files changed, 14 insertions(+), 18 deletions(-)
 delete mode 100755 board/zynqmp/post-build.sh

diff --git a/board/zynqmp/post-build.sh b/board/zynqmp/post-build.sh
deleted file mode 100755
index 747991e3f1..0000000000
--- a/board/zynqmp/post-build.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-# genimage will need to find the extlinux.conf
-# in the binaries directory
-
-CONSOLE="$2"
-ROOT="$3"
-
-mkdir -p "${BINARIES_DIR}"
-cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
-	label linux
-	  kernel /Image
-	  devicetree /system.dtb
-	  append console="${CONSOLE}" root="/dev/${ROOT}" rw rootwait
-	__HEADER_EOF
diff --git a/board/zynqmp/post-image.sh b/board/zynqmp/post-image.sh
index f44b66342d..4da8a64940 100755
--- a/board/zynqmp/post-image.sh
+++ b/board/zynqmp/post-image.sh
@@ -12,4 +12,17 @@ FIRST_DT=$(sed -nr \
 
 BOARD_DIR="$(dirname "$0")"
 
+# genimage will need to find the extlinux.conf in the binaries directory
+
+CONSOLE="$2"
+ROOT="$3"
+
+mkdir -p "${BINARIES_DIR}"
+cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
+	label linux
+	  kernel /Image
+	  devicetree /system.dtb
+	  append console="${CONSOLE}" root="/dev/${ROOT}" rw rootwait
+	__HEADER_EOF
+
 support/scripts/genimage.sh -c "${BOARD_DIR}/genimage.cfg"
diff --git a/configs/zynqmp_kria_kv260_defconfig b/configs/zynqmp_kria_kv260_defconfig
index e180d5e7e7..cecb4e9a8e 100644
--- a/configs/zynqmp_kria_kv260_defconfig
+++ b/configs/zynqmp_kria_kv260_defconfig
@@ -1,6 +1,6 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh board/zynqmp/kria/kv260/kv260.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/kria/kv260/kv260.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynqmp/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="ttyPS1,115200 mmcblk1p2 ${UBOOT_DIR}"
 BR2_LINUX_KERNEL=y
diff --git a/configs/zynqmp_zcu102_defconfig b/configs/zynqmp_zcu102_defconfig
index 00b33261b6..f5f33f1783 100644
--- a/configs/zynqmp_zcu102_defconfig
+++ b/configs/zynqmp_zcu102_defconfig
@@ -1,6 +1,5 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynqmp/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="ttyPS0,115200 mmcblk0p2"
 BR2_LINUX_KERNEL=y
diff --git a/configs/zynqmp_zcu106_defconfig b/configs/zynqmp_zcu106_defconfig
index 88295571af..eb845a9db0 100644
--- a/configs/zynqmp_zcu106_defconfig
+++ b/configs/zynqmp_zcu106_defconfig
@@ -1,6 +1,5 @@
 BR2_aarch64=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/zynqmp/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynqmp/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="ttyPS0,115200 mmcblk0p2"
 BR2_LINUX_KERNEL=y
-- 
2.25.1

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

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

* Re: [Buildroot] [PATCH v1 1/1] board/zynqmp: merge post scripts
  2023-07-24 10:35 [Buildroot] [PATCH v1 1/1] board/zynqmp: merge post scripts Neal Frager via buildroot
@ 2023-08-01  7:03 ` Luca Ceresoli via buildroot
  2023-08-01  8:22   ` Frager, Neal via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Ceresoli via buildroot @ 2023-08-01  7:03 UTC (permalink / raw)
  To: Neal Frager; +Cc: michal.simek, thomas.petazzoni, buildroot

Hi Neal,

On Mon, 24 Jul 2023 11:35:08 +0100
Neal Frager <neal.frager@amd.com> wrote:

> This patch merges the zynqmp post scripts as only one script is needed.
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
>  board/zynqmp/post-build.sh          | 15 ---------------
>  board/zynqmp/post-image.sh          | 13 +++++++++++++
>  configs/zynqmp_kria_kv260_defconfig |  2 +-
>  configs/zynqmp_zcu102_defconfig     |  1 -
>  configs/zynqmp_zcu106_defconfig     |  1 -
>  5 files changed, 14 insertions(+), 18 deletions(-)
>  delete mode 100755 board/zynqmp/post-build.sh
> 
> diff --git a/board/zynqmp/post-build.sh b/board/zynqmp/post-build.sh
> deleted file mode 100755
> index 747991e3f1..0000000000
> --- a/board/zynqmp/post-build.sh
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -#!/bin/sh
> -
> -# genimage will need to find the extlinux.conf
> -# in the binaries directory
> -
> -CONSOLE="$2"
> -ROOT="$3"
> -
> -mkdir -p "${BINARIES_DIR}"
> -cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
> -	label linux
> -	  kernel /Image
> -	  devicetree /system.dtb
> -	  append console="${CONSOLE}" root="/dev/${ROOT}" rw rootwait
> -	__HEADER_EOF
> diff --git a/board/zynqmp/post-image.sh b/board/zynqmp/post-image.sh
> index f44b66342d..4da8a64940 100755
> --- a/board/zynqmp/post-image.sh
> +++ b/board/zynqmp/post-image.sh
> @@ -12,4 +12,17 @@ FIRST_DT=$(sed -nr \
>  
>  BOARD_DIR="$(dirname "$0")"
>  
> +# genimage will need to find the extlinux.conf in the binaries directory
> +
> +CONSOLE="$2"
> +ROOT="$3"
> +
> +mkdir -p "${BINARIES_DIR}"
> +cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
> +	label linux
> +	  kernel /Image
> +	  devicetree /system.dtb
> +	  append console="${CONSOLE}" root="/dev/${ROOT}" rw rootwait
> +	__HEADER_EOF

Why is this change needed?

The extlinux.conf file generation is in always in post-build in the
whole Buildroot tree, thus moving it to post-image only for some boards
seems confusing.

Luca

-- 
Luca Ceresoli, 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] 3+ messages in thread

* Re: [Buildroot] [PATCH v1 1/1] board/zynqmp: merge post scripts
  2023-08-01  7:03 ` Luca Ceresoli via buildroot
@ 2023-08-01  8:22   ` Frager, Neal via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Frager, Neal via buildroot @ 2023-08-01  8:22 UTC (permalink / raw)
  To: Luca Ceresoli
  Cc: Simek, Michal, thomas.petazzoni@bootlin.com,
	buildroot@buildroot.org

Hi Luca,

> This patch merges the zynqmp post scripts as only one script is needed.
> 
> Signed-off-by: Neal Frager <neal.frager@amd.com>
> ---
>  board/zynqmp/post-build.sh          | 15 ---------------
>  board/zynqmp/post-image.sh          | 13 +++++++++++++
>  configs/zynqmp_kria_kv260_defconfig |  2 +-
>  configs/zynqmp_zcu102_defconfig     |  1 -
>  configs/zynqmp_zcu106_defconfig     |  1 -
>  5 files changed, 14 insertions(+), 18 deletions(-)  delete mode 
> 100755 board/zynqmp/post-build.sh
> 
> diff --git a/board/zynqmp/post-build.sh b/board/zynqmp/post-build.sh 
> deleted file mode 100755 index 747991e3f1..0000000000
> --- a/board/zynqmp/post-build.sh
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -#!/bin/sh
> -
> -# genimage will need to find the extlinux.conf -# in the binaries 
> directory
> -
> -CONSOLE="$2"
> -ROOT="$3"
> -
> -mkdir -p "${BINARIES_DIR}"
> -cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
> -	label linux
> -	  kernel /Image
> -	  devicetree /system.dtb
> -	  append console="${CONSOLE}" root="/dev/${ROOT}" rw rootwait
> -	__HEADER_EOF
> diff --git a/board/zynqmp/post-image.sh b/board/zynqmp/post-image.sh 
> index f44b66342d..4da8a64940 100755
> --- a/board/zynqmp/post-image.sh
> +++ b/board/zynqmp/post-image.sh
> @@ -12,4 +12,17 @@ FIRST_DT=$(sed -nr \
>  
>  BOARD_DIR="$(dirname "$0")"
>  
> +# genimage will need to find the extlinux.conf in the binaries 
> +directory
> +
> +CONSOLE="$2"
> +ROOT="$3"
> +
> +mkdir -p "${BINARIES_DIR}"
> +cat <<-__HEADER_EOF > "${BINARIES_DIR}/extlinux.conf"
> +	label linux
> +	  kernel /Image
> +	  devicetree /system.dtb
> +	  append console="${CONSOLE}" root="/dev/${ROOT}" rw rootwait
> +	__HEADER_EOF

> Why is this change needed?

> The extlinux.conf file generation is in always in post-build in the whole Buildroot tree, thus moving it to post-image only for some boards seems confusing.

Thanks for pointing this out.  I was not aware of this.  

I was simply looking for ways to simplify the AMD/Xilinx board files by reducing to the bare minimum number of files needed.

I agree that we should keep the extlinux.conf file generation in the post-build to keep consistency with other boards.  I will close out these merge patches.

Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-08-01  8:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24 10:35 [Buildroot] [PATCH v1 1/1] board/zynqmp: merge post scripts Neal Frager via buildroot
2023-08-01  7:03 ` Luca Ceresoli via buildroot
2023-08-01  8:22   ` Frager, Neal via buildroot

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.