1932 views|5 replies

38

Posts

0

Resources
The OP
 

[Sipeed LicheeRV 86 Panel Review] III. Building a cross-compilation environment: success and failure [Copy link]

 This post was last edited by zhang1gong on 2022-3-23 16:24

After having a basic understanding of the "Sipeed LicheeRV 86 Panel" hardware and doing simple lighting and flashing experiments, the next step is obviously to build a cross-compilation environment and conduct some substantive evaluation work.

Several friends have already done this work, and their evaluation reports describe the process in detail, including possible "pitfalls" and how to "avoid them". I thought that building a cross-compilation environment would be smooth, but I encountered many problems. The final result was that there were successes and failures. Unfortunately, in general, there were more failures than successes. In the process of trying to solve the problems, I learned a lot about Linux.

1 Success: A simple "hello, world!"

Because I wanted to get familiar with the Linux system through this evaluation, I installed the latest version of "Kali Linux" on a small host that I bought for more than 100 yuan a few years ago. The main operations were done from my desktop computer through SSH remote login of the simulated terminal. The process of installing and configuring the Linux system of the small host went smoothly. Then I deployed D1-SDK, edited the "helloworld.c" file, and ran it according to the steps given in the D1-SDK user manual:

source ~/.local/riscv64-toolchain/environment-setup-riscv64-oe-linux
$CC helloworld.c -o helloworld

This compiles, but with a warning.

In fact, there is a small episode in the middle. When you start running " $CC helloworld.c -o helloworld ", the prompt is:

zsh: no such file or directory: riscv64-linux-gcc -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/zyg/.local/riscv64-toolchain /sysroots/riscv64-oe-linux --no-sysroot-suffix

Just run directly:

riscv64-linux-gcc -o helloworld helloworld.c

The compilation was successful. Later I found that it was a shell problem. The default shell of Kali is zsh, which is very easy to use, but not completely compatible with bash. After switching to bash, compiling with "$CC" was no problem.

The compiled executable code needs to be downloaded to the target machine Sipeed LicheeRV 86 Panel. I used the simulation terminal running on the desktop computer to connect to the kali linux small host and Sipeed LicheeRV 86 Panel through SSH respectively, and then used the "scp " command on the simulation terminal connected to the Sipeed LicheeRV 86 Panel to copy the files on the kali linux small host and run it. No problem.

2 Failed: Compilation of system image

At the end of the tutorial for Sipeed LicheeRV 86 Panel, a solution for compiling a system image through Docker was given. I just attended a class a few days ago and it mentioned Docker, so I gave it a try. According to the instructions in the tutorial, I downloaded and installed the Docker image file. After several attempts, I finally got it running on the Kali Linux mini-host. This Docker image is an Ubuntu system, and the environment for cross-compiling the "Sipeed LicheeRV 86 Panel" system image has been set up. Follow the tutorial to execute the command:

cd ~/sdk/tina-d1-open_new/
source build/envsetup.sh
lunch
make

The compilation process started. The compilation process was very long (maybe because of the low configuration of my small host?), and it must have something to do with running in a container instead of running directly locally. In short, the compilation process took several hours (more than 10 hours?), and finally it was completed! But, but, the compilation failed!

I decided not to use docker. I followed the download and installation instructions on the Allwinner website, downloaded the SDK repository, and built an environment to compile the system image. However, the compilation still failed. At first, it prompted that the "openssl" library was missing. After searching online for solutions, other problems occurred. During this period, I even deleted the local SDK repository and downloaded and installed it again, but it still didn't work. The current situation seems to be that the generated toolchain is wrong. It is probably a problem with a Makefile, but it has not been accurately located.

The problem is still being found, and it is a bit difficult for me.

This post is from Domestic Chip Exchange

Latest reply

Please submit a work order and I will ask our engineers to help resolve it: https://occ.t-head.cn/people/workorder-submit. After successful submission, please return the work order number to me.   Details Published on 2022-3-24 10:06
 
 

5213

Posts

239

Resources
2
 

Other reviewers, if you have time, please stop by and take a look to see if this can be solved.

@我爱下载
@yinxx
@sonicfirr
@mars4zhu
@manhuami2007
@mygod888
@damiaa
@jszszzy

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

71

Posts

0

Resources
3
 

Please submit a work order and I will ask our engineers to help resolve it: https://occ.t-head.cn/people/workorder-submit.

After successful submission, please return the work order number to me.

This post is from Domestic Chip Exchange
 
 
 

38

Posts

0

Resources
4
 

I filled out the work order, but nothing happened after submitting it. I don't know if it was submitted successfully. If it doesn't work, I'll try again.

This post is from Domestic Chip Exchange
 
 
 

38

Posts

0

Resources
5
 

This post is from Domestic Chip Exchange
 
 
 

38

Posts

0

Resources
6
 

The problem has been found and will be discussed in the next review report.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list