All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] configs/zynqmp_kria_kv260_defconfig: fix to u-boot.itb generation
@ 2022-06-22  4:24 Neal Frager
  2022-06-22  8:29 ` Luca Ceresoli via buildroot
  2022-06-22 20:26 ` Yann E. MORIN
  0 siblings, 2 replies; 3+ messages in thread
From: Neal Frager @ 2022-06-22  4:24 UTC (permalink / raw)
  To: buildroot
  Cc: luca.ceresoli, wesley, Neal Frager, giulio.benetti, michal.simek,
	yann.morin.1998

This patch is a temporary fix for the kv260 u-boot.itb generation
until a proper fix has been implemented within u-boot.

The problem is u-boot can only be configured to use the kria k26
som dts configuration at build time, and the kv260 carrier board
overlay is missing from the build.  Without this, all of the carrier
board drivers are missing.

This patch will be removed from buildroot once u-boot can build a
correct u-boot.itb for the kria kv260 starter kit including the
carrier board overlay and corresponding drivers.

Signed-off-by: Neal Frager <neal.frager@xilinx.com>
---
V1->V2:
  - improved comments describing the u-boot.itb build issue
---
 board/zynqmp/kria/kv260/kv260.sh    | 12 ++++++++++++
 configs/zynqmp_kria_kv260_defconfig |  4 ++--
 2 files changed, 14 insertions(+), 2 deletions(-)
 create mode 100755 board/zynqmp/kria/kv260/kv260.sh

diff --git a/board/zynqmp/kria/kv260/kv260.sh b/board/zynqmp/kria/kv260/kv260.sh
new file mode 100755
index 0000000000..e3467f3068
--- /dev/null
+++ b/board/zynqmp/kria/kv260/kv260.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# This is a temporary work around for generating kv260 u-boot.itb.
+# The problem is there is no way to currently configure u-boot to apply 
+# the carrier board dtb overlay during build, so all kv260 carrier board 
+# drivers are missing.
+# This will be removed when u-boot can build the kv260 u-boot.itb natively.
+
+UBOOT_DIR=$4
+
+fdtoverlay -o ${UBOOT_DIR}/fit-dtb.blob -i ${UBOOT_DIR}/arch/arm/dts/zynqmp-smk-k26-revA.dtb ${UBOOT_DIR}/arch/arm/dts/zynqmp-sck-kv-g-revB.dtbo
+${UBOOT_DIR}/tools/mkimage -E -f ${UBOOT_DIR}/u-boot.its -B 0x8 ${BINARIES_DIR}/u-boot.itb
diff --git a/configs/zynqmp_kria_kv260_defconfig b/configs/zynqmp_kria_kv260_defconfig
index c1366b705c..d98ac89c63 100644
--- a/configs/zynqmp_kria_kv260_defconfig
+++ b/configs/zynqmp_kria_kv260_defconfig
@@ -1,8 +1,8 @@
 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_BUILD_SCRIPT="board/zynqmp/post-build.sh board/zynqmp/kria/kv260/kv260.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynqmp/post-image.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="ttyPS1,115200 mmcblk1p2"
+BR2_ROOTFS_POST_SCRIPT_ARGS="ttyPS1,115200 mmcblk1p2 ${UBOOT_DIR}"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
 BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,linux-xlnx,xlnx_rebase_v5.15_LTS_2022.1)/xlnx_rebase_v5.15_LTS_2022.1.tar.gz"
-- 
2.17.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 v2 1/1] configs/zynqmp_kria_kv260_defconfig: fix to u-boot.itb generation
  2022-06-22  4:24 [Buildroot] [PATCH v2 1/1] configs/zynqmp_kria_kv260_defconfig: fix to u-boot.itb generation Neal Frager
@ 2022-06-22  8:29 ` Luca Ceresoli via buildroot
  2022-06-22 20:26 ` Yann E. MORIN
  1 sibling, 0 replies; 3+ messages in thread
From: Luca Ceresoli via buildroot @ 2022-06-22  8:29 UTC (permalink / raw)
  To: Neal Frager
  Cc: buildroot, wesley, giulio.benetti, michal.simek, yann.morin.1998

Hi Neal,

On Tue, 21 Jun 2022 22:24:39 -0600
Neal Frager <neal.frager@xilinx.com> wrote:

> This patch is a temporary fix for the kv260 u-boot.itb generation
> until a proper fix has been implemented within u-boot.
> 
> The problem is u-boot can only be configured to use the kria k26
> som dts configuration at build time, and the kv260 carrier board
> overlay is missing from the build.  Without this, all of the carrier
> board drivers are missing.
> 
> This patch will be removed from buildroot once u-boot can build a
> correct u-boot.itb for the kria kv260 starter kit including the
> carrier board overlay and corresponding drivers.

