Hi @rock, thank you. The problem persists after that. My host computer has Ubuntu 18.04.3. I will try the vagrant flow.
Did you upgrade 18 from 16? That may have messed up with the apt source. Check this page: updates - Sudo apt-get not working in 18.04 - Ask Ubuntu
You may want to change the apt source back to a working one in 18, following the instructions in the answers.
Another thing to try, is to see if you ubuntu machine can do any apt-get update
or apt-get install
. If not, there is definitely a problem with your ubuntu machine; this is not related to PYNQ though.
Hi @rock. Yes, that was an upgrade. I am trying now the vagrant flow, but seems that I have a problem with petalinux 2019.1 now. Here is the output of my log. My python version is 2.7.12.
ERROR: Failed to source bitbake
ERROR: Failed to build device-tree
make: *** [/pynq/sdbuild/build/zybo/petalinux_project/images/linux/system.dtb] Error 255
This looks a petalinux problem. Since you are using your own board folder zybo, please look into petalinux error messages.
The error happens even if I try to rebuild Pynq-Z2 folder.
Hi @rock,
thank you for your help. I was able to generate an image to the zybo z7-20 and I can boot and access it through the browser. The steps that I did was:
1: create a new /etc/apt/sources.list as follows
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
###### Ubuntu Main Repos
**deb Index of /ubuntu bionic main restricted universe multiverse **
###### Ubuntu Update Repos
**deb Index of /ubuntu bionic-security main restricted universe multiverse **
deb Index of /ubuntu bionic-updates main restricted universe multiverse
2: make PREBUILT=<image_path> BOARD=zybo
3: accessing the zybo through the terminal (using putty) I created the file /etc/network/interfaces.d/eth0 as follows :
auto eth0
iface eth0 inet static
address 192.168.0.99
netmask 255.255.255.0
auto br0
iface br0 inet dhcp
bridge_ports eth0
The next steps would be to create an overlay, as I used only one simple base system including a Zynq processor System.
I hope I can update it uploading a new bitstream. Many thanks.
hello @rock,
I have the similar problem when building the PYNQ for Ultra96v1 using the master branch, the host is a laptop running Ubuntu 18.04. The error is
E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/g/gpgme1.0/libgpgme11_1.10.0-1ubuntu1_arm64.deb Undetermined Error [IP: 91.189.88.142 80]
E: Some files failed to download
apt download failed. Exit value: 100
Makefile:325: recipe for target ‘/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/bionic.aarch64.stage1.img’ failed
make: *** [/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/bionic.aarch64.stage1.img] Error 100
After that I run make checkenv BOARDDIR = and received this error:
bash /media/duyliontran/Data/xilinx/PYNQ/sdbuild/scripts/check_mounts.sh
/dev/mapper/loop17p2 on /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/bionic.aarch64 type ext4 (rw,relatime)
/dev/mapper/loop17p1 on /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/bionic.aarch64/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Staging area currently mounted - please unmount /media/duyliontran/Data/xilinx/PYNQ/sdbuild/.build/rootfs_staging
Makefile:342: recipe for target ‘checkenv’ failed
make: *** [checkenv] Error 1
Can you show me the reason and how to fix it? If I reboot the host PC then the error disappears but the image does not boot up
Thanks and best regards,
Duy
For your 1st error, check if you are behind a proxy; you need to add proxy variable in that case to your build machine. e.g. (adjust gateway based on your proxy)
export HTTP_PROXY=http://gateway:8080
export HTTPS_PROXY=http://gateway:8080
export http_proxy=http://gateway:8080
export https_proxy=http://gateway:8080
export ftp_proxy=http://gateway:8080
If you run into errors when building the rootfs, you probably need to unmount the image file before rebuilding. To find out what partition has been mounted:
sudo losetup -a
For the new SD build flow, to unmount the partition (depending on the stage where the build fails, adjust the path accordingly):
sudo umount ./build/bionic .arm/boot
sudo umount ./build/bionic.arm
sudo kpartx -d <image_file>
My plan is to add some automatically unmounting in Makefile in image v2.6.0. So users do not have to do these manually again.
The images will be unmounted after your reboot the host machine, so that is the reason why it works after rebooting. However, since you have not cleared the failed image file in the build folder, the Makefile probably mistakenly identifies you have that target built so it does not continue the building process properly. The result is you have tried to use a broken image to boot SD card. To resolve this, just remove the failed target (sudo losetup -a
to find the failed target right after error out in the sdbuild process) and try again.
Hello @rock,
After running your commands to unmount the broken partition, I receive following errors:
/opt/qemu/bin/qemu-aarch64-static -version | fgrep 4.0.0
qemu-aarch64 version 4.0.0
vivado -version | fgrep 2019.1
Vivado v2019.1 (64-bit)
xsdk -version | fgrep 2019.1
****** SDK v2019.1 (64-bit)
which petalinux-config
/home/duyliontran/xilinx/petalinux2019.1/tools/common/petalinux/bin/petalinux-config
which arm-linux-gnueabihf-gcc
/tools/Xilinx/SDK/2019.1/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc
which microblaze-xilinx-elf-gcc
/home/duyliontran/xilinx/petalinux2019.1/tools/xsct/gnu/microblaze/lin/bin/microblaze-xilinx-elf-gcc
which ct-ng
/opt/crosstool-ng/bin/ct-ng
which python | fgrep /usr/bin/python
/usr/bin/python
sudo -n mount > /dev/null
bash /media/duyliontran/Data/xilinx/PYNQ/sdbuild/scripts/check_env.sh
Pass: Current OS is supported.
Checking system for installed bc
gperf
bison
flex
texi2html
texinfo
help2man
gawk
libtool
libtool-bin
build-essential
automake
libncurses5-dev
libglib2.0-dev
device-tree-compiler
qemu-user-static
binfmt-support
multistrap
git
lib32z1
lib32ncurses5
libbz2-1.0
lib32stdc++6
libssl-dev
kpartx
zerofree
u-boot-tools
rpm2cpio
libsdl1.2-dev
rsync
python3-pip
gcc-multilib
bash /media/duyliontran/Data/xilinx/PYNQ/sdbuild/scripts/check_mounts.sh
cd /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb && /media/duyliontran/Data/xilinx/PYNQ/sdbuild/packages/gcc-mb//build.sh aarch64 /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/bionic.aarch64.stage1.img
- ARCH=aarch64
- ROOT_IMAGE=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/bionic.aarch64.stage1.img
+++ dirname /media/duyliontran/Data/xilinx/PYNQ/sdbuild/packages/gcc-mb//build.sh
++ cd /media/duyliontran/Data/xilinx/PYNQ/sdbuild/packages/gcc-mb
++ pwd - SCRIPT_DIR=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/packages/gcc-mb
- case ${ARCH} in
- sample=aarch64-linux-gnu,microblazeel-xilinx-elf
- SYSROOT_IMAGE=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64.img
- export HOST_SYSROOT=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64
- HOST_SYSROOT=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64
- mkdir -p /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64
- cp --sparse=always /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/bionic.aarch64.stage1.img /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64.img
- /media/duyliontran/Data/xilinx/PYNQ/sdbuild/scripts/mount_image.sh /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64.img /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64
loop18p1
loop18p2 - trap unmount_delete EXIT
- cd /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64
++ find -lname ‘/*’
find: ‘./lost+found’: Permission denied
find: ‘./var/cache/apt/archives/partial’: Permission denied
find: ‘./var/lib/apt/lists/partial’: Permission denied - export -n LD_LIBRARY_PATH
- ct-ng aarch64-linux-gnu,microblazeel-xilinx-elf
gmake[1]: Entering directory ‘/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb’
CONF aarch64-linux-gnu,microblazeel-xilinx-elf
configuration written to .config
Initially reported by: Peter Ogden
URL:
WARNING! This sample may enable experimental features.
Please be sure to review the configuration prior
to building and using your toolchain!
Now, you have been warned!
Now configured for “aarch64-linux-gnu,microblazeel-xilinx-elf”
gmake[1]: Leaving directory ‘/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb’
- ct-ng build
gmake[1]: Entering directory ‘/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb’
[INFO ] Performing some trivial sanity checks
[WARN ] Number of open files 1024 may not be sufficient to build the toolchain; increasing to 2048
[INFO ] Build started 20200819.231126
[INFO ] Building environment variables
[ERROR] collect2: error: ld returned 1 exit status
[ERROR]
[ERROR] >>
[ERROR] >> Build failed in step ‘Checking that gcc can compile a trivial program’
[ERROR] >> called in step ‘(top-level)’
[ERROR] >>
[ERROR] >> Error happened in: CT_DoExecLog[scripts/functions@376]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@611]
[ERROR] >>
[ERROR] >> For more info on this error, look at the file: ‘build.log’
[ERROR] >> There is a list of known issues, some with workarounds, in:
[ERROR] >> Known issues
[ERROR] >>
[ERROR] >> NOTE: Your configuration includes features marked EXPERIMENTAL.
[ERROR] >> Before submitting a bug report, try to reproduce it without enabling
[ERROR] >> any experimental features. Otherwise, you’ll need to debug it
[ERROR] >> and present an explanation why it is a bug in crosstool-NG - or
[ERROR] >> preferably, a fix.
[ERROR] >>
[ERROR] >> NOTE: You configuration uses non-default patch sets. Please
[ERROR] >> select ‘bundled’ as the set of patches applied and attempt
[ERROR] >> to reproduce this issue. Issues reported with other patch
[ERROR] >> set selections (none, local, bundled+local) are going to be
[ERROR] >> closed without explanation.
[ERROR] >>
[ERROR] >> If you feel this is a bug in crosstool-NG, report it at:
[ERROR] >> Issues · crosstool-ng/crosstool-ng · GitHub
[ERROR] >>
[ERROR] >> Make sure your report includes all the information pertinent to this issue.
[ERROR] >> Read the bug reporting guidelines here:
[ERROR] >> Support
[ERROR]
[ERROR] (elapsed: 0:00.69)
[00:01] / /opt/crosstool-ng/bin/ct-ng:261: recipe for target ‘build’ failed
gmake[1]: *** [build] Error 1
gmake[1]: Leaving directory ‘/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb’ - unmount_delete
- /media/duyliontran/Data/xilinx/PYNQ/sdbuild/scripts/unmount_image.sh /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64 /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64.img
- set -e
- target=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64
- image_file=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64.img
++ sudo losetup -j /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64.img
++ grep -o ‘loop[0-9]*’ - used_loop=loop18
- sudo umount /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64/boot
- sudo umount /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64
- sleep 5
- sudo dmsetup remove /dev/mapper/loop18p1
- sudo dmsetup remove /dev/mapper/loop18p2
- sudo losetup -d /dev/loop18
- rm /media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64.img
/media/duyliontran/Data/xilinx/PYNQ/sdbuild/packages/gcc-mb/Makefile:17: recipe for target ‘/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/bin/mb-gcc’ failed
make: *** [/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/aarch64/microblazeel-xilinx-elf/bin/mb-gcc] Error 2
I have never had this error before…
Thanks and best regards,
Duy
Check the log in sdbuild/build/gcc-mb. Sometime the website it is trying to download from is not stable.
I checked the build log and this is a result:
[DEBUG] Checking that gcc can compile a trivial program
[DEBUG] ==> Executing: ‘aarch64-host_unknown-linux-gnu-gcc’ ‘-O2’ ‘-g’ ‘-pipe’ ‘-I/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-aarch64-linux-gnu/microblazeel-xilinx-elf/buildtools/complibs-host/include’ ‘–sysroot=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64’ ‘-L/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-aarch64-linux-gnu/microblazeel-xilinx-elf/buildtools/complibs-host/lib’ ‘–sysroot=/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/sysroot.aarch64’ ‘/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-aarch64-linux-gnu/microblazeel-xilinx-elf/build/test.c’ ‘-o’ ‘/media/duyliontran/Data/xilinx/PYNQ/sdbuild/build/gcc-mb/.build/HOST-aarch64-linux-gnu/microblazeel-xilinx-elf/build/.gccout’
[DEBUG] /tools/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/…/lib/gcc/aarch64-linux-gnu/8.2.0/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find crt1.o: No such file or directory
[DEBUG] /tools/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/…/lib/gcc/aarch64-linux-gnu/8.2.0/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find crti.o: No such file or directory
[DEBUG] /tools/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/…/lib/gcc/aarch64-linux-gnu/8.2.0/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find -lc
[DEBUG] /tools/Xilinx/SDK/2019.1/gnu/aarch64/lin/aarch64-linux/bin/…/lib/gcc/aarch64-linux-gnu/8.2.0/…/…/…/…/aarch64-linux-gnu/bin/ld: cannot find crtn.o: No such file or directory
[ERROR] collect2: error: ld returned 1 exit status
I did the sudo apt-get update yesterday, don’t know if this is the cause. I did some search on Google but most of them are telling to install gcc-multilib which I already installed. Should I open a new case for this? There is a similar case for this issue in here: PYNQ 2.5 ct-ng build error
Thanks and best regards,
Duy
I met a same issue ,if you have solved this , i`d appreciate that you can tell me the sloution!