Thanks! This makes a lot more sense now. I'm definitely getting close. Here
is the log file:
https://gist.github.com/kratsg/7b2e9059d675c96081e461640f4006d3

Using Nathan's suggestions + Manju's suggestions, I see that the *.dtb is
built and referenced correctly:

| NOTE: make -j 24 CROSS_COMPILE=aarch64-poky-linux-
CC=aarch64-poky-linux-gcc
--sysroot=/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot
V=1 HOSTCC=gcc
-isystem/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot-native/usr/include
-O2 -pipe
-L/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot-native/usr/lib
-L/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot-native/lib
-Wl,-rpath-link,/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath-link,/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot-native/lib
-Wl,-rpath,/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath,/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot-native/lib
-Wl,-O1
*EXT_DTB=/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot/boot/devicetree/gfex-prototype3.dtb*
dtb_depends= -C
/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/git
O=/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/build
gfex-prototype3_defconfig

However, it seems like the *.dtb cannot be found:

| Device Tree Source is not correctly specified.
| Please define 'CONFIG_DEFAULT_DEVICE_TREE'
| or build with 'DEVICE_TREE=<device_tree>' argument

when I `ls` the above directory:

kratsg@dc:/local/d4/gstark/meta-l1calo/recipes-bsp/device-tree$ ls
/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/u-boot-xlnx/v2017.01-xilinx-v2017.1+gitAUTOINC+92e3dd638b-r0/recipe-sysroot
total 20K
drwxr-xr-x 5 kratsg atlas 4.0K Jan  2 19:57 .
drwxr-xr-x 8 kratsg atlas 4.0K Jan  2 19:57 ..
drwxr-xr-x 2 kratsg atlas 4.0K Jan  2 19:57 lib
drwxr-xr-x 2 kratsg atlas 4.0K Jan  2 19:57 sysroot-providers
drwxr-xr-x 5 kratsg atlas 4.0K Jan  2 19:57 usr

I don't see my compiled dtb there at all! In fact, I don't see a `boot`
folder, so somehow, the device-tree.bb isn't installing the file for me
where u-boot-xlnx expects it. So I looked in the log file for do_install
device-tree.bb (do_install here:
https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb#L71-L74
):

DEBUG: sed -e
's:^[^/]*/:/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/device-tree/1.0-r0/recipe-sysroot-native/:g'
/local/d4/gstark/poky/build/tmp/sysroots-components/x86_64/gcc-cross-aarch64/fixmepath
/local/d4/gstark/poky/build/tmp/sysroots-components/x86_64/pkgconfig-native/fixmepath
/local/d4/gstark/poky/build/tmp/sysroots-components/x86_64/gtk-doc-native/fixmepath
/local/d4/gstark/poky/build/tmp/sysroots-components/x86_64/gmp-native/fixmepath
| xargs sed -i -e
's:FIXMESTAGINGDIRTARGET:/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/device-tree/1.0-r0/recipe-sysroot:g;
s:FIXMESTAGINGDIRHOST:/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/device-tree/1.0-r0/recipe-sysroot-native:g'
-e
's:FIXME_COMPONENTS_DIR:/local/d4/gstark/poky/build/tmp/sysroots-components:g'
-e 's:FIXME_HOSTTOOLS_DIR:/local/d4/gstark/poky/build/tmp/hosttools:g' -e
's:FIXME_PKGDATA_DIR:/local/d4/gstark/poky/build/tmp/pkgdata/gfex-prototype3:g'
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_install
*ls: cannot access '*.dtbo': No such file or directory*
DEBUG: Shell function do_install finished
DEBUG: Executing shell function remove_libtool_la
DEBUG: Shell function remove_libtool_la finished

and it looks like it's failing, but it's probably fine? So I'm not sure. I
see my device tree built:

kratsg@dc:/local/d4/gstark/poky/build$ ls
tmp/work/gfex_prototype3-poky-linux/device-tree/1.0-r0/build/
total 52K
drwxr-xr-x  2 kratsg atlas 4.0K Jan  2 16:43 .
drwxr-xr-x 16 kratsg atlas 4.0K Jan  2 16:44 ..
-rw-r--r--  1 kratsg atlas  39K Jan  2 16:43 system-top.dtb
-rw-r--r--  1 kratsg atlas  866 Jan  2 16:43 system-top.dts.pp

and installed here

kratsg@dc:/local/d4/gstark/poky/build$ ls
/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-linux/device-tree/1.0-r0/image/boot/devicetree/
total 48K
drwxr-xr-x 2 kratsg atlas 4.0K Jan  2 16:43 .
drwxr-xr-x 3 kratsg atlas 4.0K Jan  2 16:43 ..
-rw-r--r-- 1 kratsg atlas  39K Jan  2 16:43 system-top.dtb

