[meta-xilinx] [PATCH] layer.conf: Add "meta-python" as a layer dependency

2017-08-22 Thread Mike Looijmans
Attempting to build this layer results in the following error:

ERROR: Nothing PROVIDES 'python3-pyyaml-native'. Close matches:
  python3-rpm-native
  python3-pycurl-native
  python3-pygpgme-native
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 
'virtual/bootloader', 'virtual/dtb', 'python3-pyyaml-native']

To fix this, explain that the layer depends on meta-python for this recipe.

Signed-off-by: Mike Looijmans 
---
 conf/layer.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conf/layer.conf b/conf/layer.conf
index ce5331f..5f2a56b 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -11,7 +11,7 @@ BBFILE_COLLECTIONS += "xilinx-tools"
 BBFILE_PRIORITY_xilinx-tools = "5"
 BBFILE_PATTERN_xilinx-tools = "^${LAYERDIR}/"
 
-LAYERDEPENDS_xilinx-tools  = "core"
+LAYERDEPENDS_xilinx-tools  = "core meta-python"
 
 XLNX_SCRIPTS_DIR = "${LAYERDIR}/scripts/"
 
-- 
1.9.1

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] meta-xilinx-tools fails on "device-tree-generation" script

2017-08-22 Thread Mike Looijmans

I added "meta-xilinx-tools" to my layers and start a build for the zcu102 
board.

I'm running into this error:


mike@mikebuntu:~/projects/xilinx-platform/build$ bitbake 
core-image-minimalLoading cache: 100% 
|##| Time: 0:00:00

Loaded 2517 entries from dependency cache.
Parsing recipes: 100% 
|| Time: 0:00:00
Parsing of 1742 .bb files complete (1741 cached, 1 parsed). 2518 targets, 206 
skipped, 0 masked, 0 errors.

NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION= "1.34.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING   = "ubuntu-14.04"
TARGET_SYS= "aarch64-oe-linux"
MACHINE   = "zcu102-zynqmp"
DISTRO= "nodistro"
DISTRO_VERSION= "nodistro.0"
TUNE_FEATURES = "aarch64"
TARGET_FPU= ""
meta  = "HEAD:d11c80c9394e31c239aeeb8a9c4997642e17a020"
meta-oe
meta-python   = "HEAD:5e82995148a2844c6f483ae5ddd1438d87ea9fb7"
meta-xilinx   = "HEAD:a6121299383bd171b1a19ec019836fb6b59e6c92"
meta-xilinx-tools = "master:d300775243368ec354e9ff9fbaf2ffc0da1a9744"

Initialising tasks: 100% 
|#| Time: 0:00:03
Checking sstate mirror object availability: 100% 
|#| Time: 0:00:00

NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: device-tree-generation-xilinx+gitAUTOINC+43551819a1-r0 do_compile: 
Function failed: do_compile (log file is located at 
/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/temp/log.do_compile.16237)
ERROR: Logfile of failure stored in: 
/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/temp/log.do_compile.16237

Log data follows:
| DEBUG: Executing shell function do_compile
| gcc: error: 
/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/build/device-tree-generation/system-top.dts: 
No such file or directory

| gcc: warning: ‘-x assembler-with-cpp’ after last input file has no effect
| gcc: fatal error: no input files
| compilation terminated.
| WARNING: 
/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/temp/run.do_compile.16237:1 
exit 4 from 'gcc -E -nostdinc -Ulinux 
-I/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0 
-I/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/build/device-tree-generation 
-I/home/mike/projects/xilinx-platform/build/tmp-glibc/work-shared/zcu102-zynqmp/kernel-source/include 
-x assembler-with-cpp -o 
/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/build/device-tree-generation/zcu102-zynqmp-system.pp 
/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/build/device-tree-generation/system-top.dts'
| ERROR: Function failed: do_compile (log file is located at 
/home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/temp/log.do_compile.16237)
ERROR: Task 
(/home/mike/projects/xilinx-platform/meta-xilinx-tools/recipes-bsp/device-tree/device-tree-generation_git.bb:do_compile) 
failed with exit code '1'
NOTE: Tasks Summary: Attempted 2076 tasks of which 2073 didn't need to be 
rerun and 1 failed.


Summary: 1 task failed:

/home/mike/projects/xilinx-platform/meta-xilinx-tools/recipes-bsp/device-tree/device-tree-generation_git.bb:do_compile
Summary: There was 1 ERROR message shown, returning a non-zero exit code.


Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail



--
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] [PATCH] u-boot-xlnx: does not depend on dts, remove the dependency

2017-08-22 Thread Mike Looijmans
u-boot-xlnx_%.bbappend forces a non-existent dependency between u-boot-xlnx
and virtual/dtb. Nothing in u-boot references this dtb, so remove the bbappend.

Signed-off-by: Mike Looijmans 
---
 recipes-bsp/u-boot/u-boot-xlnx_%.bbappend | 1 -
 1 file changed, 1 deletion(-)
 delete mode 100644 recipes-bsp/u-boot/u-boot-xlnx_%.bbappend

diff --git a/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend 
b/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend
deleted file mode 100644
index 6a2c4c4..000
--- a/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-do_compile[depends] += "virtual/dtb:do_deploy"
-- 
1.9.1

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH v2 1/2] arm-trusted-firmware: Fix a double const build error

2017-08-22 Thread Nathan Rossi
On 22 August 2017 at 04:07, Alistair Francis
 wrote:
> Backport a mainline ATF patch to the Xilinx tree in order to fix the ATF
> build.
>
> Signed-off-by: Alistair Francis 

Applied.

Thanks,
Nathan