Adding here the link provided by Michal would have been nice (and also
easy to do...):

https://lore.kernel.org/all/20920b0df6b067aca4040459a9677d7d1d6d766a.1615354376.git.viresh.kumar@linaro.org/

Maybe the BR maintainer wants to add it while applying this patch?

With this possibly added:
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

-- 
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 v2 1/1] configs/zynqmp_kria_kv260_defconfig: fix to u-boot.itb generation
  2022-06-22  4:24 [Buildroot] [PATCH v2 1/1] configs/zynqmp_kria_kv260_defconfig: fix to u-boot.itb generation Neal Frager
  2022-06-22  8:29 ` Luca Ceresoli via buildroot
@ 2022-06-22 20:26 ` Yann E. MORIN
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2022-06-22 20:26 UTC (permalink / raw)
  To: Neal Frager
  Cc: michal.simek, giulio.benetti, wesley, luca.ceresoli, buildroot

Neal, All,

On 2022-06-21 22:24 -0600, Neal Frager spake thusly:
> This patch is a temporary fix for the kv260 u-boot.itb generation
> until a proper fix has been implemented within u-boot.
> 
> The problem is u-boot can only be configured to use the kria k26
> som dts configuration at build time, and the kv260 carrier board
> overlay is missing from the build.  Without this, all of the carrier
> board drivers are missing.
> 
> This patch will be removed from buildroot once u-boot can build a
> correct u-boot.itb for the kria kv260 starter kit including the
> carrier board overlay and corresponding drivers.
> 
> Signed-off-by: Neal Frager <neal.frager@xilinx.com>

Applied to master, after just adding the URL as pointed out by Luca,
thanks.

Regards,
Yann E. MORIN.

> ---
> V1->V2:
>   - improved comments describing the u-boot.itb build issue
> ---
>  board/zynqmp/kria/kv260/kv260.sh    | 12 ++++++++++++
>  configs/zynqmp_kria_kv260_defconfig |  4 ++--
>  2 files changed, 14 insertions(+), 2 deletions(-)
>  create mode 100755 board/zynqmp/kria/kv260/kv260.sh
> 
> diff --git a/board/zynqmp/kria/kv260/kv260.sh b/board/zynqmp/kria/kv260/kv260.sh
> new file mode 100755
> index 0000000000..e3467f3068
> --- /dev/null
> +++ b/board/zynqmp/kria/kv260/kv260.sh
> @@ -0,0 +1,12 @@
> +#!/bin/sh
> +
> +# This is a temporary work around for generating kv260 u-boot.itb.
> +# The problem is there is no way to currently configure u-boot to apply 
> +# the carrier board dtb overlay during build, so all kv260 carrier board 
> +# drivers are missing.
> +# This will be removed when u-boot can build the kv260 u-boot.itb natively.
> +
> +UBOOT_DIR=$4
> +
> +fdtoverlay -o ${UBOOT_DIR}/fit-dtb.blob -i ${UBOOT_DIR}/arch/arm/dts/zynqmp-smk-k26-revA.dtb ${UBOOT_DIR}/arch/arm/dts/zynqmp-sck-kv-g-revB.dtbo
> +${UBOOT_DIR}/tools/mkimage -E -f ${UBOOT_DIR}/u-boot.its -B 0x8 ${BINARIES_DIR}/u-boot.itb
> diff --git a/configs/zynqmp_kria_kv260_defconfig b/configs/zynqmp_kria_kv260_defconfig
> index c1366b705c..d98ac89c63 100644
> --- a/configs/zynqmp_kria_kv260_defconfig
> +++ b/configs/zynqmp_kria_kv260_defconfig
> @@ -1,8 +1,8 @@
>  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_BUILD_SCRIPT="board/zynqmp/post-build.sh board/zynqmp/kria/kv260/kv260.sh"
>  BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynqmp/post-image.sh"
> -BR2_ROOTFS_POST_SCRIPT_ARGS="ttyPS1,115200 mmcblk1p2"
> +BR2_ROOTFS_POST_SCRIPT_ARGS="ttyPS1,115200 mmcblk1p2 ${UBOOT_DIR}"
>  BR2_LINUX_KERNEL=y
>  BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
>  BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,linux-xlnx,xlnx_rebase_v5.15_LTS_2022.1)/xlnx_rebase_v5.15_LTS_2022.1.tar.gz"
> -- 
> 2.17.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
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:[~2022-06-22 20:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22  4:24 [Buildroot] [PATCH v2 1/1] configs/zynqmp_kria_kv260_defconfig: fix to u-boot.itb generation Neal Frager
2022-06-22  8:29 ` Luca Ceresoli via buildroot
2022-06-22 20:26 ` Yann E. MORIN

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.