Closed omac777 closed 1 year ago
while doing the make -j$(nproc), I experienced another one of those git@github.com:starfive-tech/linux.git repo urls.
I would hope not to be fetching more sources once I start building.
Initialized empty Git repository in /home/davidm/visionfive2prep/VisionFive2/buildroot/dl/linux/git/.git/
GIT_DIR=/home/davidm/visionfive2prep/VisionFive2/buildroot/dl/linux/git/.git git remote add origin 'git@github.com:starfive-tech/linux.git'
GIT_DIR=/home/davidm/visionfive2prep/VisionFive2/buildroot/dl/linux/git/.git git remote set-url origin 'git@github.com:starfive-tech/linux.git'
Fetching all references
GIT_DIR=/home/davidm/visionfive2prep/VisionFive2/buildroot/dl/linux/git/.git git fetch origin
The authenticity of host 'github.com (140.82.112.3)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
It breaks the build by the way,.
git@github.com: Permission denied (publickey).
**fatal: Could not read from remote repository.**
Please make sure you have the correct access rights
and the repository exists.
Detected a corrupted git cache.
This is the second time in a row; bailing out
wget --passive-ftp -nd -t 3 -O '/home/davidm/visionfive2prep/VisionFive2/work/buildroot_initramfs/build/.linux-JH7110_VisionFive2_devel-br1.tar.gz.kXkcSh/output' 'http://sources.buildroot.net/linux/linux-JH7110_VisionFive2_devel-br1.tar.gz'
--2022-12-15 17:50:29-- http://sources.buildroot.net/linux/linux-JH7110_VisionFive2_devel-br1.tar.gz
Resolving sources.buildroot.net (sources.buildroot.net)... 172.67.72.56, 104.26.0.37, 104.26.1.37, ...
Connecting to sources.buildroot.net (sources.buildroot.net)|172.67.72.56|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
**2022-12-15 17:50:29 ERROR 404: Not Found.**
Hi omac777, now the sdk recommend to download the code through git ssh, you can try to add ssh public key to your github account.
or you can still replace the "git ssh" with "git https" like your method, you can modify the .gitmodules to change the dowload url.
Besides this one, the conf/buildroot_initramfs_config and conf/buildroot_rootfs_config also need to modify the
BR2_KERNEL_HEADERS_CUSTOM_REPO_URL="git@github.com:starfive-tech/linux.git"
to
BR2_KERNEL_HEADERS_CUSTOM_REPO_URL="https://github.com/starfive-tech/linux.git"
I have modified : /home/user/VisionFive2/buildroot/dl/linux/git/.git/config file and changed git@github.com:starfive-tech/linux.git to https://github.com/starfive-tech/linux.git and it stack at `jacky@Dev1:~/VisionFive2$ make -j$(nproc) make -C /home/jacky/VisionFive2/buildroot RISCV=/home/jacky/VisionFive2/work/buildroot_initramfs/host O=/home/jacky/VisionFive2/work/buildroot_initramfs make[1]: Entering directory '/home/jacky/VisionFive2/buildroot'
linux-headers JH7110_VisionFive2_devel Downloading GIT_DIR=/home/jacky/VisionFive2/buildroot/dl/linux/git/.git git init . Reinitialized existing Git repository in /home/jacky/VisionFive2/buildroot/dl/linux/git/.git/ GIT_DIR=/home/jacky/VisionFive2/buildroot/dl/linux/git/.git git remote set-url origin 'https://github.com/starfive-tech/linux.git' Fetching all references GIT_DIR=/home/jacky/VisionFive2/buildroot/dl/linux/git/.git git fetch origin` several times...
problem solved by editing "/home/jacky/VisionFive2/buildroot/dl/linux/git/.git/config" Change "git@github.com:starfive-tech/linux.git " to "https://github.com/starfive-tech/linux.git" and re-execute : make -j $(nproc)
---OUTPUT
GIT_DIR=/home/jacky/VisionFive2/buildroot/dl/linux/git/.git git init . Initialized empty Git repository in /home/jacky/VisionFive2/buildroot/dl/linux/git/.git/ GIT_DIR=/home/jacky/VisionFive2/buildroot/dl/linux/git/.git git remote add origin 'https://github.com/starfive-tech/linux.git' GIT_DIR=/home/jacky/VisionFive2/buildroot/dl/linux/git/.git git remote set-url origin 'https://github.com/starfive-tech/linux.git' Fetching all references GIT_DIR=/home/jacky/VisionFive2/buildroot/dl/linux/git/.git git fetch origin remote: Enumerating objects: 9211752, done. remote: Counting objects: 100% (132322/132322), done. remote: Compressing objects: 100% (53167/53167), done. remote: Total 9211752 (delta 97366), reused 97444 (delta 78850), pack-reused 9079430 Receiving objects: 100% (9211752/9211752), 2.08 GiB | 2.11 MiB/s, done. Resolving deltas: 100% (7808806/7808806), done.
Thank you. Much appreciated Mr. Hu. Stay awesome :)
On Sunday, December 18, 2022 at 08:51:18 p.m. EST, Andy Hu ***@***.***> wrote:
Hi omac777, now the sdk recommend to download the code through git ssh, you can try to add ssh public key to your github account.
or you can still replace the "git ssh" with "git https" like your methond, you can modify the .gitmodules to git https url. Besides this one, the conf/buildroot_initramfs_config and conf/buildroot_rootfs_config also need to modify the @.***:starfive-tech/linux.git" to BR2_KERNEL_HEADERS_CUSTOM_REPO_URL="https://github.com/starfive-tech/linux.git"
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
The build output did complete. It took 2.5 hours on a phenomx8 popos 22.04.
gists github wouldn't let me upload this build output file so here it is from easyupload: https://easyupload.io/0at0v4
I didn't see the all the expected generated output files in the work directory as mentioned in the readme. https://github.com/starfive-tech/VisionFive2#readme
work/ ├── visionfive2_fw_payload.img NO ├── image.fit NO ├── initramfs.cpio.gz YES ├── u-boot-spl.bin.normal.out NO ├── linux/arch/riscv/boot YES ├── dts YES │ └── starfive YES │ ├── jh7110-visionfive-v2-ac108.dtb YES │ ├── jh7110-visionfive-v2.dtb YES │ ├── jh7110-visionfive-v2-wm8960.dtb YES │ ├── vf2-overlay YES │ │ └── vf2-overlay-uart3-i2c.dtbo YES └── Image.gz YES
@omac777 , It seem that your build output is not good. Through your build log, please see the below:
cmd: ./create_hdr --bin /home/davidm/visionfive2prep/VisionFive2/work/u-boot/spl/u-boot-spl.bin --version 0x01010101 --common_hdr u-boot-spl.bin.normal.common.hdr --hdr u-boot-spl.bin.normal.hdr input_files/input_sbl_normal.cfg
./create_hdr: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
$ ldd soft_3rdpart/spl_tool/create_hdr
linux-vdso.so.1 (0x00007ffda8fe8000)
/lib/$LIB/liblsp.so => /lib/lib/x86_64-linux-gnu/liblsp.so (0x00007f2106aca000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f21065ff000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f210620e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f210600a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2105deb000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2107efc000)
the create_hdr need libcrypto.so which should be contained in openssl. You should install it firstly
cd ~/visionfive2prep/VisionFive2/
ldd soft_3rdpart/spl_tool/create_hdr
linux-vdso.so.1 (0x00007ffc82d96000)
libcrypto.so.1.1 => not found
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f39c5600000)
/lib64/ld-linux-x86-64.so.2 (0x00007f39c6dea000)
openssl is already installed.
sudo apt-get install openssl
openssl is already the newest version (3.0.2-0ubuntu1.7).
libssl-dev was installed as per pre-requisite instructions. It was supposed to contain libcrypto.
On Ubuntu 22.04 Jammy, there was an error to do with libcrypto: https://askubuntu.com/questions/1403778/upgrading-to-ubuntu-22-04-causes-libcrypto-errors-apt-dpkg-broken
The core root of the issue is the build is using libssl1.1 instead of what it should be using which is libssl3 for jammy. libssl1.1 is no longer provided: https://packages.ubuntu.com/search?suite=default§ion=all&arch=any&keywords=libssl&searchon=names
Installing libssl1.1 is a workaround not what I would recommend, but for the sake of just getting this build up for VF2 here are possible instructions to install libssl1.1. I'll try to build it with this again.
wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.0l-1~deb9u6_amd64.deb
sha256sum libssl1.1_1.1.0l-1~deb9u6_amd64.deb
sudo dpkg -i ./libssl1.1_1.1.0l-1~deb9u6_amd64.deb
cd ~/visionfive2prep/VisionFive2/
ldd soft_3rdpart/spl_tool/create_hdr
soft_3rdpart/spl_tool/create_hdr: /lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by soft_3rdpart/spl_tool/create_hdr)
linux-vdso.so.1 (0x00007ffe97796000)
libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007febbac00000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007febba800000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007febbc5a2000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007febbc59a000)
/lib64/ld-linux-x86-64.so.2 (0x00007febbc5c2000)
Please add something about this in the pre-requisite packages in the instructions to make it smoother for other developers on-boarding.
It's mystery to me why this build doesn't use libssl3 yet since libssl1.1 is no longer part of jammy ubuntu 22.04 which was recommended to build the image with.
Thank you again.
The build failed. I cannot proceed. Please tweak the build process to use libssl3 since I may not use libssl1.1 for obvious security reasons. Others will encounter this difficulty with any Ubuntu/Popos 22.04+.
PROBLEM
Ok so my first time to clone and build all this and the clone instructions failed.
SOLUTION
Please change the instructions for the fetch sources to the steps that follow to save others some time:
Here's the successful clone output:
4 . Tweak the VisionFive2/.gitmodules file.
Replace git@github.com:starfive-tech → https://github.com/starfive-tech
Repository is read and cloned. Here's the successful submodule update output: