I am trying to build ubuntu firmware for R1 using the instruction.
https://wiki.t-firefly.com/en/Cluster-Server-R1/Firefly_Cluster_server_product_documentation.html#linux-sdk
When I run the build, I get an error.
user@user-VirtualBox:~/r1/rk3399_linux_release_v2.5.1_20210301$ ./build.sh kernel
processing option: kernel
============Start building kernel============
TARGET_ARCH =arm64
TARGET_KERNEL_CONFIG =firefly_linux_defconfig
TARGET_KERNEL_DTS =rk3399-firefly-CS-R1-jd4-sub
TARGET_KERNEL_CONFIG_FRAGMENT =
==========================================
/home/user/r1/rk3399_linux_release_v2.5.1_20210301
#
# configuration written to .config
#
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
HOSTLD scripts/dtc/dtc
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/utsrelease.h
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): повторное определение «yylloc»; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): здесь первое определение
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:100: scripts/dtc/dtc] Ошибка 1
make[1]: *** [scripts/Makefile.build:484: scripts/dtc] Ошибка 2
make: *** [Makefile:579: scripts] Error 2
make: *** Waiting for unfinished jobs....
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
ERROR: Running build_kernel failed!
ERROR: exit code 2 from line 721:
make ARCH=$RK_ARCH $RK_KERNEL_DTS.img -j$RK_JOBS
Please confirm the installation of the following files
sudo apt-get update
sudo apt-get install repo git-core gitk git-gui gcc-arm-linux-gnueabihf u-boot-tools device-tree-compiler \
gcc-aarch64-linux-gnu mtools parted libudev-dev libusb-1.0-0-dev python-linaro-image-tools \
linaro-image-tools gcc-arm-linux-gnueabihf libssl-dev liblz4-tool genext2fs lib32stdc++6 \
gcc-aarch64-linux-gnu g+conf autotools-dev libsigsegv2 m4 intltool libdrm-dev curl sed make \
binutils build-essential gcc g++ bash patch gzip bzip2 perl tar cpio python unzip rsync file bc wget \
libncurses5 libqt4-dev libglib2.0-dev libgtk2.0-dev libglade2-dev cvs git mercurial rsync openssh-client \
subversion asciidoc w3m dblatex graphviz python-matplotlib libssl-dev texinfo fakeroot \
libparse-yapp-perl default-jre patchutils swig chrpath diffstat gawk
refer: https://wiki.t-firefly.com/en/Core-3399-JD4/linux_compile_gpt.html
895816513 Posted at 5/28/2022 12:29
Please confirm the installation of the following files
Yes, I have installed these packages, but some packages are missing from the repository.
E: Невозможно найти пакет python-linaro-image-tools
E: Невозможно найти пакет linaro-image-tools
E: Невозможно найти пакет libqt4-dev
E: Для пакета «python-matplotlib» не найден кандидат на установку
Which version Ubuntu is recommended to use ?
I use
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.10
DISTRIB_CODENAME=impish
DISTRIB_DESCRIPTION=“Ubuntu 21.10”
Switched to Ubuntu 18.04LTS, the build works without errors.
It is advisable to specify the Ubuntu version in the documentation so that you immediately know which version to use.
By the way, as an option, it is desirable to release a version of Docker with a build system (without sources).
rootfs ubuntu is used to build the firmware for R1. The link from the wiki page for r1 leads to baidu, but it is not possible to download the archives (the service blocks sending outside of China). when trying to download rootfs from the firefly-rk3399 download page, it gives the message “not pages”.
https://drive.google.com/drive/folders/1dDm08uEYOmLY9VcG5Qc5qkgWaxnTi6-9
How can I build my own version of rootfs for R1 locally ?
balbes150 Posted at 5/30/2022 01:11
Switched to Ubuntu 18.04LTS, the build works without errors.
It is advisable to specify the Ubuntu …
Thanks for your suggestion, I have made the recommended changes.
balbes150 Posted at 5/30/2022 20:02
rootfs ubuntu is used to build the firmware for R1. The link from the wiki page for r1 leads to bai …
https://en.t-firefly.com/doc/download/71.html#other_117
895816513 Posted at 5/31/2022 09:50
Thanks for your suggestion, I have made the recommended changes.
Tnx
I wrote a Dockerfile that builds an image of an assembly system. 
By the way, I have collected test firmware versions for R1. Can you check them (I don’t have an AIO board to flash the rk3399-jd4 module if my firmware doesn’t work correctly) ?
https://disk.yandex.ru/d/ZinDgPfp_C4xXg
The sub board can be forcibly upgraded through the main board. If the firmware of the main board is wrong, you can make a TF upgrade card to upgrade the main board.
By the way, I’m uploading 4 rootfs, it will take about 3.5 hours, you check google drive when you get there.
Ubuntu18.04-Lxde_RK3399PRO_v2.11-56_20220527.img.7z
Ubuntu20.04-Gnome_RK3399PRO_v2.11-56_20220526.img.7z
Ubuntu18.04-Minimal_RK3399PRO_v2.11-56_20220526.img.7z
Ubuntu20.04-Minimal_RK3399PRO_v2.11-56_20220526.img.7z
It is also desirable to fix a few minor errors in the documentation (this is not critical, but it can confuse a beginner). Some commands have extra spaces after the dot. There are such typos in different pages for other models (rk3399-jd4). For example.
. /build.sh CS-R1-3399-jd4-sub-ubuntu.mk
#Fully automated compiled firmware
$ . /build.sh
#Partial compilation
$ . /build.sh kernel
$ . /build.sh uboot
$ . /build.sh recovery
# Run . /mkfirmware.sh will automatically update the link to rockdev/rootfs.img.
$ . /build.sh firmware
balbes150 Posted at 5/31/2022 15:34
It is also desirable to fix a few minor errors in the documentation (this is not critical, but it ca …
Thank you for your feedback, it should be an error in text processing, we have made changes to the above problems.
895816513 Posted at 5/31/2022 10:29
The sub board can be forcibly upgraded through the main board. If the firmware of the main board is …
Thanks. I have already downloaded these images and created firmware based on them 
The question is, where can I find out how to build my version of rootfs correctly, what additional files\packages\settings special for firefly need to be used. I want to create a firmware with Armbian and AltLinux, which can be installed using standard BMC tools (now I have to manually write everything into modules and this takes a lot of time and is not suitable for mass use).
taylorchan067 Posted at 6/2/2022 19:03
Did you get the solution on how to fix it. Because I am facing the same issue with my device and not …
Write in detail what problem you are talking about and on what device.