Open omac777 opened 1 year ago
Thanks for your info, I hadn't tried to build the sdk on ubuntu 22.04. Maybe we can just run sudo apt install libssl-dev
, then it will automatically install the libssl library on various ubuntu version.
Yes please use the latest long-term-stable(LTS) ubuntu 22.04 Jammy Jellyfish for the starfive-tech binary tools are dependent on the older LTS and respective ssl1 at the moment. The community can't rebuild those tools as they are not open-source. If these tools were open-source, I'm certain this problem would have been tackled by now.
The easier it gets for everybody to build and participate with merge requests, the faster VisionFive 2's software ecosystem will grow. On Thursday, December 22, 2022 at 11:01:38 p.m. EST, Andy Hu @.***> wrote:
Thanks for your info, I hadn't tried to build the sdk on ubuntu 22.04. Maybe we can just run sudo apt install libssl-dev, then it will automatically install the libssl library on various ubuntu version.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
It seems that we can manually invoke the failing command with a missing library which is actually built at the same time to workaround the issue.
The error I observed during make
was:
cmd: ./create_hdr --bin /work/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
64+0 records in
64+0 records out
64 bytes copied, 0.000695963 s, 92.0 kB/s
cmd: pack --out u-boot-spl.bin.normal.out u-boot-spl.bin.normal.common.hdr u-boot-spl.bin.normal.sig.padding u-boot-spl.bin.normal.hdr /work/VisionFive2/work/u-boot/spl/u-boot-spl.bin
error: u-boot-spl.bin.normal.common.hdr not exist
make: *** [Makefile:330: /work/VisionFive2/work/u-boot-spl.bin.normal.out] Error 1
and it looks like that's because create_hdr depends on libcrypto.so.1.1, which is not available via apt on ubuntu 22.04:
$ ./create_hdr --bin /work/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
and I found the missing lib under the build dir:
$ find . | grep libcrypto
./work/buildroot_initramfs/host/lib/libcrypto.so.1.1
so I guess specifying the lib manually with LD_PRELOAD can workaround the problem:
$ LD_PRELOAD=../../work/buildroot_initramfs/host/lib/libcrypto.so.1.1 ./create_hdr --bin /work/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
--------------------------------------------------------
StarFive Create Header Tool, version 220515-cb5deb9.
configuration:
inputfile : input_files/input_sbl_normal.cfg
sbl_bin : /work/VisionFive2/work/u-boot/spl/u-boot-spl.bin
sbl_ver : 0x01010101 (major 1, minor 1, revision 257)
sbl_bak_offset : 0x00200000
output_common_hdr_filename : u-boot-spl.bin.normal.common.hdr
output_sbl_hdr_filename : u-boot-spl.bin.normal.hdr
no ec_pri_keys config
savefile u-boot-spl.bin.normal.common.hdr, 576 bytes
fw_bin_crc32: 0x85e4902c
savefile u-boot-spl.bin.normal.hdr, 384 bytes
tested on:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
Btw, is there any reason that the sources of those soft_3rdpart
binaries are not published? Thanks!
Ubuntu 22.04+ only ships with libssl3. Please replace any usage of libssl1 with libssl3. This is a security library after all and has impact on vpns used for remote-work.
Thank you in advance.