> ---
>  .../arm-trusted-firmware/arm-trusted-firmware.inc  |  2 ++
>  .../arm-trusted-firmware_2017.1.bb |  1 +
>  ...zynqmp-Remove-duplicate-const-declaration.patch | 30 
> ++
>  3 files changed, 33 insertions(+)
>  create mode 100644 
> recipes-bsp/arm-trusted-firmware/files/zynqmp-Remove-duplicate-const-declaration.patch
>
> diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc 
> b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
> index 217919c..cb7ee3e 100644
> --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
> +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
> @@ -12,6 +12,8 @@ DEPENDS += "u-boot-mkimage-native"
>  S = "${WORKDIR}/git"
>  B = "${WORKDIR}/build"
>
> +FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
> +
>  BRANCH = "master"
>  SRC_URI = 
> "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}"
>
> diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb 
> b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
> index d98ed6a..52901f2 100644
> --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
> +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
> @@ -5,3 +5,4 @@ SRCREV ?= "7d1a6732c9ae113999aeabcb9912369760d05c13"
>
>  PV = "1.3-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}"
>
> +SRC_URI += "file://zynqmp-Remove-duplicate-const-declaration.patch"
> diff --git 
> a/recipes-bsp/arm-trusted-firmware/files/zynqmp-Remove-duplicate-const-declaration.patch
>  
> b/recipes-bsp/arm-trusted-firmware/files/zynqmp-Remove-duplicate-const-declaration.patch
> new file mode 100644
> index 000..dd127fb
> --- /dev/null
> +++ 
> b/recipes-bsp/arm-trusted-firmware/files/zynqmp-Remove-duplicate-const-declaration.patch
> @@ -0,0 +1,30 @@
> +From a97f6272b7a7a8e3249df34c22479b3893746395 Mon Sep 17 00:00:00 2001
> +From: Soren Brinkmann 
> +Date: Sat, 1 Jul 2017 20:24:47 -0700
> +Subject: [PATCH] zynqmp: Remove duplicate 'const' declaration
> +
> +Fixing compilation errors due to duplicate 'const' keyword:
> +  plat/xilinx/zynqmp/pm_service/pm_client.c:39:29: error: duplicate 'const' 
> declaration specifier [-Werror=duplicate-decl-specifier]
> +   static const struct pm_proc const pm_procs_all[] = {
> +   ^
> +
> +Signed-off-by: Soren Brinkmann 
> +---
> +Upstream Status: Accepted in mainline, patch send to Xilinx
> +
> + plat/xilinx/zynqmp/pm_service/pm_client.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/plat/xilinx/zynqmp/pm_service/pm_client.c 
> b/plat/xilinx/zynqmp/pm_service/pm_client.c
> +index f11725d78..08369b99e 100644
> +--- a/plat/xilinx/zynqmp/pm_service/pm_client.c
>  b/plat/xilinx/zynqmp/pm_service/pm_client.c
> +@@ -31,7 +31,7 @@ DEFINE_BAKERY_LOCK(pm_client_secure_lock);
> + extern const struct pm_ipi apu_ipi;
> +
> + /* Order in pm_procs_all array must match cpu ids */
> +-static const struct pm_proc const pm_procs_all[] = {
> ++static const struct pm_proc pm_procs_all[] = {
> +   {
> +   .node_id = NODE_APU_0,
> +   .pwrdn_mask = APU_0_PWRCTL_CPUPWRDWNREQ_MASK,
> --
> 2.11.0
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH v2 2/2] arm-trusted-firmware: Fix a false positive out of bounds

2017-08-22 Thread Nathan Rossi
On 22 August 2017 at 04:07, Alistair Francis
 wrote:
> This error is received while building
> services/std_svc/psci/psci_common.c: In function 'psci_do_state_coordination':
> services/std_svc/psci/psci_common.c:220:27: error: array subscript is above
> array bounds [-Werror=array-bounds]
>   psci_req_local_pwr_states[pwrlvl - 1][cpu_idx] = req_pwr_state;
>
> Patch 555ebb34db8f3424c1b394df2f10ecf9c1f70901 explains why the error
> is seen and supposibly includes a fix. As the fix appears not to work,
> let's disable the error checking.
>
> Signed-off-by: Alistair Francis 

Applied.

> ---
>  .../arm-trusted-firmware_2017.1.bb |  1 +
>  ...-Resolve-GCC-static-analysis-false-positi.patch | 40 
> ++
>  2 files changed, 41 insertions(+)
>  create mode 100644 
> recipes-bsp/arm-trusted-firmware/files/psci_common-Resolve-GCC-static-analysis-false-positi.patch
>
> diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb 
> b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
> index 52901f2..e68e5cf 100644
> --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
> +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
> @@ -6,3 +6,4 @@ SRCREV ?= "7d1a6732c9ae113999aeabcb9912369760d05c13"
>  PV = "1.3-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}"
>
>  SRC_URI += "file://zynqmp-Remove-duplicate-const-declaration.patch"
> +SRC_URI += 
> "file://psci_common-Resolve-GCC-static-analysis-false-positi.patch"
> diff --git 
> a/recipes-bsp/arm-trusted-firmware/files/psci_common-Resolve-GCC-static-analysis-false-positi.patch
>  
> b/recipes-bsp/arm-trusted-firmware/files/psci_common-Resolve-GCC-static-analysis-false-positi.patch
> new file mode 100644
> index 000..f706585
> --- /dev/null
> +++ 
> b/recipes-bsp/arm-trusted-firmware/files/psci_common-Resolve-GCC-static-analysis-false-positi.patch
> @@ -0,0 +1,40 @@
> +From 0197ad57b44fb7f10ca604891e0974110748fbd5 Mon Sep 17 00:00:00 2001
> +From: Alistair Francis 
> +Date: Mon, 21 Aug 2017 10:19:40 -0700
> +Subject: [PATCH] psci_common: Resolve GCC static analysis false positive
> +
> +Previously commit 555ebb34db8f3424c1b394df2f10ec attmpted to fix this
> +GCC issue:
> +
> +services/std_svc/psci/psci_common.c: In function 
> 'psci_do_state_coordination':
> +services/std_svc/psci/psci_common.c:220:27: error: array subscript is above
> +array bounds [-Werror=array-bounds]
> +  psci_req_local_pwr_states[pwrlvl - 1][cpu_idx] = req_pwr_state;
> +
> +This fix doesn't work as asserts aren't built in non-debug build flows.
> +Let's ensure this error is fixed for all build cases.
> +
> +Signed-off-by: Alistair Francis 
> +Signed-off-by: Nathan Rossi 
> +---
> +Upstream Status: Pending

For reference I don't think upstream will accept this patch, so it
might be better to resolve by enabling assertions on the zynqmp target
like is done for tegra. That way instead of a silent failure it will
result in a assertion failure which can be seen or debugged. But this
change is ok for the current Xilinx version of ATF which ties debug
with assertion support.

Thanks,
Nathan

> +
> + lib/psci/psci_common.c | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c
> +index 68cdd6eb..a8c94215 100644
> +--- a/lib/psci/psci_common.c
>  b/lib/psci/psci_common.c
> +@@ -394,6 +394,8 @@ void psci_do_state_coordination(unsigned int end_pwrlvl,
> +   plat_local_state_t target_state, *req_states;
> +
> +   assert(end_pwrlvl <= PLAT_MAX_PWR_LVL);
> ++  if (end_pwrlvl > PLAT_MAX_PWR_LVL)
> ++  return;
> +   parent_idx = psci_cpu_pd_nodes[cpu_idx].parent_node;
> +
> +   /* For level 0, the requested state will be equivalent
> +--
> +2.11.0
> +
> --
> 2.11.0
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH 1/2] zynqmp-pmu-config.inc: Limit to specific recipes

2017-08-22 Thread Nathan Rossi
On 22 August 2017 at 06:37, Alistair Francis  wrote:
> On Mon, Aug 21, 2017 at 2:20 AM, Nathan Rossi  wrote:
>> Limit the appending/enabling of the zynqmp-pmu BBCLASSEXTEND to only
>> specific recipes which are used for the building of pmu-firmware. This
>> is just binutils, gcc, newlib, libgloss and pmu-firmware itself.
>>
>> The limiting is done based on the BPN of the recipe, which is not
>> provided as an override so the conditional is tested with an inline
>> python function.
>>
>> This change removes the need for the extender class to be enabled
>> globally which can conflict with certain recipes that were not written
>> to be extended by the BBCLASSEXTEND mechanism. This change also improves
>> the parse time avoiding the need to parse all recipes for both target
>> and zynqmp-pmu.
>>
>> Also remove the duplicate PACKAGE_EXTRA_ARCHS setting, this is already
>> done in zynqmp-pmu.bbclass itself.
>>
>> Signed-off-by: Nathan Rossi 
>
> After applying this series (on top of my ATF changes) I see these warnings:
>
> WARNING: core-image-minimal-1.0-r0 do_image_complete: Manifest
> /scratch/alistai/yocto/oe-master/build/tmp-glibc/sstate-control/manifest-allarch-zynqmp-pmu-newlib.populate_sysroot
> not found?
> WARNING: core-image-minimal-1.0-r0 do_image_complete: Manifest
> /scratch/alistai/yocto/oe-master/build/tmp-glibc/sstate-control/manifest-allarch-zynqmp-pmu-libgloss.populate_sysroot
> not found?
> WARNING: core-image-minimal-1.0-r0 do_image_complete: Manifest
> /scratch/alistai/yocto/oe-master/build/tmp-glibc/sstate-control/manifest-allarch-zynqmp-pmu-libgcc.populate_sysroot
> not found?
>
> It looks like it happens only after this patch.

Yer this is introduced because of the removal of the
"PACKAGE_EXTRA_ARCHS" setting.

More details on why it occurs described here:
https://lists.yoctoproject.org/pipermail/meta-xilinx/2017-May/002934.html

Forgot it was working around the warning :|, I will remove that part
of the change v2 incoming.

Regards,
Nathan

>
> Thanks,
> Alistair
>
>> ---
>>  conf/machine/include/zynqmp-pmu-config.inc | 14 +++---
>>  1 file changed, 11 insertions(+), 3 deletions(-)
>>
>> diff --git a/conf/machine/include/zynqmp-pmu-config.inc 
>> b/conf/machine/include/zynqmp-pmu-config.inc
>> index aa854cdcf6..f1ee275459 100644
>> --- a/conf/machine/include/zynqmp-pmu-config.inc
>> +++ b/conf/machine/include/zynqmp-pmu-config.inc
>> @@ -1,5 +1,13 @@
>>
>> -# Enable the use of zynqmp-pmu specific recipe builds
>> -BBCLASSEXTEND_append = " zynqmp-pmu"
>> -PACKAGE_EXTRA_ARCHS_append = " microblazeel-v9.2-bs-cmp"
>> +# Enable the use of zynqmp-pmu for specific recipes only
>> +def zynqmp_pmu_enable_for_bpns(d):
>> +bpns = [
>> +"binutils",
>> +"gcc", "libgcc",
>> +"newlib", "libgloss",
>> +"pmu-firmware",
>> +]
>> +return " zynqmp-pmu" if (d.getVar("BPN") in bpns) else ""
>> +
>> +BBCLASSEXTEND_append = "${@zynqmp_pmu_enable_for_bpns(d)}"
>>
>> --
>> 2.14.1
>>
>> --
>> ___
>> meta-xilinx mailing list
>> meta-xilinx@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-xilinx
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] [PATCH v2 1/2] zynqmp-pmu-config.inc: Limit to specific recipes

2017-08-22 Thread Nathan Rossi
Limit the appending/enabling of the zynqmp-pmu BBCLASSEXTEND to only
specific recipes which are used for the building of pmu-firmware. This
is just binutils, gcc, newlib, libgloss and pmu-firmware itself.

The limiting is done based on the BPN of the recipe, which is not
provided as an override so the conditional is tested with an inline
python function.

This change removes the need for the extender class to be enabled
globally which can conflict with certain recipes that were not written
to be extended by the BBCLASSEXTEND mechanism. This change also improves
the parse time avoiding the need to parse all recipes for both target
and zynqmp-pmu.

Add comment for the PACKAGE_EXTRA_ARCHS setting, so it is clear why it
is set.

Signed-off-by: Nathan Rossi 
---
 conf/machine/include/zynqmp-pmu-config.inc | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/conf/machine/include/zynqmp-pmu-config.inc 
b/conf/machine/include/zynqmp-pmu-config.inc
index aa854cdcf6..ffe2cf43b4 100644
--- a/conf/machine/include/zynqmp-pmu-config.inc
+++ b/conf/machine/include/zynqmp-pmu-config.inc
@@ -1,5 +1,19 @@
 
-# Enable the use of zynqmp-pmu specific recipe builds
-BBCLASSEXTEND_append = " zynqmp-pmu"
+# Enable the use of zynqmp-pmu for specific recipes only
+def zynqmp_pmu_enable_for_bpns(d):
+bpns = [
+"binutils",
+"gcc", "libgcc",
+"newlib", "libgloss",
+"pmu-firmware",
+]
+return " zynqmp-pmu" if (d.getVar("BPN") in bpns) else ""
+
+BBCLASSEXTEND_append = "${@zynqmp_pmu_enable_for_bpns(d)}"
+
+# Add the pkgarch to the extra list, this is done to avoid warnings about
+# missing manifests due to implicit dependency chains on populate_sysroot when
+# a recipe/task depends on a IMAGE_EXTRADEPENDS/do_deploy task which is
+# provided by a zynqmp-pmu-* target.
 PACKAGE_EXTRA_ARCHS_append = " microblazeel-v9.2-bs-cmp"
 
-- 
2.14.1

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


[meta-xilinx] [PATCH v2 2/2] zynqmp-pmu.bbclass: Fix issues with zynqmp-pmu and multilib

2017-08-22 Thread Nathan Rossi
When using multilib the MULTILIB_VARIANTS variable is populated, this
triggers differing code paths in certain recipes. These are not desired
for the firmware building, since they modify the install paths.

Also set the DEFAULTTUNE to avoid changes to BASELIB/baselib when
multilib is used, as it attempts to set BASELIB based on 'tune-*'
overrides.

Signed-off-by: Nathan Rossi 
---
 classes/zynqmp-pmu.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/classes/zynqmp-pmu.bbclass b/classes/zynqmp-pmu.bbclass
index 3ebe48813e..714eb96a77 100644
--- a/classes/zynqmp-pmu.bbclass
+++ b/classes/zynqmp-pmu.bbclass
@@ -16,6 +16,7 @@
 ORIG_TARGET_ARCH := "${TARGET_ARCH}"
 
 # zynqmp-pmu target arch (hardcoded based on pre-gen data from 
arch-microblaze.inc)
+DEFAULTTUNE = "microblaze"
 ABIEXTENSION = ""
 TUNE_ARCH = "microblazeel"
 #TUNE_FEATURES_tune-microblaze += "v9.2 barrel-shift pattern-compare"
@@ -65,6 +66,9 @@ python multitarget_zynqmp_pmu_virtclass_handler () {
 e.data.setVar("MLPREFIX", variant + "-")
 e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + 
":virtclass-" + variant)
 
+# hide multilib variants, this class is not one but this works around 
recipes thinking it is (due to MLPREFIX).
+e.data.setVar("MULTILIB_VARIANTS", "")
+
 # work around for -cross recipes that embed the TARGET_ARCH value
 if bb.data.inherits_class('cross', e.data):
 if initialpn.endswith("-" + d.getVar("ORIG_TARGET_ARCH")):
-- 
2.14.1

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] How to boot the ZynqMP?

2017-08-22 Thread Giordon Stark
Hi,

I'll share my experiences as it has been somewhat painful -- but I did
manage to have success booting from an SD card directly for MPSOC. I'm
working on QSPI boot -- but I wrote my experiences/guide here:
https://github.com/kratsg/meta-l1calo/wiki/ZynqMP:-Prepare-and-Boot-Hardware


You can also compare it to how I did it for the Zynq-7 -- to see the
differences. But this might help you get a bit further if you haven't
already.

Giordon

On Tue, Aug 22, 2017 at 12:47 AM Mike Looijmans 
wrote:

> On 22-08-17 02:25, Jean-Francois Dagenais wrote:
> >
> >>
>
> Kind regards,
>
> Mike Looijmans
> System Expert
>
> TOPIC Products
> Materiaalweg 4, NL-5681 RJ Best
> Postbus 440, NL-5680 AK Best
> Telefoon: +31 (0) 499 33 69 79 <+31%20499%20336%20979>
> E-mail: mike.looijm...@topicproducts.com
> Website: www.topicproducts.com
>
> Please consider the environment before printing this e-mail
>
>
>
> On Aug 21, 2017, at 04:20, Mike Looijmans  wrote:
> >>
> >>
> >> I recall having done this stuff about half a year ago, and at least
> then I could create an SPL based loader that actually booted. The layer
> above looks like regression to me.
> >
> > Xilinx "official" support is in FSBL for zynqmp. They removed the SPL
> zynqmp stuff from their u-boot fork if I am not mistaken. And they
> configure everything using their own stack including other layers such as
> meta-linaro and meta-petalinux.
> >
>
> I'm not sure they removed it, the u-boot-xlnx fork is about 8 months
> behind on
> mainline u-boot.
>
> Stangely, the mainline version has SPL support, an I actually can get the
> board to boot with SPL. But I can't figure out how to make it load PMU and
> ATF.
>
> There have been dozens of commits from Xilinx to support the zynqmp in
> u-boot
> mainline. None of these are in the Xilnx fork, so I assumed that Xilinx had
> seen the light... Apparently the opposite is true.
>
> >>
> >> Current state is that if I generate FSBL using Vivado SDK I can make it
> load u-boot by generating a boot.bin containing the FSBL and u-boot.elf.
> But then I don't have the PMU firmware and ATF and thus the kernel won't
> run.
> >
> > Had the same problem. This is because we are hanging on to the old trail
> (without the extra layers Xilinx wants us to use).
> >
> >>
> >> I tried putting ATF and PMU firmware from the meta-xilinx build into
> the boot.bin using the proper attributes, but that results in complete and
> utter quiet hangup after power-up. I only see the FSBL start message on the
> uart.
> >
> > I had to fork a machine from zcu102 in u-boot (so I forked u-boot-xlnx)
> in my env. Also forked meta-xilinx-tools such that my machine does the same
> configuration of xilinx-bootbin as zcu102 so the ATF and PMU firmware are
> bundled inside boot.bin. My fork of
> u-boot-xlnx/include/configs/xilinx_zynqmp_zcu102.h is where I tie it all
> together with the right file names for linux image and dtb to match what I
> have put into the partition using wic, and the default names that yocto
> uses for those.
> >
> > It was a bit of a hassle, and a annoyance compared to the ease of build
> of the zynq7 series board, but in the end, learned a lot and am more than
> ever the master of my domain! ;)
> >
>
> At least now I understand why there's so little interest in the MPSOC. The
> licensing alone is a nightmare.
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH v2 1/2] arm-trusted-firmware: Fix a double const build error

2017-08-22 Thread Alistair Francis
On Tue, Aug 22, 2017 at 7:30 AM, Nathan Rossi  wrote:
> On 22 August 2017 at 04:07, Alistair Francis
>  wrote:
>> Backport a mainline ATF patch to the Xilinx tree in order to fix the ATF
>> build.
>>
>> Signed-off-by: Alistair Francis 
>
> Applied.

Thanks, this will also be fixed in the 2017.3 release.

Alistair

>
> Thanks,
> Nathan
>
>> ---
>>  .../arm-trusted-firmware/arm-trusted-firmware.inc  |  2 ++
>>  .../arm-trusted-firmware_2017.1.bb |  1 +
>>  ...zynqmp-Remove-duplicate-const-declaration.patch | 30 
>> ++
>>  3 files changed, 33 insertions(+)
>>  create mode 100644 
>> recipes-bsp/arm-trusted-firmware/files/zynqmp-Remove-duplicate-const-declaration.patch
>>
>> diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc 
>> b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
>> index 217919c..cb7ee3e 100644
>> --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
>> +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware.inc
>> @@ -12,6 +12,8 @@ DEPENDS += "u-boot-mkimage-native"
>>  S = "${WORKDIR}/git"
>>  B = "${WORKDIR}/build"
>>
>> +FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
>> +
>>  BRANCH = "master"
>>  SRC_URI = 
>> "git://github.com/Xilinx/arm-trusted-firmware.git;protocol=https;branch=${BRANCH}"
>>
>> diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb 
>> b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
>> index d98ed6a..52901f2 100644
>> --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
>> +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
>> @@ -5,3 +5,4 @@ SRCREV ?= "7d1a6732c9ae113999aeabcb9912369760d05c13"
>>
>>  PV = "1.3-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}"
>>
>> +SRC_URI += "file://zynqmp-Remove-duplicate-const-declaration.patch"
>> diff --git 
>> a/recipes-bsp/arm-trusted-firmware/files/zynqmp-Remove-duplicate-const-declaration.patch
>>  
>> b/recipes-bsp/arm-trusted-firmware/files/zynqmp-Remove-duplicate-const-declaration.patch
>> new file mode 100644
>> index 000..dd127fb
>> --- /dev/null
>> +++ 
>> b/recipes-bsp/arm-trusted-firmware/files/zynqmp-Remove-duplicate-const-declaration.patch
>> @@ -0,0 +1,30 @@
>> +From a97f6272b7a7a8e3249df34c22479b3893746395 Mon Sep 17 00:00:00 2001
>> +From: Soren Brinkmann 
>> +Date: Sat, 1 Jul 2017 20:24:47 -0700
>> +Subject: [PATCH] zynqmp: Remove duplicate 'const' declaration
>> +
>> +Fixing compilation errors due to duplicate 'const' keyword:
>> +  plat/xilinx/zynqmp/pm_service/pm_client.c:39:29: error: duplicate 'const' 
>> declaration specifier [-Werror=duplicate-decl-specifier]
>> +   static const struct pm_proc const pm_procs_all[] = {
>> +   ^
>> +
>> +Signed-off-by: Soren Brinkmann 
>> +---
>> +Upstream Status: Accepted in mainline, patch send to Xilinx
>> +
>> + plat/xilinx/zynqmp/pm_service/pm_client.c | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/plat/xilinx/zynqmp/pm_service/pm_client.c 
>> b/plat/xilinx/zynqmp/pm_service/pm_client.c
>> +index f11725d78..08369b99e 100644
>> +--- a/plat/xilinx/zynqmp/pm_service/pm_client.c
>>  b/plat/xilinx/zynqmp/pm_service/pm_client.c
>> +@@ -31,7 +31,7 @@ DEFINE_BAKERY_LOCK(pm_client_secure_lock);
>> + extern const struct pm_ipi apu_ipi;
>> +
>> + /* Order in pm_procs_all array must match cpu ids */
>> +-static const struct pm_proc const pm_procs_all[] = {
>> ++static const struct pm_proc pm_procs_all[] = {
>> +   {
>> +   .node_id = NODE_APU_0,
>> +   .pwrdn_mask = APU_0_PWRCTL_CPUPWRDWNREQ_MASK,
>> --
>> 2.11.0
>>
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH v2 2/2] arm-trusted-firmware: Fix a false positive out of bounds

2017-08-22 Thread Alistair Francis
On Tue, Aug 22, 2017 at 7:31 AM, Nathan Rossi  wrote:
> On 22 August 2017 at 04:07, Alistair Francis
>  wrote:
>> This error is received while building
>> services/std_svc/psci/psci_common.c: In function 
>> 'psci_do_state_coordination':
>> services/std_svc/psci/psci_common.c:220:27: error: array subscript is above
>> array bounds [-Werror=array-bounds]
>>   psci_req_local_pwr_states[pwrlvl - 1][cpu_idx] = req_pwr_state;
>>
>> Patch 555ebb34db8f3424c1b394df2f10ecf9c1f70901 explains why the error
>> is seen and supposibly includes a fix. As the fix appears not to work,
>> let's disable the error checking.
>>
>> Signed-off-by: Alistair Francis 
>
> Applied.
>
>> ---
>>  .../arm-trusted-firmware_2017.1.bb |  1 +
>>  ...-Resolve-GCC-static-analysis-false-positi.patch | 40 
>> ++
>>  2 files changed, 41 insertions(+)
>>  create mode 100644 
>> recipes-bsp/arm-trusted-firmware/files/psci_common-Resolve-GCC-static-analysis-false-positi.patch
>>
>> diff --git a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb 
>> b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
>> index 52901f2..e68e5cf 100644
>> --- a/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
>> +++ b/recipes-bsp/arm-trusted-firmware/arm-trusted-firmware_2017.1.bb
>> @@ -6,3 +6,4 @@ SRCREV ?= "7d1a6732c9ae113999aeabcb9912369760d05c13"
>>  PV = "1.3-xilinx-${XILINX_RELEASE_VERSION}+git${SRCPV}"
>>
>>  SRC_URI += "file://zynqmp-Remove-duplicate-const-declaration.patch"
>> +SRC_URI += 
>> "file://psci_common-Resolve-GCC-static-analysis-false-positi.patch"
>> diff --git 
>> a/recipes-bsp/arm-trusted-firmware/files/psci_common-Resolve-GCC-static-analysis-false-positi.patch
>>  
>> b/recipes-bsp/arm-trusted-firmware/files/psci_common-Resolve-GCC-static-analysis-false-positi.patch
>> new file mode 100644
>> index 000..f706585
>> --- /dev/null
>> +++ 
>> b/recipes-bsp/arm-trusted-firmware/files/psci_common-Resolve-GCC-static-analysis-false-positi.patch
>> @@ -0,0 +1,40 @@
>> +From 0197ad57b44fb7f10ca604891e0974110748fbd5 Mon Sep 17 00:00:00 2001
>> +From: Alistair Francis 
>> +Date: Mon, 21 Aug 2017 10:19:40 -0700
>> +Subject: [PATCH] psci_common: Resolve GCC static analysis false positive
>> +
>> +Previously commit 555ebb34db8f3424c1b394df2f10ec attmpted to fix this
>> +GCC issue:
>> +
>> +services/std_svc/psci/psci_common.c: In function 
>> 'psci_do_state_coordination':
>> +services/std_svc/psci/psci_common.c:220:27: error: array subscript is above
>> +array bounds [-Werror=array-bounds]
>> +  psci_req_local_pwr_states[pwrlvl - 1][cpu_idx] = req_pwr_state;
>> +
>> +This fix doesn't work as asserts aren't built in non-debug build flows.
>> +Let's ensure this error is fixed for all build cases.
>> +
>> +Signed-off-by: Alistair Francis 
>> +Signed-off-by: Nathan Rossi 
>> +---
>> +Upstream Status: Pending
>
> For reference I don't think upstream will accept this patch, so it
> might be better to resolve by enabling assertions on the zynqmp target
> like is done for tegra. That way instead of a silent failure it will
> result in a assertion failure which can be seen or debugged. But this
> change is ok for the current Xilinx version of ATF which ties debug
> with assertion support.

At the moment it seems like they are willing to accept it. It has
changed a little, but hopefully it will make it in. From there we
should be able to port it to Xilinx's fork.

https://github.com/ARM-software/arm-trusted-firmware/pull/1058

Thanks,
Alistair

>
> Thanks,
> Nathan
>
>> +
>> + lib/psci/psci_common.c | 2 ++
>> + 1 file changed, 2 insertions(+)
>> +
>> +diff --git a/lib/psci/psci_common.c b/lib/psci/psci_common.c
>> +index 68cdd6eb..a8c94215 100644
>> +--- a/lib/psci/psci_common.c
>>  b/lib/psci/psci_common.c
>> +@@ -394,6 +394,8 @@ void psci_do_state_coordination(unsigned int end_pwrlvl,
>> +   plat_local_state_t target_state, *req_states;
>> +
>> +   assert(end_pwrlvl <= PLAT_MAX_PWR_LVL);
>> ++  if (end_pwrlvl > PLAT_MAX_PWR_LVL)
>> ++  return;
>> +   parent_idx = psci_cpu_pd_nodes[cpu_idx].parent_node;
>> +
>> +   /* For level 0, the requested state will be equivalent
>> +--
>> +2.11.0
>> +
>> --
>> 2.11.0
>>
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH v2 1/2] zynqmp-pmu-config.inc: Limit to specific recipes

2017-08-22 Thread Alistair Francis
On Tue, Aug 22, 2017 at 7:33 AM, Nathan Rossi  wrote:
> Limit the appending/enabling of the zynqmp-pmu BBCLASSEXTEND to only
> specific recipes which are used for the building of pmu-firmware. This
> is just binutils, gcc, newlib, libgloss and pmu-firmware itself.
>
> The limiting is done based on the BPN of the recipe, which is not
> provided as an override so the conditional is tested with an inline
> python function.
>
> This change removes the need for the extender class to be enabled
> globally which can conflict with certain recipes that were not written
> to be extended by the BBCLASSEXTEND mechanism. This change also improves
> the parse time avoiding the need to parse all recipes for both target
> and zynqmp-pmu.
>
> Add comment for the PACKAGE_EXTRA_ARCHS setting, so it is clear why it
> is set.
>
> Signed-off-by: Nathan Rossi 

Acked-by: Alistair Francis 
Tested-by: Alistair Francis 

Thanks,
Alistair

> ---
>  conf/machine/include/zynqmp-pmu-config.inc | 18 --
>  1 file changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/conf/machine/include/zynqmp-pmu-config.inc 
> b/conf/machine/include/zynqmp-pmu-config.inc
> index aa854cdcf6..ffe2cf43b4 100644
> --- a/conf/machine/include/zynqmp-pmu-config.inc
> +++ b/conf/machine/include/zynqmp-pmu-config.inc
> @@ -1,5 +1,19 @@
>
> -# Enable the use of zynqmp-pmu specific recipe builds
> -BBCLASSEXTEND_append = " zynqmp-pmu"
> +# Enable the use of zynqmp-pmu for specific recipes only
> +def zynqmp_pmu_enable_for_bpns(d):
> +bpns = [
> +"binutils",
> +"gcc", "libgcc",
> +"newlib", "libgloss",
> +"pmu-firmware",
> +]
> +return " zynqmp-pmu" if (d.getVar("BPN") in bpns) else ""
> +
> +BBCLASSEXTEND_append = "${@zynqmp_pmu_enable_for_bpns(d)}"
> +
> +# Add the pkgarch to the extra list, this is done to avoid warnings about
> +# missing manifests due to implicit dependency chains on populate_sysroot 
> when
> +# a recipe/task depends on a IMAGE_EXTRADEPENDS/do_deploy task which is
> +# provided by a zynqmp-pmu-* target.
>  PACKAGE_EXTRA_ARCHS_append = " microblazeel-v9.2-bs-cmp"
>
> --
> 2.14.1
>
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] How to boot the ZynqMP?

2017-08-22 Thread Giordon Stark
Hi Manju,

Were there changes recently to get this working? When I tried
meta-xilinx-tools back when I wrote the wiki as a second option instead of
going through the GUI -- I kept getting stuck on the PMU FW portion and was
unable to get the board to continue booting (instead it would do a kernel
panic) and I never figured out what happened, especially since I got it
working with XSDK. Are you saying it should work now? If so, I can look
into it.

Does anyone know how to make the partitioning step a bit easier for SD
Card? It seems needlessly complex right now, but I guess it'll improve
later on?

Thanks,

Giordon

On Tue, Aug 22, 2017 at 1:25 PM Manjukumar Harthikote Matha <
manju...@xilinx.com> wrote:

> Hi Giordon,
>
> meta-xilinx-tools with xsct in your path would enable the same way ,
> instead of using the Vivado GUI to generate fsbl/pmu/boot.bin
>
>
>
> http://www.wiki.xilinx.com/Using+meta-xilinx-tools+layer
>
>
>
> Thanks,
>
> Manju
>
>
>
> *From:* meta-xilinx-boun...@yoctoproject.org [mailto:
> meta-xilinx-boun...@yoctoproject.org] *On Behalf Of *Giordon Stark
> *Sent:* Tuesday, August 22, 2017 7:46 AM
> *To:* Mike Looijmans ; Jean-Francois Dagenais <
> jeff.dagen...@gmail.com>
> *Cc:* meta-xilinx@yoctoproject.org
> *Subject:* Re: [meta-xilinx] How to boot the ZynqMP?
>
>
>
> Hi,
>
>
>
> I'll share my experiences as it has been somewhat painful -- but I did
> manage to have success booting from an SD card directly for MPSOC. I'm
> working on QSPI boot -- but I wrote my experiences/guide here:
> https://github.com/kratsg/meta-l1calo/wiki/ZynqMP:-Prepare-and-Boot-Hardware
>
>
>
>
> You can also compare it to how I did it for the Zynq-7 -- to see the
> differences. But this might help you get a bit further if you haven't
> already.
>
>
>
> Giordon
>
> On Tue, Aug 22, 2017 at 12:47 AM Mike Looijmans 
> wrote:
>
> On 22-08-17 02:25, Jean-Francois Dagenais wrote:
> >
> >>
>
> Kind regards,
>
> Mike Looijmans
> System Expert
>
> TOPIC Products
> Materiaalweg 4, NL-5681 RJ Best
> Postbus 440, NL-5680 AK Best
> Telefoon: +31 (0) 499 33 69 79 <+31%20499%20336%20979>
> E-mail: mike.looijm...@topicproducts.com
> Website: www.topicproducts.com
>
> Please consider the environment before printing this e-mail
>
>
>
> On Aug 21, 2017, at 04:20, Mike Looijmans  wrote:
> >>
> >>
> >> I recall having done this stuff about half a year ago, and at least
> then I could create an SPL based loader that actually booted. The layer
> above looks like regression to me.
> >
> > Xilinx "official" support is in FSBL for zynqmp. They removed the SPL
> zynqmp stuff from their u-boot fork if I am not mistaken. And they
> configure everything using their own stack including other layers such as
> meta-linaro and meta-petalinux.
> >
>
> I'm not sure they removed it, the u-boot-xlnx fork is about 8 months
> behind on
> mainline u-boot.
>
> Stangely, the mainline version has SPL support, an I actually can get the
> board to boot with SPL. But I can't figure out how to make it load PMU and
> ATF.
>
> There have been dozens of commits from Xilinx to support the zynqmp in
> u-boot
> mainline. None of these are in the Xilnx fork, so I assumed that Xilinx had
> seen the light... Apparently the opposite is true.
>
> >>
> >> Current state is that if I generate FSBL using Vivado SDK I can make it
> load u-boot by generating a boot.bin containing the FSBL and u-boot.elf.
> But then I don't have the PMU firmware and ATF and thus the kernel won't
> run.
> >
> > Had the same problem. This is because we are hanging on to the old trail
> (without the extra layers Xilinx wants us to use).
> >
> >>
> >> I tried putting ATF and PMU firmware from the meta-xilinx build into
> the boot.bin using the proper attributes, but that results in complete and
> utter quiet hangup after power-up. I only see the FSBL start message on the
> uart.
> >
> > I had to fork a machine from zcu102 in u-boot (so I forked u-boot-xlnx)
> in my env. Also forked meta-xilinx-tools such that my machine does the same
> configuration of xilinx-bootbin as zcu102 so the ATF and PMU firmware are
> bundled inside boot.bin. My fork of
> u-boot-xlnx/include/configs/xilinx_zynqmp_zcu102.h is where I tie it all
> together with the right file names for linux image and dtb to match what I
> have put into the partition using wic, and the default names that yocto
> uses for those.
> >
> > It was a bit of a hassle, and a annoyance compared to the ease of build
> of the zynq7 series board, but in the end, learned a lot and am more than
> ever the master of my domain! ;)
> >
>
> At least now I understand why there's so little interest in the MPSOC. The
> licensing alone is a nightmare.
> --
> ___
> meta-xilinx mailing list
> meta-xilinx@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-xilinx
>
>
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/

Re: [meta-xilinx] [PATCH] u-boot-xlnx: does not depend on dts, remove the dependency

2017-08-22 Thread Manjukumar Harthikote Matha
Hi Mike,

> -Original Message-
> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
> boun...@yoctoproject.org] On Behalf Of Mike Looijmans
> Sent: Tuesday, August 22, 2017 1:05 AM
> To: meta-xilinx@yoctoproject.org
> Subject: [meta-xilinx] [PATCH] u-boot-xlnx: does not depend on dts, remove the
> dependency

Can you please add meta-xilinx-tools in the subject if it is intended for 
meta-xilinx-tools layer

> 
> u-boot-xlnx_%.bbappend forces a non-existent dependency between u-boot-xlnx
> and virtual/dtb. Nothing in u-boot references this dtb, so remove the 
> bbappend.
> 
> Signed-off-by: Mike Looijmans 
> ---
>  recipes-bsp/u-boot/u-boot-xlnx_%.bbappend | 1 -
>  1 file changed, 1 deletion(-)
>  delete mode 100644 recipes-bsp/u-boot/u-boot-xlnx_%.bbappend
> 
> diff --git a/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend b/recipes-bsp/u-boot/u-
> boot-xlnx_%.bbappend
> deleted file mode 100644
> index 6a2c4c4..000
> --- a/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend
> +++ /dev/null
> @@ -1 +0,0 @@
> -do_compile[depends] += "virtual/dtb:do_deploy"

Virtual/dtb is provided by device-tree-generation 
https://github.com/Xilinx/meta-xilinx-tools/blob/master/recipes-bsp/device-tree/device-tree-generation_git.bb#L8

Thanks,
Manju
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] meta-xilinx-tools fails on "device-tree-generation" script

2017-08-22 Thread Manjukumar Harthikote Matha
Hi Mike,

> -Original Message-
> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
> boun...@yoctoproject.org] On Behalf Of Mike Looijmans
> Sent: Tuesday, August 22, 2017 12:54 AM
> To: meta-xilinx@yoctoproject.org
> Subject: [meta-xilinx] meta-xilinx-tools fails on "device-tree-generation" 
> script
> 
> I added "meta-xilinx-tools" to my layers and start a build for the zcu102 
> board.
> 
> I'm running into this error:
> 
> 
> mike@mikebuntu:~/projects/xilinx-platform/build$ bitbake core-image-
> minimalLoading cache: 100%
> |##|
> |Time: 0:00:00
> Loaded 2517 entries from dependency cache.
> Parsing recipes: 100%
> ||
> Time:
> |0:00:00
> Parsing of 1742 .bb files complete (1741 cached, 1 parsed). 2518 targets, 206
> skipped, 0 masked, 0 errors.
> NOTE: Resolving any missing task queue dependencies
> 
> Build Configuration:
> BB_VERSION= "1.34.0"
> BUILD_SYS = "x86_64-linux"
> NATIVELSBSTRING   = "ubuntu-14.04"
> TARGET_SYS= "aarch64-oe-linux"
> MACHINE   = "zcu102-zynqmp"
> DISTRO= "nodistro"
> DISTRO_VERSION= "nodistro.0"
> TUNE_FEATURES = "aarch64"
> TARGET_FPU= ""
> meta  = "HEAD:d11c80c9394e31c239aeeb8a9c4997642e17a020"
> meta-oe
> meta-python   = "HEAD:5e82995148a2844c6f483ae5ddd1438d87ea9fb7"
> meta-xilinx   = "HEAD:a6121299383bd171b1a19ec019836fb6b59e6c92"
> meta-xilinx-tools = "master:d300775243368ec354e9ff9fbaf2ffc0da1a9744"
> 
> Initialising tasks: 100%
> |#| Time:
> |0:00:03
> Checking sstate mirror object availability: 100%
> |#| Time: 0:00:00
> NOTE: Executing SetScene Tasks
> NOTE: Executing RunQueue Tasks
> ERROR: device-tree-generation-xilinx+gitAUTOINC+43551819a1-r0 do_compile:
> Function failed: do_compile (log file is located at
> /home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-
> linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-
> r0/temp/log.do_compile.16237)
> ERROR: Logfile of failure stored in:
> /home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-
> linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-
> r0/temp/log.do_compile.16237
> Log data follows:
> | DEBUG: Executing shell function do_compile
> | gcc: error:
> /home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp-oe-
> linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/build/device-tree-
> generation/system-top.dts:
> No such file or directory
> | gcc: warning: ‘-x assembler-with-cpp’ after last input file has no
> | effect
> | gcc: fatal error: no input files
> | compilation terminated.


Seems like system-top.dts is not being generated, is xsct in your path? Xsct is 
required to use DTG. This would generate the required dts files depending on 
HDF 

Thanks,
Manju

-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] meta-xilinx-tools fails on "device-tree-generation" script

2017-08-22 Thread Manjukumar Harthikote Matha


> -Original Message-
> From: Manjukumar Harthikote Matha
> Sent: Tuesday, August 22, 2017 11:14 AM
> To: 'Mike Looijmans' ; meta-xilinx@yoctoproject.org
> Subject: RE: [meta-xilinx] meta-xilinx-tools fails on 
> "device-tree-generation" script
> 
> Hi Mike,
> 
> > -Original Message-
> > From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
> > boun...@yoctoproject.org] On Behalf Of Mike Looijmans
> > Sent: Tuesday, August 22, 2017 12:54 AM
> > To: meta-xilinx@yoctoproject.org
> > Subject: [meta-xilinx] meta-xilinx-tools fails on
> > "device-tree-generation" script
> >
> > I added "meta-xilinx-tools" to my layers and start a build for the zcu102 
> > board.
> >
> > I'm running into this error:
> >
> >
> > mike@mikebuntu:~/projects/xilinx-platform/build$ bitbake core-image-
> > minimalLoading cache: 100%
> >
> |##|
> > |Time: 0:00:00
> > Loaded 2517 entries from dependency cache.
> > Parsing recipes: 100%
> > ||
> > Time:
> > |0:00:00
> > Parsing of 1742 .bb files complete (1741 cached, 1 parsed). 2518
> > targets, 206 skipped, 0 masked, 0 errors.
> > NOTE: Resolving any missing task queue dependencies
> >
> > Build Configuration:
> > BB_VERSION= "1.34.0"
> > BUILD_SYS = "x86_64-linux"
> > NATIVELSBSTRING   = "ubuntu-14.04"
> > TARGET_SYS= "aarch64-oe-linux"
> > MACHINE   = "zcu102-zynqmp"
> > DISTRO= "nodistro"
> > DISTRO_VERSION= "nodistro.0"
> > TUNE_FEATURES = "aarch64"
> > TARGET_FPU= ""
> > meta  = "HEAD:d11c80c9394e31c239aeeb8a9c4997642e17a020"
> > meta-oe
> > meta-python   = "HEAD:5e82995148a2844c6f483ae5ddd1438d87ea9fb7"
> > meta-xilinx   = "HEAD:a6121299383bd171b1a19ec019836fb6b59e6c92"
> > meta-xilinx-tools = "master:d300775243368ec354e9ff9fbaf2ffc0da1a9744"
> >
> > Initialising tasks: 100%
> > |#|
> Time:
> > |0:00:03
> > Checking sstate mirror object availability: 100%
> > |#| Time: 0:00:00
> > NOTE: Executing SetScene Tasks
> > NOTE: Executing RunQueue Tasks
> > ERROR: device-tree-generation-xilinx+gitAUTOINC+43551819a1-r0 do_compile:
> > Function failed: do_compile (log file is located at
> > /home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp
> > -oe-
> > linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-
> > r0/temp/log.do_compile.16237)
> > ERROR: Logfile of failure stored in:
> > /home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp
> > -oe-
> > linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-
> > r0/temp/log.do_compile.16237
> > Log data follows:
> > | DEBUG: Executing shell function do_compile
> > | gcc: error:
> > /home/mike/projects/xilinx-platform/build/tmp-glibc/work/zcu102_zynqmp
> > -oe-
> > linux/device-tree-generation/xilinx+gitAUTOINC+43551819a1-r0/build/dev
> > ice-tree-
> > generation/system-top.dts:
> > No such file or directory
> > | gcc: warning: ‘-x assembler-with-cpp’ after last input file has no
> > | effect
> > | gcc: fatal error: no input files
> > | compilation terminated.
> 
> 
> Seems like system-top.dts is not being generated, is xsct in your path? Xsct 
> is
> required to use DTG. This would generate the required dts files depending on 
> HDF

Maybe this wiring is still missing
https://github.com/Xilinx/meta-xilinx/blob/rel-v2017.1/conf/machine/include/machine-xilinx-default.inc#L3

Thanks,
Manju


-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] How to boot the ZynqMP?

2017-08-22 Thread Manjukumar Harthikote Matha
Hi Giordon,
meta-xilinx-tools with xsct in your path would enable the same way , instead of 
using the Vivado GUI to generate fsbl/pmu/boot.bin

http://www.wiki.xilinx.com/Using+meta-xilinx-tools+layer

Thanks,
Manju

From: meta-xilinx-boun...@yoctoproject.org 
[mailto:meta-xilinx-boun...@yoctoproject.org] On Behalf Of Giordon Stark
Sent: Tuesday, August 22, 2017 7:46 AM
To: Mike Looijmans ; Jean-Francois Dagenais 

Cc: meta-xilinx@yoctoproject.org
Subject: Re: [meta-xilinx] How to boot the ZynqMP?

Hi,

I'll share my experiences as it has been somewhat painful -- but I did manage 
to have success booting from an SD card directly for MPSOC. I'm working on QSPI 
boot -- but I wrote my experiences/guide here: 
https://github.com/kratsg/meta-l1calo/wiki/ZynqMP:-Prepare-and-Boot-Hardware

You can also compare it to how I did it for the Zynq-7 -- to see the 
differences. But this might help you get a bit further if you haven't already.

Giordon
On Tue, Aug 22, 2017 at 12:47 AM Mike Looijmans 
mailto:mike.looijm...@topic.nl>> wrote:
On 22-08-17 02:25, Jean-Francois Dagenais wrote:
>
>>

Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: 
mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail



On Aug 21, 2017, at 04:20, Mike Looijmans 
mailto:mike.looijm...@topic.nl>> wrote:
>>
>>
>> I recall having done this stuff about half a year ago, and at least then I 
>> could create an SPL based loader that actually booted. The layer above looks 
>> like regression to me.
>
> Xilinx "official" support is in FSBL for zynqmp. They removed the SPL zynqmp 
> stuff from their u-boot fork if I am not mistaken. And they configure 
> everything using their own stack including other layers such as meta-linaro 
> and meta-petalinux.
>

I'm not sure they removed it, the u-boot-xlnx fork is about 8 months behind on
mainline u-boot.

Stangely, the mainline version has SPL support, an I actually can get the
board to boot with SPL. But I can't figure out how to make it load PMU and ATF.

There have been dozens of commits from Xilinx to support the zynqmp in u-boot
mainline. None of these are in the Xilnx fork, so I assumed that Xilinx had
seen the light... Apparently the opposite is true.

>>
>> Current state is that if I generate FSBL using Vivado SDK I can make it load 
>> u-boot by generating a boot.bin containing the FSBL and u-boot.elf. But then 
>> I don't have the PMU firmware and ATF and thus the kernel won't run.
>
> Had the same problem. This is because we are hanging on to the old trail 
> (without the extra layers Xilinx wants us to use).
>
>>
>> I tried putting ATF and PMU firmware from the meta-xilinx build into the 
>> boot.bin using the proper attributes, but that results in complete and utter 
>> quiet hangup after power-up. I only see the FSBL start message on the uart.
>
> I had to fork a machine from zcu102 in u-boot (so I forked u-boot-xlnx) in my 
> env. Also forked meta-xilinx-tools such that my machine does the same 
> configuration of xilinx-bootbin as zcu102 so the ATF and PMU firmware are 
> bundled inside boot.bin. My fork of 
> u-boot-xlnx/include/configs/xilinx_zynqmp_zcu102.h is where I tie it all 
> together with the right file names for linux image and dtb to match what I 
> have put into the partition using wic, and the default names that yocto uses 
> for those.
>
> It was a bit of a hassle, and a annoyance compared to the ease of build of 
> the zynq7 series board, but in the end, learned a lot and am more than ever 
> the master of my domain! ;)
>

At least now I understand why there's so little interest in the MPSOC. The
licensing alone is a nightmare.
--
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH] layer.conf: Add "meta-python" as a layer dependency

2017-08-22 Thread Manjukumar Harthikote Matha


> -Original Message-
> From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
> boun...@yoctoproject.org] On Behalf Of Mike Looijmans
> Sent: Tuesday, August 22, 2017 12:03 AM
> To: meta-xilinx@yoctoproject.org
> Subject: [meta-xilinx] [PATCH] layer.conf: Add "meta-python" as a layer 
> dependency
> 
> Attempting to build this layer results in the following error:
> 
> ERROR: Nothing PROVIDES 'python3-pyyaml-native'. Close matches:
>   python3-rpm-native
>   python3-pycurl-native
>   python3-pygpgme-native
> ERROR: Required build target 'core-image-minimal' has no buildable providers.
> Missing or unbuildable dependency chain was: ['core-image-minimal',
> 'virtual/bootloader', 'virtual/dtb', 'python3-pyyaml-native']
> 
> To fix this, explain that the layer depends on meta-python for this recipe.
> 
> Signed-off-by: Mike Looijmans 
> ---
>  conf/layer.conf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/conf/layer.conf b/conf/layer.conf index ce5331f..5f2a56b 100644
> --- a/conf/layer.conf
> +++ b/conf/layer.conf
> @@ -11,7 +11,7 @@ BBFILE_COLLECTIONS += "xilinx-tools"
>  BBFILE_PRIORITY_xilinx-tools = "5"
>  BBFILE_PATTERN_xilinx-tools = "^${LAYERDIR}/"
> 
> -LAYERDEPENDS_xilinx-tools  = "core"
> +LAYERDEPENDS_xilinx-tools  = "core meta-python"
> 
meta-xilinx-tools works with meta-petalinux distro. I think we should keep 
meta-xilinx independent and add layerdepends in meta-xilinx-tools not in 
meta-xilinx layer.

Thanks,
Manju
-- 
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH] u-boot-xlnx: does not depend on dts, remove the dependency

2017-08-22 Thread Mike Looijmans

On 22-08-17 20:08, Manjukumar Harthikote Matha wrote:

Hi Mike,





Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail



-Original Message-

From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
boun...@yoctoproject.org] On Behalf Of Mike Looijmans
Sent: Tuesday, August 22, 2017 1:05 AM
To: meta-xilinx@yoctoproject.org
Subject: [meta-xilinx] [PATCH] u-boot-xlnx: does not depend on dts, remove the
dependency


Can you please add meta-xilinx-tools in the subject if it is intended for 
meta-xilinx-tools layer


I would if I could. The prefix is set by the maillist bot, not by me.



u-boot-xlnx_%.bbappend forces a non-existent dependency between u-boot-xlnx
and virtual/dtb. Nothing in u-boot references this dtb, so remove the bbappend.

Signed-off-by: Mike Looijmans 
---
  recipes-bsp/u-boot/u-boot-xlnx_%.bbappend | 1 -
  1 file changed, 1 deletion(-)
  delete mode 100644 recipes-bsp/u-boot/u-boot-xlnx_%.bbappend

diff --git a/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend b/recipes-bsp/u-boot/u-
boot-xlnx_%.bbappend
deleted file mode 100644
index 6a2c4c4..000
--- a/recipes-bsp/u-boot/u-boot-xlnx_%.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-do_compile[depends] += "virtual/dtb:do_deploy"


Virtual/dtb is provided by device-tree-generation
https://github.com/Xilinx/meta-xilinx-tools/blob/master/recipes-bsp/device-tree/device-tree-generation_git.bb#L8


Maybe, but u-boot-xlnx does not have a compile-time dependency on that. Hence 
the patch.

--
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] How to boot the ZynqMP?

2017-08-22 Thread Mike Looijmans

I managed to get it booting with some manual work.

- The meta-xilinx overlay delivers the ATF and PMU firmware.
- My own layer delivers u-boot and kernel and devicetree for my own board

The FSBL I've manually built using Vivado/SDK. The trick to get that working 
was that Vivado version >= 2017.1 was required. It doesn't work (any more) 
with the 2016 versions. I installed 2017.2 and only then the FSBL was able to 
load the PMU and ATF. Apparently there's a dependency there.


So all that is left is to automate the process of generating fsbl and boot.bin.

I'm pretty sure this can be done using just u-boot, since u-boot has support 
for ATF loading and, as I gather from various commits, the PMU as well. It can 
also create a boot.bin without the aid of bootgen. It provides the first-stage 
loader as well.
However, it seems to a well-kept secret how to actually integrate the PMU. I 
can generate a bootloader this way, but I don't know where to put the ATF and 
PMU. I suspect they're to be stored in a FIT image.


So for now I'm stuck with the much less streamlined FSBL flow.


On 22-08-17 20:25, Manjukumar Harthikote Matha wrote:

Hi Giordon,

meta-xilinx-tools with xsct in your path would enable the same way , instead 
of using the Vivado GUI to generate fsbl/pmu/boot.bin


http://www.wiki.xilinx.com/Using+meta-xilinx-tools+layer



So how does one use this layer to just generate the FSBL and boot.bin?


Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail



--
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx


Re: [meta-xilinx] [PATCH] layer.conf: Add "meta-python" as a layer dependency

2017-08-22 Thread Mike Looijmans

On 22-08-17 20:04, Manjukumar Harthikote Matha wrote:







Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijm...@topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail



-Original Message-

From: meta-xilinx-boun...@yoctoproject.org [mailto:meta-xilinx-
boun...@yoctoproject.org] On Behalf Of Mike Looijmans
Sent: Tuesday, August 22, 2017 12:03 AM
To: meta-xilinx@yoctoproject.org
Subject: [meta-xilinx] [PATCH] layer.conf: Add "meta-python" as a layer 
dependency

Attempting to build this layer results in the following error:

ERROR: Nothing PROVIDES 'python3-pyyaml-native'. Close matches:
   python3-rpm-native
   python3-pycurl-native
   python3-pygpgme-native
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal',
'virtual/bootloader', 'virtual/dtb', 'python3-pyyaml-native']

To fix this, explain that the layer depends on meta-python for this recipe.

Signed-off-by: Mike Looijmans 
---
  conf/layer.conf | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/conf/layer.conf b/conf/layer.conf index ce5331f..5f2a56b 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -11,7 +11,7 @@ BBFILE_COLLECTIONS += "xilinx-tools"
  BBFILE_PRIORITY_xilinx-tools = "5"
  BBFILE_PATTERN_xilinx-tools = "^${LAYERDIR}/"

-LAYERDEPENDS_xilinx-tools  = "core"
+LAYERDEPENDS_xilinx-tools  = "core meta-python"


meta-xilinx-tools works with meta-petalinux distro. I think we should keep 
meta-xilinx independent and add layerdepends in meta-xilinx-tools not in 
meta-xilinx layer.



This patch is for "meta-xilinx-tools". Apparently goes to the same list, and 
there's no way to make it prefix [meta-xilinx-tools] instead of [meta-xilinx] 
apparently.

--
___
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx