Re: [PATCH v7 09/31] arm: xenguest_arm64: Add a empty devicetree file

2021-12-07 Thread Simon Glass
Hi Oleksandr,

On Mon, 6 Dec 2021 at 22:57, Oleksandr Andrushchenko
 wrote:
>
> Hi, Simon!
>
> On 07.12.21 02:11, Simon Glass wrote:
> > Add an empty file to prevent build errors when building with
> > CONFIG_OF_SEPARATE enabled.
> >
> > The build instructions in U-Boot do not provide enough detail to build a
> > useful devicetree, unfortunately.
> There is no such instruction exists as the device tree is built at run-time
> by the hypervisor itself depending on virtual machine configuration:
> I have already pointed that, e.g. U-boot is no different from any other
> kernel/binary running in a virtual machine.
>
> Thus I do not agree with the sentence above as it misleads.
> >
> > Signed-off-by: Simon Glass 
> > ---
> >
> > Changes in v7:
> > - Use 'empty' instead of 'fake'
> >
> >   arch/arm/dts/Makefile|  2 ++
> >   arch/arm/dts/xenguest-arm64.dts  | 15 +++
> >   configs/xenguest_arm64_defconfig |  2 +-
> >   3 files changed, 18 insertions(+), 1 deletion(-)
> >   create mode 100644 arch/arm/dts/xenguest-arm64.dts
> >
> > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > index d53bae2c350..f6345988c8c 100644
> > --- a/arch/arm/dts/Makefile
> > +++ b/arch/arm/dts/Makefile
> > @@ -1140,6 +1140,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
> >   mt8516-pumpkin.dtb \
> >   mt8518-ap1-emmc.dtb
> >
> > +dtb-$(CONFIG_XEN) += xenguest-arm64.dtb
> > +
> >   dtb-$(CONFIG_TARGET_GE_BX50V3) += \
> >   imx6q-bx50v3.dtb \
> >   imx6q-b850v3.dtb \
> > diff --git a/arch/arm/dts/xenguest-arm64.dts 
> > b/arch/arm/dts/xenguest-arm64.dts
> > new file mode 100644
> > index 000..d8734433763
> > --- /dev/null
> > +++ b/arch/arm/dts/xenguest-arm64.dts
> > @@ -0,0 +1,15 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * Empty devicetree file for xenguest_arm64
> > + *
> > + * This is required to make the board build with CONFIG OF_SEPARATE
> > + * Build instructions at xenguest_arm64.rst are inadequate for obtaining a 
> > real
> > + * devicetree.
> ditto. I will not provide any instruction as this is internal to Xen 
> implementation
> and may change depending on Xen version and virtual machine configuration.
> If someone wants that she can dig into relevant Xen sources to see how the
> device tree constructed. But this may be different between Xen versions and/or
> virtual machine settings.
>
> Please rephrase to reflect the dynamic nature of the device tree instead

Yes I updated the others but missing this one, will tidy it up when I
fix the fdtgrep problem.

Regards,
Simon


Re: [PATCH v7 09/31] arm: xenguest_arm64: Add a empty devicetree file

2021-12-06 Thread Oleksandr Andrushchenko
Hi, Simon!

On 07.12.21 02:11, Simon Glass wrote:
> Add an empty file to prevent build errors when building with
> CONFIG_OF_SEPARATE enabled.
>
> The build instructions in U-Boot do not provide enough detail to build a
> useful devicetree, unfortunately.
There is no such instruction exists as the device tree is built at run-time
by the hypervisor itself depending on virtual machine configuration:
I have already pointed that, e.g. U-boot is no different from any other
kernel/binary running in a virtual machine.

Thus I do not agree with the sentence above as it misleads.
>
> Signed-off-by: Simon Glass 
> ---
>
> Changes in v7:
> - Use 'empty' instead of 'fake'
>
>   arch/arm/dts/Makefile|  2 ++
>   arch/arm/dts/xenguest-arm64.dts  | 15 +++
>   configs/xenguest_arm64_defconfig |  2 +-
>   3 files changed, 18 insertions(+), 1 deletion(-)
>   create mode 100644 arch/arm/dts/xenguest-arm64.dts
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index d53bae2c350..f6345988c8c 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -1140,6 +1140,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
>   mt8516-pumpkin.dtb \
>   mt8518-ap1-emmc.dtb
>   
> +dtb-$(CONFIG_XEN) += xenguest-arm64.dtb
> +
>   dtb-$(CONFIG_TARGET_GE_BX50V3) += \
>   imx6q-bx50v3.dtb \
>   imx6q-b850v3.dtb \
> diff --git a/arch/arm/dts/xenguest-arm64.dts b/arch/arm/dts/xenguest-arm64.dts
> new file mode 100644
> index 000..d8734433763
> --- /dev/null
> +++ b/arch/arm/dts/xenguest-arm64.dts
> @@ -0,0 +1,15 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Empty devicetree file for xenguest_arm64
> + *
> + * This is required to make the board build with CONFIG OF_SEPARATE
> + * Build instructions at xenguest_arm64.rst are inadequate for obtaining a 
> real
> + * devicetree.
ditto. I will not provide any instruction as this is internal to Xen 
implementation
and may change depending on Xen version and virtual machine configuration.
If someone wants that she can dig into relevant Xen sources to see how the
device tree constructed. But this may be different between Xen versions and/or
virtual machine settings.

