All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Xilinx KV260 Support
@ 2022-04-12  9:44 Neal Frager
  2022-04-16 20:15 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Neal Frager @ 2022-04-12  9:44 UTC (permalink / raw)
  To: buildroot

Dear buildroot community,

I am working on adding a defconfig for the Xilinx KV260 Starter Kit.
It is a low cost zynqmp development kit showcasing the first Xilinx Kria K26 SOM module.
https://www.xilinx.com/products/som/kria/kv260-vision-starter-kit.html

I have managed to get buildroot up and running on the hardware, but I currently need to implement some manual steps.

Here are the issues I need to solve.  Both are related to a device tree overlay.

1. Install the zynqmp-sck-kv-g-revB.dtbo to the output/images directory:
BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/zynqmp-sm-k26-revA xilinx/zynqmp-sck-kv-g-revB"
BR2_LINUX_KERNEL_DTB_OVERLAYS_SUPPORT=y

I need the build system to install the zynqmp-sm-k26-revA.dtb and the zynqmp-sck-kv-g-revB.dtbo files to the output/images directory.
I have tried the BR2_LINUX_KERNEL_DTB_OVERLAYS_SUPPORT option above, but I do not see how to get the zynqmp-sck-kv-g-revB.dtbo
Instead of the zynqmp-sck-kv-g-revB.dtb.

2. Apply the overlay to generate a system.dtb in the post-image.sh:

I am currently using the following command to generate the system.dtb that I need for booting:
fdtoverlay -o output/images/system.dtb -i output/images/zynqmp-sm-k26-revA.dtb output/images/zynqmp-sck-kv-g-revB.dtbo

Does anyone have a good idea for how I could implement this in a generic way in the post-image.sh script?

Perhaps someone can help me with a nice way to automate this, so that I can create a proper buildroot defconfig for the KV260?

Please let me know if you have any ideas or feedback.  Thanks for any support!

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

* Re: [Buildroot] Xilinx KV260 Support
  2022-04-12  9:44 [Buildroot] Xilinx KV260 Support Neal Frager
@ 2022-04-16 20:15 ` Peter Korsgaard
  2022-04-17  6:50   ` Neal Frager
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2022-04-16 20:15 UTC (permalink / raw)
  To: Neal Frager; +Cc: buildroot

>>>>> "Neal" == Neal Frager <nealf@xilinx.com> writes:

 > Dear buildroot community,
 > I am working on adding a defconfig for the Xilinx KV260 Starter Kit.
 > It is a low cost zynqmp development kit showcasing the first Xilinx Kria K26 SOM module.
 > https://www.xilinx.com/products/som/kria/kv260-vision-starter-kit.html

Looks nice!

 > I have managed to get buildroot up and running on the hardware, but I currently need to implement some manual steps.

 > Here are the issues I need to solve.  Both are related to a device tree overlay.

 > 1. Install the zynqmp-sck-kv-g-revB.dtbo to the output/images directory:
 > BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/zynqmp-sm-k26-revA xilinx/zynqmp-sck-kv-g-revB"
 > BR2_LINUX_KERNEL_DTB_OVERLAYS_SUPPORT=y

 > I need the build system to install the zynqmp-sm-k26-revA.dtb and the
 > zynqmp-sck-kv-g-revB.dtbo files to the output/images directory.
 > I have tried the BR2_LINUX_KERNEL_DTB_OVERLAYS_SUPPORT option above, but I do not see how to get the zynqmp-sck-kv-g-revB.dtbo
 > Instead of the zynqmp-sck-kv-g-revB.dtb.

Aren't they equvalent? E.G. the only difference between a normal .dtb
and a .dtbo is afaik that dtc is executed with the -@ argument, which is
what BR2_LINUX_KERNEL_DTB_OVERLAYS_SUPPORT does.


 > 2. Apply the overlay to generate a system.dtb in the post-image.sh:

 > I am currently using the following command to generate the system.dtb that I need for booting:
 > fdtoverlay -o output/images/system.dtb -i output/images/zynqmp-sm-k26-revA.dtb output/images/zynqmp-sck-kv-g-revB.dtbo

 > Does anyone have a good idea for how I could implement this in a generic way in the post-image.sh script?

Why are you using device tree overlays in the first place if you want to
merge it back at build time?

Looking at the DTS submission from Michal, it sounds like something
(U-Boot?) should do the carrier board detection and apply the correct
overlay at runtime?

https://lkml.org/lkml/2021/9/22/116

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] Xilinx KV260 Support
  2022-04-16 20:15 ` Peter Korsgaard
@ 2022-04-17  6:50   ` Neal Frager
  0 siblings, 0 replies; 3+ messages in thread
From: Neal Frager @ 2022-04-17  6:50 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: buildroot

Hi Peter,

> Le 16 avr. 2022 à 22:15, Peter Korsgaard <peter@korsgaard.com> a écrit :
> 
> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
> 
> 
>>>>>> "Neal" == Neal Frager <nealf@xilinx.com> writes:
> 
>> Dear buildroot community,
>> I am working on adding a defconfig for the Xilinx KV260 Starter Kit.
>> It is a low cost zynqmp development kit showcasing the first Xilinx Kria K26 SOM module.
>> https://www.xilinx.com/products/som/kria/kv260-vision-starter-kit.html
> 
> Looks nice!
> 
>> I have managed to get buildroot up and running on the hardware, but I currently need to implement some manual steps.
> 
>> Here are the issues I need to solve.  Both are related to a device tree overlay.
> 
>> 1. Install the zynqmp-sck-kv-g-revB.dtbo to the output/images directory:
>> BR2_LINUX_KERNEL_INTREE_DTS_NAME="xilinx/zynqmp-sm-k26-revA xilinx/zynqmp-sck-kv-g-revB"
>> BR2_LINUX_KERNEL_DTB_OVERLAYS_SUPPORT=y
> 
>> I need the build system to install the zynqmp-sm-k26-revA.dtb and the
>> zynqmp-sck-kv-g-revB.dtbo files to the output/images directory.
>> I have tried the BR2_LINUX_KERNEL_DTB_OVERLAYS_SUPPORT option above, but I do not see how to get the zynqmp-sck-kv-g-revB.dtbo
>> Instead of the zynqmp-sck-kv-g-revB.dtb.
> 
> Aren't they equvalent? E.G. the only difference between a normal .dtb
> and a .dtbo is afaik that dtc is executed with the -@ argument, which is
> what BR2_LINUX_KERNEL_DTB_OVERLAYS_SUPPORT does.
> 
> 
>> 2. Apply the overlay to generate a system.dtb in the post-image.sh:
> 
>> I am currently using the following command to generate the system.dtb that I need for booting:
>> fdtoverlay -o output/images/system.dtb -i output/images/zynqmp-sm-k26-revA.dtb output/images/zynqmp-sck-kv-g-revB.dtbo
> 
>> Does anyone have a good idea for how I could implement this in a generic way in the post-image.sh script?
> 
> Why are you using device tree overlays in the first place if you want to
> merge it back at build time?
> 
> Looking at the DTS submission from Michal, it sounds like something
> (U-Boot?) should do the carrier board detection and apply the correct
> overlay at runtime?
> 
> https://lkml.org/lkml/2021/9/22/116
> 

Thank you for your feedback.  Yes, I confirm that this works for the Linux kernel.

Now I just need to find the correct solution for u-boot.

> --
> Bye, Peter Korsgaard

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:[~2022-04-17  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12  9:44 [Buildroot] Xilinx KV260 Support Neal Frager
2022-04-16 20:15 ` Peter Korsgaard
2022-04-17  6:50   ` Neal Frager

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.