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

Giordon Stark kratsg at gmail.com
Wed Jan 3 07:26:20 PST 2018


After realizing even the core-image-minimal wouldn't build either - I just
went ahead and recloned my repositories and things worked! Here's the image
deploy listing:
https://gist.github.com/kratsg/e1a30a1cf2c32fffb75925cd4468050f

Should I be worried that the zynqmp-zcu102.dtb file is still being made? I
suppose that's probably for the qemu and my image inherits from
zynqmp-zcu102 (lazily) and I should fix that? How would I confirm that
u-boot was built with the right device tree?

Giordon

On Wed, Jan 3, 2018 at 8:19 AM Giordon Stark <kratsg at gmail.com> wrote:

> Hi Nathan,
>
> Thanks! This seems to have let u-boot work successfully. I am indeed using
> pyro (I guess rocko is just a bit newer and I will update when I get this
> working). I think I'm almost there, but now i'm getting an error that
> doesn't make sense to me:
> https://gist.github.com/kratsg/3ce79f7d4bd0b786db203c0e54b5202f
>
> ERROR: zynq-base-1.0-r0 do_rootfs: Could not invoke dnf.
>
> These are my current layers:
>
> layer                 path                                      priority
> ==========================================================================
> meta                  /local/d4/gstark/poky/meta                5
> meta-poky             /local/d4/gstark/poky/meta-poky           5
> meta-yocto-bsp        /local/d4/gstark/poky/meta-yocto-bsp      5
> meta-xilinx           /local/d4/gstark/meta-xilinx              5
> meta-oe               /local/d4/gstark/meta-openembedded/meta-oe  6
> meta-python           /local/d4/gstark/meta-openembedded/meta-python  7
> meta-l1calo           /local/d4/gstark/meta-l1calo              7
>
> I'm somewhat confused since it's complaining about packages I can bitbake
> normally and I also see recipes for them:
>
> $ bitbake -s | grep python-ironman
> python-ironman                                     :0.2.13-r0
>
> $ bitbake -s | grep devmem2
> devmem2                                               :1.0-r7
>
> $ bitbake -s | grep packagegroup-core-ssh-openssh
> packagegroup-core-ssh-openssh                         :1.0-r1
>
> However, I'm definitely unable to find these:
>
> No package locale-base-en-us available.
> No package locale-base-en-gb available.
> No package run-postinsts available.
>
> So I wonder what happened. Here is the image I'm trying to build:
> https://github.com/kratsg/meta-l1calo/blob/master/recipes-core/images/zynq-base.bb
>
>
> Giordon
>
> On Wed, Jan 3, 2018 at 12:41 AM Nathan Rossi <nathan at nathanrossi.com>
> wrote:
>
>> On 3 January 2018 at 12:34, Giordon Stark <kratsg at gmail.com> wrote:
>> > 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 at 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
>> ):
>>
>> You are using a version of meta-xilinx before rocko I assume? If so
>> you will need this line in your bbappend for device-tree.
>>
>>
>> https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb#L25
>>
>> This is needed to have the installed files populated into the sysroot.
>> Having the directory in that variable multiple times should be ok as
>> well, so setting it with master or pre-rocko should be fine.
>>
>> That should sort out the files being in the u-boot sysroot, and then
>> the files should be there and u-boot's build wont complain about not
>> being able to access them.
>>
>> Regards,
>> Nathan
>>
>> >
>> > 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 at 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 at 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
>> > <MANJUKUM at xilinx.com> wrote:
>> >>
>> >>
>> >>
>> >> > -----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
>> >>
>> >
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20180103/3b5c2197/attachment-0001.html>


More information about the meta-xilinx mailing list