I just don't see it being installed to the right location that is expected
from
https://github.com/nathanrossi/meta-xilinx/blob/60193934fc1c7717a71f272370aaad1bfeb118b4/recipes-bsp/u-boot/u-boot_2017.09.bbappend


*EXT_DTB=${RECIPE_SYSROOT}/boot/devicetree/${MACHINE}.dtb*

So how do I install the dtb correctly from device-tree to get picked up by
u-boot-xlnx?

Giordon

On Tue, Jan 2, 2018 at 8:40 PM Manjukumar Harthikote Matha <
manju...@xilinx.com> wrote:

>
>
> > -----Original Message-----
> > From: Giordon Stark [mailto:kra...@gmail.com]
> > Sent: Tuesday, January 02, 2018 2:36 PM
> > To: Manjukumar Harthikote Matha <manju...@xilinx.com>
> > Cc: Nathan Rossi <nat...@nathanrossi.com>; Tang, Shaochun <st...@bnl.gov
> >;
> > meta-xilinx@yoctoproject.org
> > Subject: Re: [meta-xilinx] Wrong DRAM set for custom board using FSBL +
> u-boot?
> >
> > Hi Manju,
> >
> >
> > On Tue, Jan 2, 2018 at 5:30 PM Manjukumar Harthikote Matha
> > <manju...@xilinx.com <mailto:manju...@xilinx.com> > wrote:
> >
> >
> >       Hi,
> >
> >       > -----Original Message-----
> >       > From: Giordon Stark [mailto:kra...@gmail.com
> > <mailto:kra...@gmail.com> ]
> >       > Sent: Tuesday, January 02, 2018 2:15 PM
> >       > To: Nathan Rossi <nat...@nathanrossi.com
> > <mailto:nat...@nathanrossi.com> >
> >       > Cc: Manjukumar Harthikote Matha <manju...@xilinx.com
> > <mailto:manju...@xilinx.com> >; Tang, Shaochun
> >       > <st...@bnl.gov <mailto:st...@bnl.gov> >; meta-
> > xil...@yoctoproject.org <mailto:meta-xilinx@yoctoproject.org>
> >       > Subject: Re: [meta-xilinx] Wrong DRAM set for custom board using
> FSBL +
> > u-boot?
> >       >
> >       > Hi,
> >       >
> >       > I've followed along with everything so far. I'm finding that
> device-tree.bb
> > <http://device-tree.bb>
> >       > <http://device-tree.bb>  is not very happy with my initial
> structure of
> > device-tree
> >       > files. Here (
> https://github.com/kratsg/meta-l1calo/tree/master/recipes-
> > bsp/device-
> >       > tree) you can see my device-tree.bbappend and the associated
> files.
> >       >
> >       > I was hoping to structure my device tree sources this way,
> because I will
> > eventually
> >       > want
> >       >
> >       > boards/gfex
> >       > boards/jfex
> >       > boards/...
> >       >
> >       > in the future, and each group has their own set of versioned
> codes. What
> > I'm seeing
> >       > now, when I run `bitbake device-tree` is this:
> >       >
> >       > ERROR: device-tree-1.0-r0 do_compile: Function failed:
> do_compile (log
> > file is
> >       > located at
> /local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-
> >       > linux/device-tree/1.0-r0/temp/log.do_compile.29239)
> >       > ERROR: Logfile of failure stored in:
> >       > /local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-
> > linux/device-
> >       > tree/1.0-r0/temp/log.do_compile.29239
> >       > Log data follows:
> >       > | DEBUG: Executing shell function do_compile
> >       > | gcc: error:
> >       > | /local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-
> > linux/device
> >       > | -tree/1.0-r0/*.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: /local/d4/gstark/poky/build/tmp/work/gfex_prototype3-
> > poky-
> >       > linux/device-tree/1.0-r0/temp/run.do_compile.29239:1 exit 1 from
> 'gcc -
> > E -
> >       > nostdinc -Ulinux -x assembler-with-cpp -
> >       > I/local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-
> > linux/device-
> >       > tree/1.0-r0 -I/local/d4/gstark/poky/build/tmp/work-shared/gfex-
> >       > prototype3/kernel-source/arch/arm64/boot/dts -
> >       >
> I/local/d4/gstark/poky/build/tmp/work-shared/gfex-prototype3/kernel-
> >       > source/arch/arm64/boot/dts/include -
> > I/local/d4/gstark/poky/build/tmp/work-
> >       > shared/gfex-prototype3/kernel-source/arch/arm64/boot/dts/xilinx
> -o
> > `basename
> >       > ${DTS_FILE}`.pp ${DTS_FILE}'
> >       > | ERROR: Function failed: do_compile (log file is located at
> >       > | /local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-
> > linux/device
> >       > | -tree/1.0-r0/temp/log.do_compile.29239)
> >       > ERROR: Task (/local/d4/gstark/meta-xilinx/recipes-bsp/device-
> > tree/device-
> >       > tree.bb:do_compile) failed with exit code '1'
> >       > NOTE: Tasks Summary: Attempted 504 tasks of which 502 didn't
> need to
> > be rerun
> >       > and 1 failed.
> >       >
> >       > and when I look in this directory referenced:
> >       >
> >       > kratsg@dc:/local/d4/gstark/poky/build$ ls
> >       > /local/d4/gstark/poky/build/tmp/work/gfex_prototype3-poky-
> > linux/device-
> >       > tree/1.0-r0/
> >       > total 40K
> >       > drwxr-xr-x 9 kratsg atlas 4.0K Jan  2 14:58 .
> >       > drwxr-xr-x 3 kratsg atlas 4.0K Jan  2 14:50 ..
> >       > drwxr-xr-x 2 kratsg atlas 4.0K Jan  2 14:58 build
> >       > -rw-r--r-- 1 kratsg atlas   33 Jan  2 14:58 configure.sstate
> >       > drwxr-xr-x 3 kratsg atlas 4.0K Jan  2 14:50 gfex drwxr-xr-x 3
> kratsg atlas
> > 4.0K Jan  2
> >       > 14:52 license-destdir drwxr-xr-x 2 kratsg atlas 4.0K Jan  2
> 14:50 patches
> > drwxr-xr-x
> >       > 2 kratsg atlas 4.0K Jan  2 14:58 recipe-sysroot drwxr-xr-x 6
> kratsg atlas
> > 4.0K Jan  2
> >       > 14:50 recipe-sysroot-native drwxr-xr-x 2 kratsg atlas 4.0K Jan
> 2 16:06
> > temp
> >       >
> >       > it seems that it expects everything to be at the top-level...
> that I need
> > some sort of
> >       > system-top.dts to make device-tree.bb <http://device-tree.bb>
> > <http://device-tree.bb>  happy. Am I doing
> >       > this wrong? Is my structure wrong or is device-tree.bb <
> http://device-
> > tree.bb>  <http://device-tree.bb>  a bit
> >       > more pickier than I realized? I also updated u-boot to add the
> extra
> > OEMAKE
> >       > commands (
> https://github.com/kratsg/meta-l1calo/blob/master/recipes-
> > bsp/u-
> >       > boot/u-boot-xlnx_2017.1.bbappend) so if those look wrong, let me
> > know.
> >       >
> >
> >       The S is set to workdir
> >
> https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-bsp/recipes-
> > bsp/device-tree/device-tree.bb#L22
> >
> >       I think all the dts* files are under gfex, basically you need to
> set your S
> > directory to the location where all the dts* files are present.
> >
> >       You can also rearrange on how you store the dts files as
> >       boards/ gfex-prototype2/*.dts
> >       boards/ gfex-prototype3/*.dts etc
> >       and have bbappend as
> >       SRC_URI_append_gfex-prototype3  = " \
> >               file://pcw.dtsi "
> >
> >       This will allow all the dts* files to be copied in WORKDIR and
> build it from
> > there.
> >
> >
> >
> > I've decided to go along with this method instead. I'd rather not change
> the source
> > directory since that's probably less clear for people newer to this code
> moving
> > forward... https://github.com/kratsg/meta-
> > l1calo/commit/169090e527a5f350ff4d9649bcdbd136a97def2e
> >
> > Slight question: how does it know to look under files/<MACHINE>/*.dts if
> I only
> > append the "files/" or "boards/" as an extrafilespath?
> >
>
> SRC_URI_append_gfex-prototype3: gfex-prototype3 is appended to SRC_URI
> expansion. See log.do_fetch on how it looks for the required files
>
> > Now when I run this, I found a few interesting things:
> > - only works with windows-based line-endings (CLRF screws this up)
> > - I get a complaint about the system.dts file (
> https://github.com/kratsg/meta-
> > l1calo/tree/master/recipes-bsp/device-tree/files/gfex-prototype3) which
> is
> > interesting, but maybe expect. This is fine if I combine both of my dts
> files here -- but
> > I should point out that this was automatically generated from Xilinx, so
> I wonder
> > why there are two dts files.
> >
>
> system.dts is a dummy dts file, I think it is better to have it removed,
> we usually remove during do_configure step. You should compile just the
> system-top.dts, this includes all the other dtsi files
>
> Thanks,
> Manju
>
>
-- 
_______________________________________________
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to