[meta-xilinx] Wrong DRAM set for custom board using FSBL + u-boot?

Manjukumar Harthikote Matha MANJUKUM at xilinx.com
Tue Jan 2 17:39:57 PST 2018



> -----Original Message-----
> From: Giordon Stark [mailto:kratsg at gmail.com]
> Sent: Tuesday, January 02, 2018 2:36 PM
> To: Manjukumar Harthikote Matha <MANJUKUM at xilinx.com>
> Cc: Nathan Rossi <nathan at nathanrossi.com>; Tang, Shaochun <stang at bnl.gov>;
> meta-xilinx at 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
> <MANJUKUM at xilinx.com <mailto:MANJUKUM at xilinx.com> > wrote:
> 
> 
> 	Hi,
> 
> 	> -----Original Message-----
> 	> From: Giordon Stark [mailto:kratsg at gmail.com
> <mailto:kratsg at gmail.com> ]
> 	> Sent: Tuesday, January 02, 2018 2:15 PM
> 	> To: Nathan Rossi <nathan at nathanrossi.com
> <mailto:nathan at nathanrossi.com> >
> 	> Cc: Manjukumar Harthikote Matha <MANJUKUM at xilinx.com
> <mailto:MANJUKUM at xilinx.com> >; Tang, Shaochun
> 	> <stang at bnl.gov <mailto:stang at bnl.gov> >; meta-
> xilinx at yoctoproject.org <mailto:meta-xilinx at 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 at 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



More information about the meta-xilinx mailing list