cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Visitor
Visitor
741 Views
Registered: ‎01-03-2020

Failed to build kernel and u-boot from external source from Digilent because of checksum error

Jump to solution

Hi,

I tried to build u-boot and kernel with `linux-xlnx` and `u-boot-xlnx`, and its build was done successfully.

However, I tried to build from external source kernel and u-boot from Digilent, I got an below errors.

ERROR: u-boot-xlnx-v2020.01-xilinx-v2020.1+git999-r0 do_populate_lic: QA Issue: u-boot-xlnx: The LIC_FILES_CHKSUM does not match for file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897
u-boot-xlnx: The new md5 checksum is b85be7720f1ca239d8536c5b91722404
u-boot-xlnx: Here is the selected license text:
vvvvvvvvvvvvvvvvvvvvvvvvvvvv beginline=1 vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
#
# (C) Copyright 2000 - 2013
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
#
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ endline=4 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
u-boot-xlnx: Check if the license information has changed in /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/u-boot-digilent/README (lines 1 through to 4) to verify that the LICENSE value "GPLv2+" remains valid [license-checksum]
ERROR: u-boot-xlnx-v2020.01-xilinx-v2020.1+git999-r0 do_populate_lic: Fatal QA errors found, failing task.
ERROR: Logfile of failure stored in: /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.1+git999-r0/temp/log.do_populate_lic.187129
ERROR: Task (/export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-bsp/u-boot/u-boot-xlnx_2020.1.bb:do_populate_lic) failed with exit code '1'
ERROR: linux-xlnx-5.4+git999-r0 do_populate_lic: QA Issue: linux-xlnx: The LIC_FILES_CHKSUM does not match for file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814
linux-xlnx: The new md5 checksum is d7810fab7487fb0aad327b76f1be7cd7
linux-xlnx: Here is the selected license text:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

   NOTE! This copyright does *not* cover user programs that use kernel
 services by normal system calls - this is merely considered normal use
 of the kernel, and does *not* fall under the heading of "derived work".
 Also note that the GPL below is copyrighted by the Free Software
 Foundation, but the instance of code that it refers to (the Linux
 kernel) is copyrighted by me and others who actually wrote it.

 Also note that the only valid version of the GPL as far as the kernel
 is concerned is _this_ particular version of the license (ie v2, not
...
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
linux-xlnx: Check if the license information has changed in /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/linux-digilent/COPYING to verify that the LICENSE value "GPLv2" remains valid [license-checksum]
ERROR: linux-xlnx-5.4+git999-r0 do_populate_lic: Fatal QA errors found, failing task.
ERROR: Logfile of failure stored in: /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/linux-xlnx/5.4+git999-r0/temp/log.do_populate_lic.187128
ERROR: Task (/export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux/components/yocto/layers/meta-xilinx/meta-xilinx-bsp/recipes-kernel/linux/linux-xlnx_2020.1.bb:do_populate_lic) failed with exit code '1'

 I don't know why this build still tries to see u-boot-xlnx's bitbake and how to solve it (suppress verifying checksum? or other ways?).

I also leave `External u-boot license checksum` and `External linux-kernel license checksum` section in petalinux-config empty because I don't know what should be filled. Does this relate to this problem?

Environment

OS: CentOS        7.8
Vitis and Vivado: 2020.1
petalinx:              2020.1

#edit

digilent's linux-kernel and u-boot are here

https://github.com/Digilent/linux-digilent commit 1496c680c6df2e3911feed13aa9663a851bf30e9
https://github.com/Digilent/u-boot-digilent commit 42deb242f961ce317366566666cbbddfb198bc9f

 

0 Kudos
Reply
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
537 Views
Registered: ‎05-15-2018

Hi @soyaohnishi 

Given that your u-boot repo is so old, I would not recommend using it with Petalinux 2020.1. You can use an older version of Petalinux instead (which supports the u-boot and kernel versions you want to use), and this information can be found at https://www.xilinx.com/support/answers/70277.html. This is specifically for Petalinux 2017.4, and you can verify whether your u-boot/linux repo from digilent are checked out at the corresponding commit IDs.

Alternatively, if you are forced to use older repo versions, you can skip Petalinux all together and build the boot components individually. One such example of this flow is provided at: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841722/ZCU102+Image+creation+in+OSL+flow

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

5 Replies
Xilinx Employee
Xilinx Employee
632 Views
Registered: ‎05-15-2018

Hi @soyaohnishi 

The reason petalinux complains about LIC_FILES_CHKSUM is that it is internally wired to check that the correct git repo tag is being used when employing external sources. For u-boot-xlnx and linux-xlnx, these correspond to the release tags 'xilinx-v2020.1'. When you point to an external source, petalinux will compute the md5sum of the README file (in this case) and if it does not match with what is stored internally (corresponding to the README file in the xilinx-v2020.1 release tag), it will throw an error. The easiest solution is to NOT use any other sources, and use official ones released by Xilinx when using Petalinux:

git clone https://github.com/Xilinx/u-boot-xlnx.git
cd u-boot-xlnx
git checkout xilinx-v2020.1

git checkout -b <your_branch>

You can do the same for linux-xlnx.

If at all you must use other sources with petalinux, you can first see which all files are failing the LIC_FILES_CHKSUM test. Then you can replace those files with the corresponding one's from Xilinx's repositories. But I wouldn't recommend this if your code is going into production or distribution since you would have manually modified the README/license/copying files.

Another option is to add the following line to u-boot-xlnx_%.bbappend (or linux-xlnx_%.bbappend). This is supposed to skip the QA task for checksums, but I haven't tested this to verify that it works. 

BB_STRICT_CHECKSUM = "0"

 A third option would be to use the linux utility 'md5sum' on the files or subsections of them (from your external repo) that are failing the check. You can then specify the new md5 sums in the petalinux-config menu when setting external sources.

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Reply
Visitor
Visitor
607 Views
Registered: ‎01-03-2020

Hi @shirilt, Thanks for your reply!

I set BB_STRICT_CHECKSUM = "0" and I got an kernel version mismatch error, so I set KERNEL_VERSION_SANITY_SKIP="1" as error message suggested.

I retry to petalinux-build, but I still get an error, and, in this time, it is compile error like build.log I attached.
From this compile error message and line 1469 in build.log(clipped below), I suspect that gcc look not only digilent's u-boot source file but also xilinx's u-boot source files.

   1469 /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux-clean/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.1+git999-r0/recipe-sysroot-native/usr/include/libfdt_env.h:27:30: error: conflicting types for 'fdt64_t'
   1470  typedef uint64_t FDT_BITWISE fdt64_t;
   1471                               ^
   1472 In file included from <command-line>:0:0:
   1473 /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/u-boot-digilent/include/libfdt_env.h:19:16: note: previous declaration of 'fdt64_t' was here
   1474  typedef __be64 fdt64_t;
   1475                 ^
   1476 In file included from /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/u-boot-digilent/include/libfdt_env.h:12:0,
   1477                  from <command-line>:0:
   1478 /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux-clean/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.1+git999-r0/recipe-sysroot-native/usr/include/libfdt_env.h:47:24: error: expected ')' before 'x'
   1479  static inline uint32_t fdt32_to_cpu(fdt32_t x)
   1480                         ^

I think this error is not because of ignoring kernel version checker because this error related to u-boot, not kernel.

Please teach me how to solve this problem? 

0 Kudos
Reply
Xilinx Employee
Xilinx Employee
584 Views
Registered: ‎05-15-2018

Hi @soyaohnishi 

This build error is not related to Petalinux. It comes from the u-boot source you are using and occurs due to a conflict between libfdt definitions in the u-boot source vs. those defined in your system. There a couple of threads which mention this error, and also provide a patch to fix this, for example:

https://patchwork.ozlabs.org/project/buildroot/patch/20180308095846.7618-1-thomas.petazzoni@bootlin.com/

I think the error arises due to the files:

/usr/include/fdt.h

/usr/include/libfdt.h

/usr/include/libfdt_env.h

These files installed on your host machine conflict with those in the u-boot tree causing errors regarding 'conflicting types'

A couple of things to try:

1. sudo apt-get purge -y --auto-remove libfdt-dev-- this will remove your host machine libfdt package thereby removing the conflict source

2. Try and see if you can apply any u-boot patch to digilent's cloned repo. The thread I mentioned above has one. Another can be found here: https://gist.github.com/kraj/70d613d1ead4be98a5787928d8518434. I would try this as the last option since it is unclear for which u-boot version these patches were generated, so not sure if they will even apply correctly to digilent's u-boot repo

3. Ideally you should verify whether digilent's u-boot tree has fixed this issue and then checkout that tag. For example, in Xilinx's u-boot repo, this issue was fixed around the 2018 timeframe with the following commit: https://github.com/Xilinx/u-boot-xlnx/commit/e0d20dc1521e74b82dbd69be53a048847798a90a

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Reply
Visitor
Visitor
561 Views
Registered: ‎01-03-2020

Hi, @shirilt 

Thanks for your advice, but it did not work for me.

First, there is no header files(fdt.h, libfdt.h, libfdt_env.h) in my host.

$ cd /usr/include
$ find . -name "*libfdt*"
$ 

And three options you suggested did not work because of below reasons

1.

My host does not install any packages related to libfdt.

$ cd /usr/include
$ find . -name "*libfdt*"
$ 

2 and 3. 

No ./scripts/dtc directory in u-boot-digilent repository, so I cannot apply what you suggestted
Probably, this is because digilent's repo refer to old u-boot source as original As a evidence, u-boot-xlnx repo's old tag like xilinx-v2017.4 also does not has ./scripts/dtc directory. 

What I am worried about is many gcc options have isystem and sysroot option that points to u-boot-xlnx directory like below command.

command overall

arm-xilinx-linux-gnueabi-gcc  --sysroot=/export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux-clean/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.1+git999-r0/recipe-sysroot -x c -DDO_DEPS_ONLY -M -MP -Wall -Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding -O2 -fno-stack-protector -fno-delete-null-pointer-checks -g -fstack-usage -Wno-format-nonliteral -Werror=date-time  -D__KERNEL__ -D__UBOOT__   -D__ARM__ -marm -mno-thumb-interwork  -mabi=aapcs-linux  -mword-relocations  -fno-pic  -mno-unaligned-access  -ffunction-sections -fdata-sections -fno-common -ffixed-r9  -msoft-float   -pipe -Iinclude  -I/export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/u-boot-digilent/include -I/export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/u-boot-digilent/arch/arm/include -include /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/u-boot-digilent/include/linux/kconfig.h  -nostdinc -isystem /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux-clean/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.1+git999-r0/recipe-sysroot-native/usr/bin/arm-xilinx-linux-gnueabi/../../lib/arm-xilinx-linux-gnueabi/gcc/arm-xilinx-linux-gnueabi/9.2.0/include -MQ include/config/auto.conf /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/u-boot-digilent/include/common.h > include/autoconf.mk.dep || { rm include/autoconf.mk.dep; false; }

only sysroot

--sysroot=/export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux-clean/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.1+git999-r0/recipe-sysroot

only isystem

-isystem /export/home/work/soya/Zybo-Z7-20-base-linux/petalinux/zybo-linux/zybo-linux-clean/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/u-boot-xlnx/v2020.01-xilinx-v2020.1+git999-r0/recipe-sysroot-native/usr/bin/arm-xilinx-linux-gnueabi/../../lib/arm-xilinx-linux-gnueabi/gcc/arm-xilinx-linux-gnueabi/9.2.0/include 

 I do not know this is related to this problem, but I wonder why these command still look into u-boot-xlnx

0 Kudos
Reply
Xilinx Employee
Xilinx Employee
538 Views
Registered: ‎05-15-2018

Hi @soyaohnishi 

Given that your u-boot repo is so old, I would not recommend using it with Petalinux 2020.1. You can use an older version of Petalinux instead (which supports the u-boot and kernel versions you want to use), and this information can be found at https://www.xilinx.com/support/answers/70277.html. This is specifically for Petalinux 2017.4, and you can verify whether your u-boot/linux repo from digilent are checked out at the corresponding commit IDs.

Alternatively, if you are forced to use older repo versions, you can skip Petalinux all together and build the boot components individually. One such example of this flow is provided at: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841722/ZCU102+Image+creation+in+OSL+flow

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post