Lichi Pie Nano (Lichee Pi) Playing Linux Fool Tutorial (4) --- Install Python

Please indicate the source. http://chengchen.cnblogs.com/

After studying for a long time, I found that the Linux that comes with the Litchi Pie really has nothing, even no Make files, and it does not give me the opportunity to compile.

So I decided to compile a BuildRoot myself to install some third-party packages by default, including python

I still have to recommend this article on the official website:

http://nano.lichee.pro/build_sys/rootfs.html#buildroot

When configuring in ubuntu's compilation environment, we can find make in Target packages / development tools and tick him.

In Target Packages / Interpreter languages ​​and scripting we can find Python and Python3, and even mono? ? Awesome, we can write a dotnet program by the way.

If you are interested, you can also add an openssh. In Target Pakcages / Networking applications, there are a lot of good things to discover by yourself, but do n’t be too greedy, the more you check, the slower the compilation, and the source code of many third parties If it doesn't work, it can't be downloaded now, so it can only be stuck on the compilation path, so it is better to allocate pens on demand.

According to the method in the article, after executing make, we will quietly wait for the compilation to complete. In the middle of compilation, if you encounter any errors that can't find the relevant files, please install the relevant libraries according to the error prompt. It is relatively simple to baidu yourself.

After a long compilation, you can find output \ images \ rootfs.tar after success, but how do we re-burn this new file? Don't worry, I provide a super simple method.

Remember in the last article, how did we expand the capacity and how to generate a new burn file? We can also make scripts using the same, as long as the contents are easily replaced. In the last article, when the script for making an image is executed, the system will automatically load in the new image. We only need to unzip output \ images \ rootfs.tar and then completely replace the loaded image content, and then burn this image.

If it is troublesome to replace so many files each time, you can also modify pack_tf_img.sh

        sudo tar xzvf $_ROOTFS_FILE -C p2/ &&\  

The meaning of this sentence is to decompress the generated file to the second partition. It can be modified to decompress the output \ images \ rootfs.tar you specified to the second partition.

Burn a mirror again. Then log in to test:

how about it? Take it easy, Python will run.

 

Guess you like

Origin www.cnblogs.com/chengchen/p/12727476.html