Forum Discussion
Error occurred when build the u-boot
- 4 years ago
it seemed work today.
in fact , i was looking for the solution to support the usb blaster under WSL2, what i did is as below:
1. My platform: WSL2 + ubuntu 18.04 on windows 10
2. to support USB blaster on WSL2, i upgraded the linux kernel from 5.10.16.3 to 5.10.60.1.
3. checked the specification Intel® FPGA Software Installation and Licensing, found some dependencies need to be installed.
from /var/log/dpkg.log, i upgraded below packages, not sure which one is root cause
at last, the usb blaster still can't work on ubuntu, but i found the u-boot now can be made successfully.
---------------------------------------------------------------------------------------
2022-08-17 14:57:23 install liblzma-dev:amd64 <none> 5.2.2-1.3ubuntu0.1
2022-08-17 15:27:33 install lib32tinfo5:amd64 <none> 6.1-1ubuntu1.18.04
2022-08-17 15:27:33 install lib32ncurses5:amd64 <none> 6.1-1ubuntu1.18.04
2022-08-17 15:42:05 install zlib1g-dev:amd64 <none> 1:1.2.11.dfsg-0ubuntu2.1
2022-08-17 15:57:17 install libtinfo-dev:amd64 <none> 6.1-1ubuntu1.18.04
2022-08-17 15:57:17 install libncurses5-dev:amd64 <none> 6.1-1ubuntu1.18.04
2022-08-17 15:57:17 install u-boot-tools:amd64 <none> 2020.10+dfsg-1ubuntu0~18.04.2
2022-08-17 15:57:17 install device-tree-compiler:amd64 <none> 1.4.5-3
2022-08-17 15:57:17 install libattr1-dev:amd64 <none> 1:2.4.47-2build1
2022-08-17 15:57:17 install libacl1-dev:amd64 <none> 2.2.52-3build1
2022-08-17 15:57:17 install uuid-dev:amd64 <none> 2.31.1-0.4ubuntu3.7
2022-08-17 16:06:50 install libdouble-conversion1:amd64 <none> 2.0.1-4ubuntu1
2022-08-17 16:06:50 install libqt5core5a:amd64 <none> 5.9.5+dfsg-0ubuntu2.6
2022-08-17 16:06:50 install libqt5dbus5:amd64 <none> 5.9.5+dfsg-0ubuntu2.6
2022-08-17 16:06:50 install libqt5network5:amd64 <none> 5.9.5+dfsg-0ubuntu2.6
2022-08-17 16:06:51 install libqt5qml5:amd64 <none> 5.9.5-0ubuntu1.1
2022-08-17 16:06:51 install qttranslations5-l10n:all <none> 5.9.5-0ubuntu1
2022-08-17 16:10:21 install libc6-dev-i386:amd64 <none> 2.27-3ubuntu1.6
2022-08-17 16:10:21 install libc6-x32:amd64 <none> 2.27-3ubuntu1.6
2022-08-17 16:10:21 install libc6-dev-x32:amd64 <none> 2.27-3ubuntu1.6
2022-08-17 16:10:22 install libx32gcc1:amd64 <none> 1:8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install lib32gomp1:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install libx32gomp1:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install lib32itm1:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install libx32itm1:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install lib32atomic1:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install libx32atomic1:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install lib32asan4:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:22 install libx32asan4:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:22 install lib32ubsan0:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:22 install libx32stdc++6:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install libx32ubsan0:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:22 install lib32cilkrts5:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:22 install libx32cilkrts5:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:22 install lib32mpx2:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install lib32quadmath0:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install libx32quadmath0:amd64 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 16:10:22 install lib32gcc-7-dev:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:22 install libx32gcc-7-dev:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:22 install gcc-7-multilib:amd64 <none> 7.5.0-3ubuntu1~18.04
2022-08-17 16:10:23 install gcc-multilib:amd64 <none> 4:7.4.0-1ubuntu2.3
2022-08-17 16:32:30 install libpng12-0-udeb:amd64 <none> 1.2.50-1ubuntu2.14.04.3
2022-08-17 16:39:07 install libpng12-0-udeb:amd64 <none> 1.2.50-1ubuntu2.14.04.3
2022-08-17 16:42:55 install zlib1g-udeb:amd64 <none> 1:1.2.8.dfsg-1ubuntu1
2022-08-17 16:47:55 install libpng12-0-udeb:amd64 <none> 1.2.50-1ubuntu2.14.04.3
2022-08-17 16:53:54 install libpng12-0:amd64 <none> 1.2.50-1ubuntu2.14.04.3
2022-08-17 18:05:41 install gcc-8-base:i386 <none> 8.4.0-1ubuntu1~18.04
2022-08-17 18:05:41 install libgcc1:i386 <none> 1:8.4.0-1ubuntu1~18.04
2022-08-17 18:05:41 install libc6:i386 <none> 2.27-3ubuntu1.6
2022-08-17 18:05:41 install libbz2-1.0:i386 <none> 1.0.6-8.1ubuntu0.2
2022-08-17 18:06:28 install libtinfo5:i386 <none> 6.1-1ubuntu1.18.04
2022-08-17 18:06:28 install libncurses5:i386 <none> 6.1-1ubuntu1.18.04
2022-08-17 18:06:28 install libgpm2:i386 <none> 1.20.7-5
2022-08-17 18:07:18 install libxau6:i386 <none> 1:1.0.8-1ubuntu1
2022-08-17 18:07:18 install libbsd0:i386 <none> 0.8.7-1ubuntu0.1
2022-08-17 18:07:18 install libxdmcp6:i386 <none> 1:1.1.2-3
2022-08-17 18:07:18 install libxcb1:i386 <none> 1.13-2~ubuntu18.04
2022-08-17 18:07:19 install libx11-6:i386 <none> 2:1.6.4-3ubuntu0.5
2022-08-17 18:07:19 install libxext6:i386 <none> 2:1.3.3-1
2022-08-17 18:07:19 install libxtst6:i386 <none> 2:1.2.3-1
2022-08-17 18:07:40 install libexpat1:i386 <none> 2.2.5-3ubuntu0.7
2022-08-17 18:07:40 install zlib1g:i386 <none> 1:1.2.11.dfsg-0ubuntu2.1
2022-08-17 18:07:40 install libpng16-16:i386 <none> 1.6.34-1ubuntu0.18.04.2
2022-08-17 18:07:40 install libfreetype6:i386 <none> 2.8.1-2ubuntu2.2
2022-08-17 18:07:40 install libfontconfig1:i386 <none> 2.12.6-0ubuntu2
2022-08-17 18:07:40 install libxrender1:i386 <none> 1:0.9.10-1
2022-08-17 18:07:40 install libxft2:i386 <none> 2.3.2-1
2022-08-17 18:08:02 install libstdc++6:i386 <none> 8.4.0-1ubuntu1~18.04
2022-08-18 12:25:05 install m4:amd64 <none> 1.4.18-1
2022-08-18 12:25:05 install flex:amd64 <none> 2.6.4-6
2022-08-18 12:25:06 install libbison-dev:amd64 <none> 2:3.0.4.dfsg-1build1
2022-08-18 12:25:06 install bison:amd64 <none> 2:3.0.4.dfsg-1build1
2022-08-18 12:25:06 install libelf-dev:amd64 <none> 0.170-0.4ubuntu0.1
2022-08-18 12:25:06 install libfl2:amd64 <none> 2.6.4-6
2022-08-18 12:25:06 install libfl-dev:amd64 <none> 2.6.4-6
2022-08-18 13:46:30 install hwdata:all <none> 0.290-1ubuntu0.18.04.1
2022-08-18 13:46:30 install linux-tools-common:all <none> 4.15.0-192.203
2022-08-18 13:46:30 install linux-tools-4.15.0-192:amd64 <none> 4.15.0-192.203
2022-08-18 13:46:30 install linux-tools-4.15.0-192-generic:amd64 <none> 4.15.0-192.203
2022-08-18 13:46:30 install linux-tools-virtual:amd64 <none> 4.15.0.192.177
2022-08-18 13:58:11 install linux-hwe-5.4-tools-common:all <none> 5.4.0-125.141~18.04.1
2022-08-18 13:58:11 install linux-hwe-5.4-tools-5.4.0-77:amd64 <none> 5.4.0-77.86~18.04.1
2022-08-18 13:58:11 install linux-tools-5.4.0-77-generic:amd64 <none> 5.4.0-77.86~18.04.1
i noticed the instruction metioned that the u-boot can only be built on linux, so I tried on ubantu18.04, below are the logs, still something wrong when I excecuted the "make" command.
pls help to check and give me comments, thank you very much.
========================================================================
chunyuwang@GB1LL2J3E:/mnt/c$ ./intelFPGA_pro/20.1/embedded/embedded_command_shell.sh
/mnt/c/intelFPGA_pro/20.1/embedded/env.sh: line 203: /mnt/c/intelFPGA_pro/20.1/embedded/host_tools/altera/ds5_link/soceds_config: No such file or directory
WARNING: DS-5 install not detected. SoC EDS may not function correctly without a DS-5 install.
------------------------------------------------
Intel FPGA Embedded Command Shell
Version 20.1 [Build 177]
------------------------------------------------
chunyuwang@GB1LL2J3E:/mnt/c$ cd $SOCEDS_DEST_ROOT/examples/hardware/a10_soc_devkit_ghrd/
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd$ rm -rf software/bootloader
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd$ mkdir -p software/bootloader
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd$ cd software/bootloader
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd/software/bootloader$ export https_proxy=3.87.248.1:88
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd/software/bootloader$ git clone https://github.com/altera-opensource/u-boot-socfpga
Cloning into 'u-boot-socfpga'...
remote: Enumerating objects: 860036, done.
remote: Counting objects: 100% (58086/58086), done.
remote: Compressing objects: 100% (11426/11426), done.
remote: Total 860036 (delta 46206), reused 58081 (delta 46205), pack-reused 801950
Receiving objects: 100% (860036/860036), 206.09 MiB | 227.00 KiB/s, done.
Resolving deltas: 100% (706460/706460), done.
Checking out files: 100% (17968/17968), done.
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd/software/bootloader$ cd u-boot-socfpga
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd/software/bootloader/u-boot-socfpga$ git checkout -b test -t origin/socfpga_v2020.04
Checking out files: 100% (13189/13189), done.
Branch 'test' set up to track remote branch 'socfpga_v2020.04' from 'origin'.
Switched to a new branch 'test'
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd/software/bootloader/u-boot-socfpga$ ./arch/arm/mach-socfpga/qts-filter-a10.sh \
> ../../../hps_isw_handoff/hps.xml \
> arch/arm/dts/socfpga_arria10_socdk_sdmmc_handoff.h
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd/software/bootloader/u-boot-socfpga$ export CROSS_COMPILE=arm-eabi-
chunyuwang@GB1LL2J3E:/mnt/c/intelFPGA_pro/20.1/embedded/examples/hardware/a10_soc_devkit_ghrd/software/bootloader/u-boot-socfpga$ make socfpga_arria10_defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
/bin/sh: 1: bison: not found
scripts/Makefile.lib:226: recipe for target 'scripts/kconfig/zconf.tab.c' failed
make[1]: *** [scripts/kconfig/zconf.tab.c] Error 127
Makefile:539: recipe for target 'socfpga_arria10_defconfig' failed
make: *** [socfpga_arria10_defconfig] Error 2