Please rephrase to reflect the dynamic nature of the device tree instead

Thank you,
Oleksandr
> + *
> + * Copyright 2021 Google LLC
> + */
> +
> +/dts-v1/;
> +
> +/ {
> +};
> diff --git a/configs/xenguest_arm64_defconfig 
> b/configs/xenguest_arm64_defconfig
> index 8d9d9133a2e..edce34346d3 100644
> --- a/configs/xenguest_arm64_defconfig
> +++ b/configs/xenguest_arm64_defconfig
> @@ -3,7 +3,7 @@ CONFIG_POSITION_INDEPENDENT=y
>   CONFIG_TARGET_XENGUEST_ARM64=y
>   CONFIG_SYS_TEXT_BASE=0x4008
>   CONFIG_SYS_MALLOC_LEN=0x200
> -CONFIG_SYS_MALLOC_F_LEN=0x2000
> +CONFIG_DEFAULT_DEVICE_TREE="xenguest-arm64"
>   CONFIG_IDENT_STRING=" xenguest"
>   CONFIG_SYS_LOAD_ADDR=0x4000
>   CONFIG_BOOTDELAY=10


[PATCH v7 09/31] arm: xenguest_arm64: Add a empty devicetree file

2021-12-06 Thread Simon Glass
Add an empty file to prevent build errors when building with
CONFIG_OF_SEPARATE enabled.

The build instructions in U-Boot do not provide enough detail to build a
useful devicetree, unfortunately.

Signed-off-by: Simon Glass 
---

Changes in v7:
- Use 'empty' instead of 'fake'

 arch/arm/dts/Makefile|  2 ++
 arch/arm/dts/xenguest-arm64.dts  | 15 +++
 configs/xenguest_arm64_defconfig |  2 +-
 3 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/xenguest-arm64.dts

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index d53bae2c350..f6345988c8c 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1140,6 +1140,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt8516-pumpkin.dtb \
mt8518-ap1-emmc.dtb
 
+dtb-$(CONFIG_XEN) += xenguest-arm64.dtb
+
 dtb-$(CONFIG_TARGET_GE_BX50V3) += \
imx6q-bx50v3.dtb \
imx6q-b850v3.dtb \
diff --git a/arch/arm/dts/xenguest-arm64.dts b/arch/arm/dts/xenguest-arm64.dts
new file mode 100644
index 000..d8734433763
--- /dev/null
+++ b/arch/arm/dts/xenguest-arm64.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Empty devicetree file for xenguest_arm64
+ *
+ * This is required to make the board build with CONFIG OF_SEPARATE
+ * Build instructions at xenguest_arm64.rst are inadequate for obtaining a real
+ * devicetree.
+ *
+ * Copyright 2021 Google LLC
+ */
+
+/dts-v1/;
+
+/ {
+};
diff --git a/configs/xenguest_arm64_defconfig b/configs/xenguest_arm64_defconfig
index 8d9d9133a2e..edce34346d3 100644
--- a/configs/xenguest_arm64_defconfig
+++ b/configs/xenguest_arm64_defconfig
@@ -3,7 +3,7 @@ CONFIG_POSITION_INDEPENDENT=y
 CONFIG_TARGET_XENGUEST_ARM64=y
 CONFIG_SYS_TEXT_BASE=0x4008
 CONFIG_SYS_MALLOC_LEN=0x200
-CONFIG_SYS_MALLOC_F_LEN=0x2000
+CONFIG_DEFAULT_DEVICE_TREE="xenguest-arm64"
 CONFIG_IDENT_STRING=" xenguest"
 CONFIG_SYS_LOAD_ADDR=0x4000
 CONFIG_BOOTDELAY=10
-- 
2.34.1.400.ga245620fadb-goog